1
1

Make an attempt to protect hwloc cset2str from segfaulting in weird scenario

This commit was SVN r27361.
Этот коммит содержится в:
Ralph Castain 2012-09-23 16:51:51 +00:00
родитель 1ddb334a52
Коммит d5279b0dc8

Просмотреть файл

@ -497,10 +497,14 @@ static int do_child(orte_app_context_t* context,
}
if (0 == rc && opal_hwloc_report_bindings) {
char tmp1[1024], tmp2[1024];
opal_hwloc_base_cset2str(tmp1, sizeof(tmp1), cpuset);
opal_hwloc_base_cset2mapstr(tmp2, sizeof(tmp2), cpuset);
opal_output(0, "MCW rank %d bound to %s: %s",
child->name.vpid, tmp1, tmp2);
if (NULL == cpuset) {
opal_output(0, "Cannot print NULL cpuset");
} else {
opal_hwloc_base_cset2str(tmp1, sizeof(tmp1), cpuset);
opal_hwloc_base_cset2mapstr(tmp2, sizeof(tmp2), cpuset);
opal_output(0, "MCW rank %d bound to %s: %s",
child->name.vpid, tmp1, tmp2);
}
}
/* set memory affinity policy */
if (ORTE_SUCCESS != opal_hwloc_base_set_process_membind_policy()) {