Massimiliano Del Matto wrote:
> On MPI 1.1, chapter 3 - par.7 - Nonblocking communication, is written
> the following:
> "Note that a synchronous, nonblocking send may complete, if matched by
> a nonblocking receive, before the receive complete call occurs.".
> Does it means if it's matched by a blocking receive, the nonblocking
> synchronous send will complete AFTER the receive complete call occurs?
Not necessarily. The completion of a send merely means that the
destination has posted a matching receive, and that it has *started*
receiving the data, but has not necessarily completed. Let me quote
what I found in the standard to support this (section 3.4, Communication
Modes):
A send that uses the synchronous mode can be started whether or not a
matching receive was posted. However, the send will complete
successfully only if a matching receive is posted, and the receive
operation has started to receive the message sent by the synchronous send.
> I'd like to know, because I need to detect - at an instant of time -
> if there are some intransit send messages over the network.
>
> So, if the above, I could do that with some MPI_Test(s) on the
> MPI_Issend(s) still not completed! Is it right?
As stated above, checking completion of MPI_Issend's indicates that a
receive has matched and data has started flowing, but not that the data
has completely arrived. Realistically, for small messages, this will
probably mean that the receive has completed. But this is not at all
guaranteed, and for very large messages, not likely.
As far as I know, there is no way to _guarantee_ that absolutely no data
is on the wire at a given time for any message size.
Andrew
|