<div dir="ltr"><div>The argument that there is no portable way to detect completion is false. It is completely portable to detect completion using only a subset of processes, and there may even be use cases for it.</div><div><br></div><div>For example, an application can use Ibarrier to determine whether all processes have reached a phase of the program but only detect this at one rank.</div><div><br></div><div>MPI_Request req; </div><div>{</div><div></div><div> foo();</div><div> MPI_Ibarrier(comm, &req);</div><div> if (rank) MPI_Request_free(&req);</div><div> ..</div><div>}</div><div>if (!rank) {</div><div> MPI_Wait(&req);</div><div> printf("foo finished everywhere\n");</div><div>}</div><div><br></div><div>Similarly, one might have a bunch of Ireduce operations where the root is the only rank that tests completion, after which it notifies all processes that the bunch has completed.</div><div><br></div><div>Are there any implementations that can't trivially support this? I recall that MPICH implements requests as nothing more than pointers to internal state, and I assume that Open-MPI does something similar.</div><div><br></div><div>Jeff</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Aug 8, 2020 at 9:45 AM Bangalore, Purushotham via mpi-forum <<a href="mailto:mpi-forum@lists.mpi-forum.org">mpi-forum@lists.mpi-forum.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
I see discussion of this issue here: <br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<a href="https://github.com/mpi-forum/mpi-forum-historic/issues/83" id="gmail-m_-7361355248288129080LPlnk160777" target="_blank">https://github.com/mpi-forum/mpi-forum-historic/issues/83</a><br>
</div>
<div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Puri<br>
</div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_-7361355248288129080divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> mpi-forum <<a href="mailto:mpi-forum-bounces@lists.mpi-forum.org" target="_blank">mpi-forum-bounces@lists.mpi-forum.org</a>> on behalf of Balaji, Pavan via mpi-forum <<a href="mailto:mpi-forum@lists.mpi-forum.org" target="_blank">mpi-forum@lists.mpi-forum.org</a>><br>
<b>Sent:</b> Saturday, August 8, 2020 8:51 AM<br>
<b>To:</b> <a href="mailto:mpi-forum@lists.mpi-forum.org" target="_blank">mpi-forum@lists.mpi-forum.org</a> <<a href="mailto:mpi-forum@lists.mpi-forum.org" target="_blank">mpi-forum@lists.mpi-forum.org</a>><br>
<b>Cc:</b> Balaji, Pavan <<a href="mailto:balaji@anl.gov" target="_blank">balaji@anl.gov</a>><br>
<b>Subject:</b> [Mpi-forum] MPI_Request_free restrictions</font>
<div> </div>
</div>
<div style="overflow-wrap: break-word;">Folks,
<div><br>
</div>
<div>Does someone remember why we disallowed users from calling MPI_Request_free on nonblocking collective requests? I remember the reasoning for not allowing cancel (i.e., the operation might have completed on some processes, but not all), but not
for Request_free. AFAICT, allowing the users to free the request doesn’t make any difference to the MPI library. The MPI library would simply maintain its own refcount to the request and continue forward till the operation completes. One of our users would
like to free NBC requests so they don’t have to wait for the operation to complete in some situations.</div>
<div><br>
</div>
<div>Unfortunately, when I added the Rput/Rget operations in the RMA chapter, I copy-pasted that text into RMA as well without thinking too hard about it. My bad! Either the RMA committee missed it too, or they thought of a reason that I can’t think
of now.</div>
<div><br>
</div>
<div>Can someone clarify or remind me what the reason was?</div>
<div><br>
</div>
<div>Regards,</div>
<div><br>
</div>
<div> — Pavan</div>
<div><br>
</div>
<div>MPI-3.1 standard, page 197, lines 26-27:</div>
<div><br>
</div>
<div>“<span style="font-size:11pt;font-family:CMR10">It is erroneous to call
</span><span style="font-size:11pt;font-family:CMSS10">MPI</span><span style="font-size:11pt;font-family:CMTT10">_</span><span style="font-size:11pt;font-family:CMSS10">REQUEST</span><span style="font-size:11pt;font-family:CMTT10">_</span><span style="font-size:11pt;font-family:CMSS10">FREE
</span><span style="font-size:11pt;font-family:CMR10">or </span><span style="font-size:11pt;font-family:CMSS10">MPI</span><span style="font-size:11pt;font-family:CMTT10">_</span><span style="font-size:11pt;font-family:CMSS10">CANCEL
</span><span style="font-size:11pt;font-family:CMR10">for a request associated with a nonblocking collective operation.</span>”</div>
<div><br>
</div>
</div>
</div>
</div>
_______________________________________________<br>
mpi-forum mailing list<br>
<a href="mailto:mpi-forum@lists.mpi-forum.org" target="_blank">mpi-forum@lists.mpi-forum.org</a><br>
<a href="https://lists.mpi-forum.org/mailman/listinfo/mpi-forum" rel="noreferrer" target="_blank">https://lists.mpi-forum.org/mailman/listinfo/mpi-forum</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Jeff Hammond<br><a href="mailto:jeff.science@gmail.com" target="_blank">jeff.science@gmail.com</a><br><a href="http://jeffhammond.github.io/" target="_blank">http://jeffhammond.github.io/</a></div></div>