## 3.2.9. Clarification of MPI_PROBE and MPI_IPROBE

Up: MPI-1.0 and MPI-1.1 Clarifications Next: Minor Corrections Previous: Clarification of Error Behavior of Attribute Callback Functions

Page 52, lines 1 thru 3 (of MPI-1.1, the June 12, 1995 version without changebars) become:

``A subsequent receive executed with the same communicator, and the source and tag returned in status by MPI_IPROBE will receive the message that was matched by the probe, if no other intervening receive occurs after the probe, and the send is not successfully cancelled before the receive.''

Rationale.

The following program shows that the MPI-1 definitions of cancel and probe are in conflict:

    Process 0                        Process 1
    ----------                       ----------
    MPI_Init();                      MPI_Init();
    MPI_Isend(dest=1);
                                     MPI_Probe();
    MPI_Barrier();                   MPI_Barrier();
    MPI_Cancel();
    MPI_Wait();
    MPI_Test_cancelled();
    MPI_Barrier();                   MPI_Barrier();
                                     MPI_Recv();

Since the send has been cancelled by process 0, the wait must be local (page 54, line 13) and must return before the matching receive. For the wait to be local, the send must be successfully cancelled, and therefore must not match the receive in process 1 (page 54 line 29).

However, it is clear that the probe on process 1 must eventually detect an incoming message. Page 52 line 1 makes it clear that the subsequent receive by process 1 must return the probed message.

The above are clearly contradictory, and therefore the text ``... and the send is not successfully cancelled before the receive'' must be added to line 3 of page 54.

An alternative solution (rejected) would be to change the semantics of cancel so that the call is not local if the message has been probed. This adds complexity to implementations, and adds a new concept of ``state'' to a message (probed or not). It would, however, preserve the feature that a blocking receive after a probe is local.

( End of rationale.)

Up: MPI-1.0 and MPI-1.1 Clarifications Next: Minor Corrections Previous: Clarification of Error Behavior of Attribute Callback Functions

Return to MPI-2 Standard Index
Return to MPI 1.1 Standard Index
Return to MPI Forum Home Page

MPI-2.0 of July 18, 1997
HTML Generated on September 10, 2001