Skip to content

Commit 3a69b72

Browse files
authored
Merge pull request #1788 from hjelmn/split_type
comm/split_type: allow MPI_UNDEFINED for split_type
2 parents 044c561 + 65be935 commit 3a69b72

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ompi/communicator/comm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -853,15 +853,15 @@ ompi_comm_split_type(ompi_communicator_t *comm,
853853

854854
/* check that all processors have been called with the same value */
855855
for (int i = 0 ; i < size ; ++i) {
856-
if ( results[2*i] != split_type ) {
856+
if ( results[2*i] != split_type && MPI_UNDEFINED != results[2*i] && MPI_UNDEFINED != split_type) {
857857
rc = OMPI_ERR_BAD_PARAM;
858858
goto exit;
859859
}
860860
}
861861

862862
/* how many are participating and on my node? */
863863
rc = ompi_comm_split_type_get_part (comm->c_local_group, results, &lranks, &my_size);
864-
if (0 == my_size) {
864+
if (0 == my_size && MPI_UNDEFINED != split_type) {
865865
/* should never happen */
866866
rc = OMPI_ERR_BAD_PARAM;
867867
}

0 commit comments

Comments
 (0)