LAM/MPI logo

LAM/MPI Development Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Brian Barrett (brbarret_at_[hidden])
Date: 2007-11-24 14:24:08


On Nov 24, 2007, at 11:06 AM, Philippe Combes wrote:

> I have a strange behaviour with an Irecv cancel.
>
> First I MPI_Test for the completion of the request.
> As it returns false, I MPI_Cancel the request.
> The MPI_Cancel call is successful, but the rq_flags of the request
> remain 0
> (instead of 2)
> I stepped into the code of MPI_Cancel, and I found that my request
> could not be
> processed. Indeed it is such as
> rq_type == 4 // LAM_RQIRECV
> rq_state == 4 // LAM_RQFSACTIVE
> and this case is not managed. Why ?
>
> You must know that the matching send has been posted before the
> first MPI_Test
> on the recv request, but it has not yet completed.
> It is actually cancelled too, but that the cancel occurs before or
> after the
> cancel of the recv request makes no difference.

In LAM/MPI, neither sends or receives can be cancelled once they've
gone to the active state. A send request goes into the active state
as soon as it's at the front of the line -- each transport has a
slightly different definition of when this occurs, but the bottom line
is that send requests move to the active state fairly rapidly, so
canceling sends rarely works. On the receive side, receives enter the
active state when the receive is matched (either by a short message or
a rendezvous header).

Note that calling MPI_CANCEL on a request does not actually mean that
it's cancelled. You have to call MPI_TEST_CANCELLED on the request to
determine if the MPI either 1) has cancelled the request or 2) will
complete the communication.

Brian

-- 
   Brian Barrett
   LAM/MPI Developer
   Make today a LAM/MPI day!