At least prevent the segfault if a proc isn't found in a sparse group
This commit was SVN r27196.
Этот коммит содержится в:
родитель
70aa879ed3
Коммит
7ac257e169
@ -263,19 +263,24 @@ static int connect_accept ( ompi_communicator_t *comm, int root,
|
|||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(OMPI_GROUP_IS_DENSE(group)) {
|
if (OMPI_GROUP_IS_DENSE(group)) {
|
||||||
ompi_proc_pack(group->grp_proc_pointers, size, nbuf);
|
ompi_proc_pack(group->grp_proc_pointers, size, nbuf);
|
||||||
} else {
|
} else {
|
||||||
proc_list = (ompi_proc_t **) calloc (group->grp_proc_count,
|
proc_list = (ompi_proc_t **) calloc (group->grp_proc_count,
|
||||||
sizeof (ompi_proc_t *));
|
sizeof (ompi_proc_t *));
|
||||||
for(i=0 ; i<group->grp_proc_count ; i++)
|
for (i=0 ; i<group->grp_proc_count ; i++) {
|
||||||
proc_list[i] = ompi_group_peer_lookup(group,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,
|
OPAL_OUTPUT_VERBOSE((3, ompi_dpm_base_output,
|
||||||
"%s dpm:orte:connect_accept adding %s to proc list",
|
"%s dpm:orte:connect_accept adding %s to proc list",
|
||||||
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
|
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
|
||||||
ORTE_NAME_PRINT(&proc_list[i]->proc_name)));
|
ORTE_NAME_PRINT(&proc_list[i]->proc_name)));
|
||||||
ompi_proc_pack(proc_list, size, nbuf);
|
ompi_proc_pack(proc_list, size, nbuf);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* pack wireup info - this is required so that all involved parties can
|
/* pack wireup info - this is required so that all involved parties can
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user