1
1

This will break systems like orcm, but we aren't trying to support those any more - so put the nodes back in their daemon-indexed position. Will continue working to reduce search requirements in other parts of the code

This commit was SVN r27038.
Этот коммит содержится в:
Ralph Castain 2012-08-14 22:26:40 +00:00
родитель 481ed4e292
Коммит 229e3f9b2a

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

@ -451,14 +451,11 @@ int orte_util_decode_daemon_nodemap(opal_byte_object_t *bo)
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);
return rc; return rc;
} }
/* do we already have this node? Nodes don't change /* do we already have this node? */
* position in the node_pool array, so take advantage if (NULL == (node = (orte_node_t*)opal_pointer_array_get_item(orte_node_pool, vpid))) {
* of that fact
*/
if (NULL == (node = (orte_node_t*)opal_pointer_array_get_item(orte_node_pool, i))) {
node = OBJ_NEW(orte_node_t); node = OBJ_NEW(orte_node_t);
node->name = name; node->name = name;
opal_pointer_array_set_item(orte_node_pool, i, node); opal_pointer_array_set_item(orte_node_pool, vpid, node);
} else { } else {
free(name); free(name);
} }
@ -1169,37 +1166,12 @@ int orte_util_decode_daemon_pidmap(opal_byte_object_t *bo)
proc->name.vpid = i; proc->name.vpid = i;
opal_pointer_array_set_item(jdata->procs, i, proc); opal_pointer_array_set_item(jdata->procs, i, proc);
} }
/* we can't just lookup the node in the node pool by daemon vpid /* lookup the node - should always be present */
* as the daemons aren't stored that way - this was done because if (NULL == (node = (orte_node_t*)opal_pointer_array_get_item(orte_node_pool, nodes[i]))) {
* when holes exist in daemon vpids, we can generate huge orte_node_pool
* arrays even when only a few daemons actually exist. So we have to
* search for the vpid in the array
*/
node = NULL;
for (j=0; j < orte_node_pool->size; j++) {
if (NULL == (nptr = (orte_node_t*)opal_pointer_array_get_item(orte_node_pool, j))) {
continue;
}
if (nptr->daemon->name.vpid == nodes[i]) {
node = nptr;
break;
}
}
if (NULL == node) {
/* this should never happen, but protect ourselves anyway */ /* this should never happen, but protect ourselves anyway */
node = OBJ_NEW(orte_node_t); node = OBJ_NEW(orte_node_t);
/* find the daemon */ /* get the daemon */
found = false; if (NULL == (pptr = (orte_proc_t*)opal_pointer_array_get_item(daemons->procs, nodes[i]))) {
for (j=0; j < daemons->procs->size; j++) {
if (NULL == (pptr = (orte_proc_t*)opal_pointer_array_get_item(daemons->procs, j))) {
continue;
}
if (pptr->name.vpid == nodes[i]) {
found = true;
break;
}
}
if (!found) {
pptr = OBJ_NEW(orte_proc_t); pptr = OBJ_NEW(orte_proc_t);
pptr->name.jobid = ORTE_PROC_MY_NAME->jobid; pptr->name.jobid = ORTE_PROC_MY_NAME->jobid;
pptr->name.vpid = nodes[i]; pptr->name.vpid = nodes[i];