Re: Semantics of MPI Cancel?

Nobutoshi Sagawa (sagawa@crl.hitachi.co.jp)
Mon, 10 Mar 1997 11:55:36 +0900

Lewins, Lloyd J wrote:
>
> Process 0 Process 1
> ------------- --------------
> MPI_Init () MPI_Init ()
> MPI_Isend (...,1,...)
> MPI_Probe ()
> MPI_Cancel ()
> MPI_Wait ()
> MPI_Test_cancelled ()
> MPI_Barrier () MPI_Barrier ()
> MPI_Recv ()
>
> Assuming the probe returns true, should the cancel go ahead or not? If it
> does, then the standard is violated with regards to the recv (a probe showed a
> message exists, but the receive doesn't get it). If it doesn't,
> the standard is violated with regards to the cancel (the wait is not
> local). Catch 22.
>
> I believe that the send should be canceled, and that we need to add clarifying
> text to probe (the recv gets the message, assuming no other recv has grabbed
> it AND the send was not successfully canceled).
>

It would seem to me that the standard is NOT saying "a probed message
must be received by the immediately following MPI_Recv". It merely says
"MPI_Probe must give the same result as if the corresponding MPI_Recv
were issued at the same point". If I understand the definition
correctly, it should be OK that the MPI_Probe() returns true, AND the
MPI_Recv() still fails to receive the message.

Besides, the MPI_Probe() may either return true or block in the above
example, depending on the order the cancel and probe are actually
processed.

I appreciate if anybody could correct me if I am wrong, because we are
under a struggle to decide how to implement MPI_Cancel on our machine.

---------------------------------------------------------------
Nobutoshi Sagawa
Processor System Department
Central Research Laboratory, Hitachi Ltd.
tel: +81-423-23-1111 ext 3850
fax: +81-423-27-7743
---------------------------------------------------------------