Skip to content

Commit 0f348fd

Browse files
committed
Fix typo in the reorder detection.
The result was that only processes with rank >= 2 were counted in the decision, so if the reorder was decide by the first two processes (as in the example provided on the issue #8854) the reorder was not correctly determined. Fixes #8854. Signed-off-by: George Bosilca <bosilca@icl.utk.edu>
1 parent eba1796 commit 0f348fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ompi/communicator/comm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,7 @@ static int ompi_comm_split_verify (ompi_communicator_t *comm, int split_type, in
785785
}
786786

787787
for (int i = 0 ; i < size ; ++i) {
788-
if (MPI_UNDEFINED == results[i * 2] || (i > 1 && results[i * 2 + 1] < results[i * 2 - 1])) {
788+
if (MPI_UNDEFINED == results[i * 2] || (i >= 1 && results[i * 2 + 1] < results[i * 2 - 1])) {
789789
*need_split = true;
790790
break;
791791
}

0 commit comments

Comments
 (0)