[mpich-discuss] Semantics of MPI_Cancel

Matthieu Dorier matthieu.dorier at irisa.fr
Wed Aug 7 19:16:12 CDT 2013


Ah great, thanks!

Matthieu

----- Mail original -----
> De: "Rajeev Thakur" <thakur at mcs.anl.gov>
> À: discuss at mpich.org
> Envoyé: Mercredi 7 Août 2013 16:34:18
> Objet: Re: [mpich-discuss] Semantics of MPI_Cancel
> 
> MPI_Cancel will succeed only if the receive can be canceled, i.e.,
> not part of the message has already been received into the receive
> buffer. So, if the cancel succeeds, the send will match the next
> receive. You have to check the error code returned by cancel.
> 
> On Aug 7, 2013, at 4:18 PM, Matthieu Dorier wrote:
> 
> > So either there is no way to know which MPI_Send will be matched,
> > since even with
> > MPI_Irecv(req); MPI_Test(flag,req); if(!flag) {MPI_Cancel(req)}
> > MPI_Recv()
> > the MPI_Irecv could have completed between the MPI_Test and the
> > MPI_Cancel...
> > 
> > Or does the content of the MPI_Irecv, which is supposed to have
> > been put in the user-provided buffer, gets transferred into the
> > buffer of the next MPI_Recv upon cancellation of the MPI_Irecv?
> > 
> > Thanks,
> > 
> > Matthieu
> > 
> > ----- Mail original -----
> >> De: "Rajeev Thakur" <thakur at mcs.anl.gov>
> >> À: discuss at mpich.org
> >> Envoyé: Mercredi 7 Août 2013 16:10:02
> >> Objet: Re: [mpich-discuss] Semantics of MPI_Cancel
> >> 
> >> You canceled the recv, not the send. The send will still go
> >> through
> >> and match the first available receive that can be matched.
> >> 
> >> On Aug 7, 2013, at 3:25 PM, Matthieu Dorier wrote:
> >> 
> >>> Hi,
> >>> 
> >>> Suppose process 0 does the following
> >>> MPI_Irecv(...req)
> >>> MPI_Cancel(req)
> >>> MPI_Recv
> >>> 
> >>> and process 1 does
> >>> MPI_Send
> >>> MPI_Send
> >>> 
> >>> Does process 0 receives the data from the first or the second
> >>> MPI_Send?
> >>> (I'd tend to say the second, but I'd like a confirmation).
> >>> 
> >>> Thanks!
> >>> 
> >>> Matthieu Dorier
> >>> PhD student at ENS Cachan Brittany and IRISA
> >>> http://people.irisa.fr/Matthieu.Dorier
> >>> _______________________________________________
> >>> discuss mailing list     discuss at mpich.org
> >>> To manage subscription options or unsubscribe:
> >>> https://lists.mpich.org/mailman/listinfo/discuss
> >> 
> >> _______________________________________________
> >> discuss mailing list     discuss at mpich.org
> >> To manage subscription options or unsubscribe:
> >> https://lists.mpich.org/mailman/listinfo/discuss
> >> 
> > _______________________________________________
> > discuss mailing list     discuss at mpich.org
> > To manage subscription options or unsubscribe:
> > https://lists.mpich.org/mailman/listinfo/discuss
> 
> _______________________________________________
> discuss mailing list     discuss at mpich.org
> To manage subscription options or unsubscribe:
> https://lists.mpich.org/mailman/listinfo/discuss
> 



More information about the discuss mailing list