Skip to content

[v4.1.x] pml/cm, pml/ob1: pack buffered sends on every MPI_Start - #14366

Open
yinliaws wants to merge 2 commits into
open-mpi:v4.1.xfrom
yinliaws:bsend-init-fix-v41
Open

[v4.1.x] pml/cm, pml/ob1: pack buffered sends on every MPI_Start#14366
yinliaws wants to merge 2 commits into
open-mpi:v4.1.xfrom
yinliaws:bsend-init-fix-v41

Conversation

@yinliaws

Copy link
Copy Markdown
Contributor

Backport of two buffered-send fixes to v4.1.x.

PML/CM packs the user buffer into its bounce buffer at MPI_Bsend_init time but not on each MPI_Start, so a restarted persistent buffered send retransmits the payload of the previous start. The MPI_Bsend_init_overtake test exercises exactly that sequence, and on v4.1.x every message after
the first carries stale data.

3226c6c / b124df4 pml/cm: pack data from application buffer in successive MPI_Start calls
429c7b7 / 78bfdae Fix buffered sends for OB1 as well.

Cherry-picked from the v5.0.x versions rather than the main originals. The main version of the first commit does apply to v4.1.x, but produces slightly different content; the v5.0.x version is the one verified here. Order matters: the OB1 commit also touches pml_cm_sendreq.h and will not apply to a pristine v4.1.x tree on its own.

Verified on v4.1.x with a two-rank reduction of that test, which needs no fabric and no scale: before the change 19 of 20 messages carry a stale payload, after it all 20 are correct. pml/ob1 over shared memory passes both before and after, so the OB1 commit is here for parity with v5.0.x rather than because this test needs it.

Scope: this is only to get the MTT runs on this branch clean.

wenduwan and others added 2 commits August 27, 2026 13:11
This patch fixes a bug exposed by MTT MPI_Bsend_init_overtake_c, where
- MPI_Bsend_init(buf, ..., req)
- MPI_Start(req)
- MPI_Wait(req, stat)
- modify(buf)
- MPI_Start(req) // this does not send the updated data
- MPI_Wait(buf)

This is because PML/CM uses a bounce buffer send_req.req_buff to pack
data from  the application buffer in MPI_Bsend_int but not MPI_Start.

This patch adds a step to pack data from the application buffer in each
MPI_Start call.

Signed-off-by: Wenduo Wang <wenduwan@amazon.com>
(cherry picked from commit 3226c6c)
(cherry picked from commit b124df4)
Signed-off-by: Yin Li <yinliq@amazon.com>
Signed-off-by: George Bosilca <gbosilca@nvidia.com>
(cherry picked from commit 429c7b7)
(cherry picked from commit 78bfdae)
Signed-off-by: Yin Li <yinliq@amazon.com>
@github-actions github-actions Bot added this to the v4.1.10 milestone Aug 27, 2026
@yinliaws

Copy link
Copy Markdown
Contributor Author

@hppritcha @janjust Could you help approve and merge this backport? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants