1
1

Merge pull request #4781 from karasevb/fix_rmaps_nodelist

rmaps: fixed the ordering of `mpirun` target nodes
Этот коммит содержится в:
Artem Polyakov 2018-02-02 12:29:15 -08:00 коммит произвёл GitHub
родитель bc1d7ff2cc 52e81ee4b1
Коммит 4add7cd5f5
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23

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

@ -253,13 +253,12 @@ int orte_rmaps_base_get_target_nodes(opal_list_t *allocated_nodes, orte_std_cntr
/* find the nodes in our node array and assemble them /* find the nodes in our node array and assemble them
* in daemon order if the vm was launched * in daemon order if the vm was launched
*/ */
while (NULL != (item = opal_list_remove_first(&nodes))) { for (i=0; i < orte_node_pool->size; i++) {
nptr = (orte_node_t*)item;
nd = NULL; nd = NULL;
for (i=0; i < orte_node_pool->size; i++) { if (NULL == (node = (orte_node_t*)opal_pointer_array_get_item(orte_node_pool, i))) {
if (NULL == (node = (orte_node_t*)opal_pointer_array_get_item(orte_node_pool, i))) { continue;
continue; }
} OPAL_LIST_FOREACH_SAFE(nptr, next, &nodes, orte_node_t) {
if (0 != strcmp(node->name, nptr->name)) { if (0 != strcmp(node->name, nptr->name)) {
OPAL_OUTPUT_VERBOSE((10, orte_rmaps_base_framework.framework_output, OPAL_OUTPUT_VERBOSE((10, orte_rmaps_base_framework.framework_output,
"NODE %s DOESNT MATCH NODE %s", "NODE %s DOESNT MATCH NODE %s",
@ -332,8 +331,9 @@ int orte_rmaps_base_get_target_nodes(opal_list_t *allocated_nodes, orte_std_cntr
/* reset us back to the end for the next node */ /* reset us back to the end for the next node */
nd = (orte_node_t*)opal_list_get_last(allocated_nodes); nd = (orte_node_t*)opal_list_get_last(allocated_nodes);
} }
opal_list_remove_item(&nodes, (opal_list_item_t*)nptr);
OBJ_RELEASE(nptr);
} }
OBJ_RELEASE(nptr);
} }
OBJ_DESTRUCT(&nodes); OBJ_DESTRUCT(&nodes);
/* now prune for usage and compute total slots */ /* now prune for usage and compute total slots */