Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ch4: use am_tag_{send,recv} in RMA get/put #7202

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

hzhou
Copy link
Contributor

@hzhou hzhou commented Nov 7, 2024

Pull Request Description

Use am_tag_{send,recv} in RMA get/put.

This potentially works around the issue #7118

[skip warnings]

TODO

  • Get
  • Put

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.

@hzhou
Copy link
Contributor Author

hzhou commented Nov 7, 2024

test:mpich/ch4/ucx
test:,mpich/ch4/ofi/more

Move the wrapper into mpidig.h so we can use it in other paths.
Rename the interface to MPIDIG_can_do_tag(bool is_local).
Rearrange the branches for cleaner code and prepare for the next patch.
When target reply data to origin get, use am_tag_send if available.
Move the code that unflatens the datatype from
MPIDIG_put_data_target_msg_cb to put_dt_target_cmpl_cb. This allows us
to post tag_am_recv in put_dt_target_cmpl_cb.
In the MPIDIG_PUT_DT_REQ protocol, use am_tag_{send,recv} when
available.
Potentially I should squash this...
When the datatype is a struct with mixed elements, we set its basic_type
to MPI_DATATYPE_NULL. This certainly is not ideal. But for now, lets
avoid divide by 0 error in MPIR_Type_get_basic_type_elements and simply
return 0.

MPIR_Type_get_basic_type_elements is used in the OFI receive complete
event to check whether we received partial elements. We'll skip the
error checking for struct types for now.
We need call MPID_Type_commit_hook for unflattened datatypes, or UCX
won't able to send or receive an unflattened datatypes. Previously,
unflattened datatypes are only used in RMA AM and they are handled in MPIDIG.
Now with am_tag_{send,recv}, we are directly using UCX to send/recv such
unflattened types.
Without explicit 1ULL, C will default it to int, resulting overflows.
@hzhou hzhou marked this pull request as ready for review November 10, 2024 14:05
We need set is_local in a requests inside the vci critical section or
race condition may happen. Only the send requests that may go into
RNDV active messages need it set.

This fixes the occasional failures in am-only
threads/pt2pt/multisend2 test.
@hzhou
Copy link
Contributor Author

hzhou commented Nov 10, 2024

test:mpich/ch4/most
test:mpich/ch4/ofi/more

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.

1 participant