-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Problem
How does one do remote completion in a multi-threaded application? It's impossible, because one cannot do a flush on one thread at the same time as a RMA op on another thread. This is not a theoretical problem, as it has been seen by users:
- [WIP] Uncomment the use of MPI_Win_lock/MPI_Win_unlock kokkos/kokkos-remote-spaces#51
- https://www.mail-archive.com/[email protected]/msg30676.html (from our very own @devreal)
If we assert one can do remote completion in a multi-threaded application with the current features, then we need to add text to this effect, so that it's clear that Open-MPI is incorrectly blaming user programs. @hjelmn
Solution
Request-based remote completion, which I proposed a decade ago. This means we add the following functions, which take two request arguments, one for local completion, and one for remote completion. For completeness, we should make it legal to pass MPI_REQUEST_NULL when these are not needed.
The new functions would be:
- MPI_Rrput
- MPI_Rraccumulate
- MPI_Rrget_accumulate (not sure about MPI_Rrrget_accumulate)
MPI_Rrput(..,MPI_REQUEST_NULL,MPI_REQUEST_NULL) behaves like MPI_Put.
MPI_Rrput(..,&request,MPI_REQUEST_NULL) behaves like MPI_Rput.
MPI_Rrput(..,MPI_REQUEST_NULL,&request) can be locally completed with a local flush.