Skip to content

Commit 7fc9f9b

Browse files
authored
Merge pull request #2620 from karasevb/fix_rmaps_mindist
rmaps/mindist: fix pmix errors
2 parents ca16f3f + 5fb3e0a commit 7fc9f9b

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

orte/mca/rmaps/mindist/rmaps_mindist_module.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,21 @@ static int mindist_map(orte_job_t *jdata)
280280
break;
281281
}
282282
}
283-
opal_output_verbose(2, orte_rmaps_base_framework.framework_output,
284-
"mca:rmaps:mindist: assigned %d procs to node %s",
285-
j, node->name);
283+
if (0 != j) {
284+
/* add the node to the map, if needed */
285+
if (!ORTE_FLAG_TEST(node, ORTE_NODE_FLAG_MAPPED)) {
286+
if (ORTE_SUCCESS > (rc = opal_pointer_array_add(jdata->map->nodes, (void*)node))) {
287+
ORTE_ERROR_LOG(rc);
288+
goto error;
289+
}
290+
ORTE_FLAG_SET(node, ORTE_NODE_FLAG_MAPPED);
291+
OBJ_RETAIN(node); /* maintain accounting on object */
292+
jdata->map->num_nodes++;
293+
}
294+
opal_output_verbose(2, orte_rmaps_base_framework.framework_output,
295+
"mca:rmaps:mindist: assigned %d procs to node %s",
296+
j, node->name);
297+
}
286298
} else {
287299
if (hwloc_get_nbobjs_by_type(node->topology, HWLOC_OBJ_SOCKET) > 1) {
288300
/* don't have info about pci locality */
@@ -304,18 +316,6 @@ static int mindist_map(orte_job_t *jdata)
304316
num_procs_to_assign--;
305317
}
306318
}
307-
308-
/* add the node to the map, if needed */
309-
if (!ORTE_FLAG_TEST(node, ORTE_NODE_FLAG_MAPPED)) {
310-
if (ORTE_SUCCESS > (rc = opal_pointer_array_add(jdata->map->nodes, (void*)node))) {
311-
ORTE_ERROR_LOG(rc);
312-
goto error;
313-
}
314-
ORTE_FLAG_SET(node, ORTE_NODE_FLAG_MAPPED);
315-
OBJ_RETAIN(node); /* maintain accounting on object */
316-
jdata->map->num_nodes++;
317-
}
318-
319319
}
320320

321321
/* If we get to the end of all the nodes and still have procs remaining, then

0 commit comments

Comments
 (0)