Skip to content

ch4/ofi: query header size instead of parameter - #7900

Open
colleeneb wants to merge 2 commits into
pmodels:mainfrom
colleeneb:issue_7884
Open

ch4/ofi: query header size instead of parameter#7900
colleeneb wants to merge 2 commits into
pmodels:mainfrom
colleeneb:issue_7884

Conversation

@colleeneb

@colleeneb colleeneb commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Pull Request Description

This changes MPIDI_OFI_do_am_isend_pipeline to query the header size from MPIDI_OFI_AM_SREQ_HDR
instead 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 theam_data pointer. However, in some cases like in MPIDI_OFI_handle_deferred_ops
the 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

  • Provide Description
    Particularly focus on why, not what. Reference background, issues, test failures, xfail entries, etc.
  • Commits Follow Good Practice
    Commits are self-contained and do not do two things at once.
    Commit message is of the form: module: short description
    Commit message explains what's in the commit.
  • Passes All Tests
    Whitespace checker. Warnings test. Additional tests via comments.
  • Contribution Agreement
    For non-Argonne authors, check contribution agreement.
    If necessary, request an explicit comment from your companies PR approval manager.

@colleeneb
colleeneb force-pushed the issue_7884 branch 5 times, most recently from f3bf92d to 966f32d Compare July 23, 2026 20:41
Comment thread src/mpid/ch4/netmod/ofi/ofi_am_impl.h Outdated
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;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can directly use MPIDI_OFI_AM_SREQ_HDR(sreq, am_hdr_sz) here, right?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed! I will update it soon.

@hzhou

hzhou commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

test:mpich/ch4/ofi ✔️

@hzhou

hzhou commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

@colleeneb can you confirm this PR still fixes the issue?

@colleeneb

Copy link
Copy Markdown
Collaborator Author

I'll test soon (at least by Monday at the latest) and let you know.

@colleeneb

colleeneb commented Jul 27, 2026

Copy link
Copy Markdown
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.)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants