A program where two threads block, waiting on the same
request, is erroneous. Similarly, the same request cannot appear in
the array of requests of two concurrent MPI_WAIT{ANY
SOME
ALL}
calls.
In MPI-/, a request can only be completed once. Any combination of
wait or test which violates this rule is erroneous.
-
- Rationale.
This is consistent with the view that a multithreaded execution
corresponds to an interleaving of the MPI-/ calls.
In a single threaded implementation, once a wait is
posted on a request
the request handle will be nullified before it is possible to
post a second wait on the same handle.
With threads, an MPI_WAIT{ANY
SOME
ALL}
may be blocked without having nullified its request(s) so it
becomes the user's responsibility to avoid using the same request
in an MPI_WAIT on another thread.
This constraint also simplifies
implementation, as only one thread will be blocked on any
communication or I/O event.(End of rationale.)
MPI-Standard for MARMOT