4.7.4. Semantics of Nonblocking Communication Operations

PreviousUpNext
Up: Nonblocking Communication Next: Multiple Completions Previous: Communication Completion

The semantics of nonblocking communication operations are defined by suitably extending the definitions in Section Semantics of Point-to-Point Communication.

Order. Nonblocking communication operations are ordered according to the execution order of the calls that initiate the communication. The nonovertaking requirement of Section Semantics of Point-to-Point Communication is extended to nonblocking communication, with this definition of order being used.


Example Message ordering for nonblocking operations.

Image file

The first send will match the first receive, even if both messages are sent before either receive is executed.

Progress. A call to MPI_WAIT that completes a receive will eventually terminate and return if a matching send has been started, unless the send is satisfied by another receive. In particular, if the matching send is nonblocking, then the receive should complete even if no call is executed by the sender to complete the send. Similarly, a call to MPI_WAIT that completes a send will eventually return if a matching receive has been started, unless the receive is satisfied by another send, and even if no call is executed to complete the receive.


Example An illustration of progress semantics.

Image file

This code should not deadlock in a correct MPI implementation. The first synchronous send must complete once the matching (nonblocking) receive is started, even though the completing wait call has not yet been reached. Thus, the sending MPI process will continue and execute the second send procedure, allowing the receiving MPI process to complete execution.

If an MPI_TEST that completes a receive is repeatedly called with the same arguments, and a matching send has been started, then the call will eventually return flag = true, unless the send is satisfied by another receive. If an MPI_TEST that completes a send is repeatedly called with the same arguments, and a matching receive has been started, then the call will eventually return flag = true, unless the receive is satisfied by another send. See also Section Progress on progress.


PreviousUpNext
Up: Nonblocking Communication Next: Multiple Completions Previous: Communication Completion


Return to MPI-4.1 Standard Index
Return to MPI Forum Home Page

(Unofficial) MPI-4.1 of November 2, 2023
HTML Generated on November 19, 2023