[mpich-discuss] MPI_Rsend advantage

Dorier, Matthieu mdorier at anl.gov
Wed Sep 6 15:51:52 CDT 2017


Thanks, Jeff!


Matthieu

________________________________
From: Jeff Hammond <jeff.science at gmail.com>
Sent: Wednesday, September 6, 2017 10:33:35 PM
To: MPICH
Subject: Re: [mpich-discuss] MPI_Rsend advantage

I skimmed Ch3 and there is no difference for rendezvous.  For eager, the Rsend doesn't bother with the unnecessary MPI_THREAD_MULTIPLE deadlock check and the short eager optimization (payload in header).  Thus, I would expect no benefit due to Rsend and potentially a performance loss for small messages, if the short eager path is worthwhile.

In Ch4, the code paths for Send and Rsend are identical in src/mpid/ch4/src/ch4_send.h.

Because most applications and benchmarks use the normal Send-Recv (including nonblocking) variants, this is where the optimization work happens.  Unless you use an implementation that documents an optimized implementation of Rsend, I would not bother using it.

Jeff

On Wed, Sep 6, 2017 at 12:58 PM, Dorier, Matthieu <mdorier at anl.gov<mailto:mdorier at anl.gov>> wrote:
>
> Let's say process A MPI_Sends a message to process B, as a result process B posts an MPI_Irecv then MPI_Sends a message to A to notify it that the receive was posted, following which A calls MPI_Rsend.
>
>
> It's a dumb example, but just to say that in some scenarios it's possible to know in advance that an MPI_Recv or an MPI_Irecv was posted.
>
>
> No my question is, what does Mpich optimizes within MPI_Rsend; what is done differently from MPI_Send?
>
>
> Thanks,
>
>
> Matthieu
>
> ________________________________
> From: Atchley, Scott <atchleyes at ornl.gov<mailto:atchleyes at ornl.gov>>
> Sent: Wednesday, September 6, 2017 7:41:54 PM
> To: discuss at mpich.org<mailto:discuss at mpich.org>
> Subject: Re: [mpich-discuss] MPI_Rsend advantage
>
> If you can guarantee that it is posted, then you can guarantee that it will match. If you cannot guarantee that it is posted and will match, then it may be placed in the unexpected buffer and will need to be copied into the final location once the receive is posted.
>
> My question is, “How do you know it has been posted?”
>
>
> > On Sep 6, 2017, at 6:21 AM, Dorier, Matthieu <mdorier at anl.gov<mailto:mdorier at anl.gov>> wrote:
> >
> > Hi,
> >
> > Out of curiosity, what gain is there to using MPI_Rsend instead of MPI_Send when I know that the receiver has posted a receive? Do I avoid a rendez-vous protocol? Do I avoid a buffer copy somewhere?
> >
> > Thanks,
> >
> > Matthieu
> > _______________________________________________
> > discuss mailing list     discuss at mpich.org<mailto:discuss at mpich.org>
> > To manage subscription options or unsubscribe:
> > https://lists.mpich.org/mailman/listinfo/discuss
>
> _______________________________________________
> discuss mailing list     discuss at mpich.org<mailto:discuss at mpich.org>
> To manage subscription options or unsubscribe:
> https://lists.mpich.org/mailman/listinfo/discuss
>
> _______________________________________________
> discuss mailing list     discuss at mpich.org<mailto:discuss at mpich.org>
> To manage subscription options or unsubscribe:
> https://lists.mpich.org/mailman/listinfo/discuss




--
Jeff Hammond
jeff.science at gmail.com<mailto:jeff.science at gmail.com>
http://jeffhammond.github.io/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20170906/1bfe9a54/attachment.html>
-------------- next part --------------
_______________________________________________
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