ch4/ofi: query header size instead of parameter - #7900
Open
colleeneb wants to merge 2 commits into
Open
Conversation
colleeneb
force-pushed
the
issue_7884
branch
5 times, most recently
from
July 23, 2026 20:41
f3bf92d to
966f32d
Compare
hzhou
reviewed
Jul 23, 2026
| send_req->am_hdr = (char *) pack_buffer + sizeof(MPIDI_OFI_am_header_t); | ||
| if (offset == 0) { | ||
| send_req->am_data = (char *) send_req->am_hdr + am_hdr_sz; | ||
| send_req->am_data = (char *) send_req->am_hdr + real_am_hdr_sz; |
Collaborator
There was a problem hiding this comment.
We can directly use MPIDI_OFI_AM_SREQ_HDR(sreq, am_hdr_sz) here, right?
Collaborator
Author
There was a problem hiding this comment.
Indeed! I will update it soon.
Collaborator
|
test:mpich/ch4/ofi ✔️ |
Collaborator
|
@colleeneb can you confirm this PR still fixes the issue? |
Collaborator
Author
|
I'll test soon (at least by Monday at the latest) and let you know. |
Collaborator
Author
|
Yes, I confirm still fixes the issue. (I needed to add in the fix for the assertion (#7881) too, but that's handled in a different PR.) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Description
This changes
MPIDI_OFI_do_am_isend_pipelineto query the header size fromMPIDI_OFI_AM_SREQ_HDRinstead of using a function parameter, so the header size is correct.
In
MPIDI_OFI_do_am_isend_pipeline, the header size is read from a function parameter,and this is used to compute the
am_datapointer. However, in some cases like in MPIDI_OFI_handle_deferred_opsthe parameter is sent in hard-coded to 0. This can be a problem if there actually is a header, since
if there is a header but 0 is used as the size the data will overwrite the header (since then
send_req->am_data == (char *) send_req->am_hdr).This is a potential fix for Issue #7884 . There are more details in the Issue about the case that leads to this.
(Let me know if I should move deatils here, I am trying to keep the descriptions short and clear.)
Author Checklist
Particularly focus on why, not what. Reference background, issues, test failures, xfail entries, etc.
Commits are self-contained and do not do two things at once.
Commit message is of the form:
module: short descriptionCommit message explains what's in the commit.
Whitespace checker. Warnings test. Additional tests via comments.
For non-Argonne authors, check contribution agreement.
If necessary, request an explicit comment from your companies PR approval manager.