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

Add and use Mprobe, Mrecv, Improbe, Imrecv #307

Closed
wants to merge 1 commit into from
Closed

Add and use Mprobe, Mrecv, Improbe, Imrecv #307

wants to merge 1 commit into from

Conversation

bn222
Copy link
Contributor

@bn222 bn222 commented Sep 12, 2019

If probe is used to find the size of a message followed by a recv, MPI does not
guarantee that the two calls refer to the same message. On larger systems, with
many ranks communicating, different message sizes, using probe+recv results in
race conditions. Therefore, MPI introduced the Mprobe (returning a handle) which
can be passed to Mrecv to receive the same message.

@eschnett
Copy link
Contributor

It seems that MPI_Mprobe was introduced in MPI 3. If this function is used prominently, then we need to update the required version of MPI everywhere.

MPI guarantees that messages using the same communicator, originating from the same source, and having the same tag arrive in order (in the order in which they were sent). When MPI.jl calls MPI_Probe, it extracts source and tag, and uses these when calling MPI_Recv. This should ensure that the same message is matched. Can you point to a counterexample, or a relevant discussion somewhere that describes how MPI_Mprobe is necessary in this case?

@bn222
Copy link
Contributor Author

bn222 commented Sep 12, 2019

You're right, passing back the tag and source ensures that the right message is delivered, and therefor this patch isn't needed. Would it still be useful to have Mprobe and Mrecv exposed through MPI.jl for the compatible versions?

@eschnett
Copy link
Contributor

Definitively! These functions should be added. You'd need to make sure to check the MPI standard version, though – I don't recall how this is done, but there should be other example for this.

@simonbyrne simonbyrne force-pushed the master branch 2 times, most recently from 02c2bbd to 3cb2df0 Compare November 20, 2019 21:14
@simonbyrne
Copy link
Member

Superseded by #699

@simonbyrne simonbyrne closed this Jan 3, 2023
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.

3 participants