Merge pull request #1197 from artpol84/comm_create_fix
Fix ompi_comm_create when source communicator is inter-communicator.
Этот коммит содержится в:
Коммит
645d4099d4
@ -278,6 +278,7 @@ int ompi_comm_create ( ompi_communicator_t *comm, ompi_group_t *group,
|
|||||||
int *allranks=NULL;
|
int *allranks=NULL;
|
||||||
int *rranks=NULL;
|
int *rranks=NULL;
|
||||||
int rc = OMPI_SUCCESS;
|
int rc = OMPI_SUCCESS;
|
||||||
|
ompi_group_t *remote_group = NULL;
|
||||||
|
|
||||||
/* silence clang warning. newcomm should never be NULL */
|
/* silence clang warning. newcomm should never be NULL */
|
||||||
if (OPAL_UNLIKELY(NULL == newcomm)) {
|
if (OPAL_UNLIKELY(NULL == newcomm)) {
|
||||||
@ -286,6 +287,7 @@ int ompi_comm_create ( ompi_communicator_t *comm, ompi_group_t *group,
|
|||||||
|
|
||||||
if ( OMPI_COMM_IS_INTER(comm) ) {
|
if ( OMPI_COMM_IS_INTER(comm) ) {
|
||||||
int tsize;
|
int tsize;
|
||||||
|
remote_group = &ompi_mpi_group_null.group;
|
||||||
|
|
||||||
tsize = ompi_comm_remote_size(comm);
|
tsize = ompi_comm_remote_size(comm);
|
||||||
allranks = (int *) malloc ( tsize * sizeof(int));
|
allranks = (int *) malloc ( tsize * sizeof(int));
|
||||||
@ -348,8 +350,8 @@ int ompi_comm_create ( ompi_communicator_t *comm, ompi_group_t *group,
|
|||||||
comm->error_handler, /* error handler */
|
comm->error_handler, /* error handler */
|
||||||
false, /* dont copy the topo */
|
false, /* dont copy the topo */
|
||||||
group, /* local group */
|
group, /* local group */
|
||||||
NULL /* remote group */
|
remote_group); /* remote group */
|
||||||
);
|
|
||||||
if ( OMPI_SUCCESS != rc ) {
|
if ( OMPI_SUCCESS != rc ) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user