<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body>
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:10pt;color:#333399;font-family:Tahoma,Geneva,sans-serif;" dir="ltr">
<p>Thanks, Jeff!</p>
<p><br>
</p>
<p>Matthieu<br>
</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Jeff Hammond <jeff.science@gmail.com><br>
<b>Sent:</b> Wednesday, September 6, 2017 10:33:35 PM<br>
<b>To:</b> MPICH<br>
<b>Subject:</b> Re: [mpich-discuss] MPI_Rsend advantage</font>
<div> </div>
</div>
<div>
<div dir="ltr">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.<br>
<br>
In Ch4, the code paths for Send and Rsend are identical in src/mpid/ch4/src/ch4_send.h.
<div><br>
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.</div>
<div><br>
Jeff<br>
<br>
On Wed, Sep 6, 2017 at 12:58 PM, Dorier, Matthieu <<a href="mailto:mdorier@anl.gov">mdorier@anl.gov</a>> wrote:<br>
><br>
> 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.<br>
><br>
><br>
> 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.<br>
><br>
><br>
> No my question is, what does Mpich optimizes within MPI_Rsend; what is done differently from MPI_Send?<br>
><br>
><br>
> Thanks,<br>
><br>
><br>
> Matthieu<br>
><br>
> ________________________________<br>
> From: Atchley, Scott <<a href="mailto:atchleyes@ornl.gov">atchleyes@ornl.gov</a>><br>
> Sent: Wednesday, September 6, 2017 7:41:54 PM<br>
> To: <a href="mailto:discuss@mpich.org">discuss@mpich.org</a><br>
> Subject: Re: [mpich-discuss] MPI_Rsend advantage<br>
> <br>
> 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.<br>
><br>
> My question is, “How do you know it has been posted?”<br>
><br>
><br>
> > On Sep 6, 2017, at 6:21 AM, Dorier, Matthieu <<a href="mailto:mdorier@anl.gov">mdorier@anl.gov</a>> wrote:<br>
> ><br>
> > Hi,<br>
> ><br>
> > 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?<br>
> ><br>
> > Thanks,<br>
> ><br>
> > Matthieu<br>
> > _______________________________________________<br>
> > discuss mailing list <a href="mailto:discuss@mpich.org">discuss@mpich.org</a><br>
> > To manage subscription options or unsubscribe:<br>
> > <a href="https://lists.mpich.org/mailman/listinfo/discuss">https://lists.mpich.org/mailman/listinfo/discuss</a><br>
><br>
> _______________________________________________<br>
> discuss mailing list <a href="mailto:discuss@mpich.org">discuss@mpich.org</a><br>
> To manage subscription options or unsubscribe:<br>
> <a href="https://lists.mpich.org/mailman/listinfo/discuss">https://lists.mpich.org/mailman/listinfo/discuss</a><br>
><br>
> _______________________________________________<br>
> discuss mailing list <a href="mailto:discuss@mpich.org">discuss@mpich.org</a><br>
> To manage subscription options or unsubscribe:<br>
> <a href="https://lists.mpich.org/mailman/listinfo/discuss">https://lists.mpich.org/mailman/listinfo/discuss</a><br>
<br>
<br>
<br>
<br>
--<br>
Jeff Hammond<br>
<a href="mailto:jeff.science@gmail.com">jeff.science@gmail.com</a><br>
<a href="http://jeffhammond.github.io/">http://jeffhammond.github.io/</a><br>
<div class="gmail_extra"></div>
</div>
</div>
</div>
</body>
</html>