Skip to content

Commit 74de336

Browse files
committed
Create the remote_group to allow the creation of c_local_comm
Without the remote_group the communicator is considered as an intracomm, and will lack the proper infrastructure necessary during the MPI_Comm_split_type. Signed-off-by: George Bosilca <bosilca@icl.utk.edu>
1 parent 3484445 commit 74de336

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

ompi/communicator/comm.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,16 @@ int ompi_comm_set_nb (ompi_communicator_t **ncomm, ompi_communicator_t *oldcomm,
241241
newcomm->c_assertions = 0;
242242

243243
/* Set remote group and duplicate the local comm, if applicable */
244+
if ((NULL == remote_group) && (NULL != remote_ranks)) {
245+
/* determine how the list of local_rank can be stored most
246+
efficiently */
247+
ret = ompi_group_incl(oldcomm->c_remote_group, remote_size,
248+
remote_ranks, &newcomm->c_remote_group);
249+
if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) {
250+
return ret;
251+
}
252+
remote_group = newcomm->c_remote_group;
253+
}
244254
if ( NULL != remote_group ) {
245255
ompi_communicator_t *old_localcomm;
246256

0 commit comments

Comments
 (0)