From 5fb3e0a9b696622511e8c557aa77061991e188a8 Mon Sep 17 00:00:00 2001 From: Boris Karasev Date: Wed, 21 Dec 2016 06:28:49 +0200 Subject: [PATCH] rmaps/mindist: fix pmix errors Fixed the case were only part of the nodes in the allocation are used by the applicaton proccesses. Force PMIx nodemap key to only contain nodes that are actually used by the application proccesses. Signed-off-by: Boris Karasev --- orte/mca/rmaps/mindist/rmaps_mindist_module.c | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/orte/mca/rmaps/mindist/rmaps_mindist_module.c b/orte/mca/rmaps/mindist/rmaps_mindist_module.c index 7cf18e5b39..ca05cc26d9 100644 --- a/orte/mca/rmaps/mindist/rmaps_mindist_module.c +++ b/orte/mca/rmaps/mindist/rmaps_mindist_module.c @@ -280,9 +280,21 @@ static int mindist_map(orte_job_t *jdata) break; } } - opal_output_verbose(2, orte_rmaps_base_framework.framework_output, - "mca:rmaps:mindist: assigned %d procs to node %s", - j, node->name); + if (0 != j) { + /* add the node to the map, if needed */ + if (!ORTE_FLAG_TEST(node, ORTE_NODE_FLAG_MAPPED)) { + if (ORTE_SUCCESS > (rc = opal_pointer_array_add(jdata->map->nodes, (void*)node))) { + ORTE_ERROR_LOG(rc); + goto error; + } + ORTE_FLAG_SET(node, ORTE_NODE_FLAG_MAPPED); + OBJ_RETAIN(node); /* maintain accounting on object */ + jdata->map->num_nodes++; + } + opal_output_verbose(2, orte_rmaps_base_framework.framework_output, + "mca:rmaps:mindist: assigned %d procs to node %s", + j, node->name); + } } else { if (hwloc_get_nbobjs_by_type(node->topology, HWLOC_OBJ_SOCKET) > 1) { /* don't have info about pci locality */ @@ -304,18 +316,6 @@ static int mindist_map(orte_job_t *jdata) num_procs_to_assign--; } } - - /* add the node to the map, if needed */ - if (!ORTE_FLAG_TEST(node, ORTE_NODE_FLAG_MAPPED)) { - if (ORTE_SUCCESS > (rc = opal_pointer_array_add(jdata->map->nodes, (void*)node))) { - ORTE_ERROR_LOG(rc); - goto error; - } - ORTE_FLAG_SET(node, ORTE_NODE_FLAG_MAPPED); - OBJ_RETAIN(node); /* maintain accounting on object */ - jdata->map->num_nodes++; - } - } /* If we get to the end of all the nodes and still have procs remaining, then