1
1

At least prevent the segfault if a proc isn't found in a sparse group

This commit was SVN r27196.
Этот коммит содержится в:
Ralph Castain 2012-08-31 15:13:52 +00:00
родитель 70aa879ed3
Коммит 7ac257e169

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

@ -268,8 +268,12 @@ static int connect_accept ( ompi_communicator_t *comm, int root,
} else {
proc_list = (ompi_proc_t **) calloc (group->grp_proc_count,
sizeof (ompi_proc_t *));
for(i=0 ; i<group->grp_proc_count ; i++)
proc_list[i] = ompi_group_peer_lookup(group,i);
for (i=0 ; i<group->grp_proc_count ; i++) {
if (NULL == (proc_list[i] = ompi_group_peer_lookup(group,i))) {
ORTE_ERROR_LOG(ORTE_ERR_NOT_FOUND);
rc = ORTE_ERR_NOT_FOUND;
goto exit;
}
OPAL_OUTPUT_VERBOSE((3, ompi_dpm_base_output,
"%s dpm:orte:connect_accept adding %s to proc list",
@ -277,6 +281,7 @@ static int connect_accept ( ompi_communicator_t *comm, int root,
ORTE_NAME_PRINT(&proc_list[i]->proc_name)));
ompi_proc_pack(proc_list, size, nbuf);
}
}
/* pack wireup info - this is required so that all involved parties can
* discover how to talk to each other. For example, consider the case