Skip to content

Commit 73c4aac

Browse files
authored
Merge pull request #6750 from brminich/topic/all2all_linear_sync_fix_v4.0
COLL/BASE: Fix linear sync all2all - v4.0.x
2 parents e01005a + adba7f5 commit 73c4aac

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ompi/mca/coll/base/coll_base_alltoall.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -398,22 +398,22 @@ int ompi_coll_base_alltoall_intra_linear_sync(const void *sbuf, int scount,
398398
prcv = (char *) rbuf;
399399
psnd = (char *) sbuf;
400400

401-
/* Post first batch or ireceive and isend requests */
401+
/* Post first batch of irecv and isend requests */
402402
for (nreqs = 0, nrreqs = 0, ri = (rank + 1) % size; nreqs < total_reqs;
403403
ri = (ri + 1) % size, ++nrreqs) {
404-
nreqs++;
405404
error = MCA_PML_CALL(irecv
406405
(prcv + (ptrdiff_t)ri * rext, rcount, rdtype, ri,
407406
MCA_COLL_BASE_TAG_ALLTOALL, comm, &reqs[nreqs]));
407+
nreqs++;
408408
if (MPI_SUCCESS != error) { line = __LINE__; goto error_hndl; }
409409
}
410410
for (nsreqs = 0, si = (rank + size - 1) % size; nreqs < 2 * total_reqs;
411-
si = (si + size - 1) % size, ++nsreqs) {
412-
nreqs++;
411+
si = (si + size - 1) % size, ++nsreqs) {
413412
error = MCA_PML_CALL(isend
414413
(psnd + (ptrdiff_t)si * sext, scount, sdtype, si,
415414
MCA_COLL_BASE_TAG_ALLTOALL,
416415
MCA_PML_BASE_SEND_STANDARD, comm, &reqs[nreqs]));
416+
nreqs++;
417417
if (MPI_SUCCESS != error) { line = __LINE__; goto error_hndl; }
418418
}
419419

0 commit comments

Comments
 (0)