<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Jim, OK, my attempt at answering below.</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);">
See if you agree with my annotations.</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);">
-Tony</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature">
<div>
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p style="margin-top: 0px; margin-bottom: 0px;">Anthony Skjellum, PhD</p>
<p style="margin-top: 0px; margin-bottom: 0px;">Professor of Computer Science and Chair of Excellence</p>
<p style="margin-top: 0px; margin-bottom: 0px;">Director, SimCenter</p>
<p style="margin-top: 0px; margin-bottom: 0px;">University of Tennessee at Chattanooga (UTC)</p>
<p style="margin-top: 0px; margin-bottom: 0px;">tony-skjellum@utc.edu  [or skjellum@gmail.com]</p>
<p style="margin-top: 0px; margin-bottom: 0px;">cell: 205-807-4968</p>
<p style="margin-top: 0px; margin-bottom: 0px;"><br>
</p>
</div>
</div>
</div>
</div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> mpi-forum <mpi-forum-bounces@lists.mpi-forum.org> on behalf of Jim Dinan via mpi-forum <mpi-forum@lists.mpi-forum.org><br>
<b>Sent:</b> Saturday, October 10, 2020 1:31 PM<br>
<b>To:</b> Main MPI Forum mailing list <mpi-forum@lists.mpi-forum.org><br>
<b>Cc:</b> Jim Dinan <james.dinan@gmail.com><br>
<b>Subject:</b> [EXT]: [Mpi-forum] Progress Question</font>
<div> </div>
</div>
<div>
<table id="x_header-notice" role="”presentation”" cellspacing="”0″" cellpadding="”0″" border="”0″" style="font-size:18px; background-color:#fdb736; width:100%; text-align:center">
<tbody>
<tr>
<td style="color:#112e51"><strong>External Email</strong></td>
</tr>
</tbody>
</table>
<div>
<div dir="ltr">Hi All,
<div><br>
</div>
<div>A colleague recently asked a question that I wasn't able to answer definitively. Is the following code guaranteed to make progress?</div>
<div><br>
</div>
<blockquote style="margin:0 0 0 40px; border:none; padding:0px">
<div>MPI_Barrier();</div>
<div>-- everything is uncertain to within one message, if layered on pt2pt;</div>
<div>--- let's assume a power of 2, and recursive doubling (RD).</div>
<div>--- At each stage, it posts an irecv and isend to its corresponding element in RD</div>
<div>--- All stages must complete to get to the last stage.</div>
<div>--- At the last stage, it appears like your example below for N/2 independent process pairs, which appears always to complete.</div>
<div>Oif rank == 1</div>
<div>  create_file("test")</div>
<div>if rank == 0</div>
<div>   while not_exists("test")</div>
<div>       sleep(1);</div>
</blockquote>
<div><br>
</div>
<div>That is, can rank 1 require rank 0 to make MPI calls after its return from the barrier, in order for rank 1 to complete the barrier? If the code were written as follows:</div>
<div><br>
</div>
<blockquote style="margin:0 0 0 40px; border:none; padding:0px">
<div>isend(..., other_rank, &req[0])</div>
<div>irecv(..., other_rank, &req[1])</div>
<div>waitall(2, req)</div>
<div>--- Assume both isends buffer on the send-side and return immediately--valid.</div>
<div>--- Both irecvs are posted, but unmatched as yet.  Nothing has transferred on network.</div>
<div>--- Waitall would mark the isends done at once, and work to complete the irecvs; in</div>
<div>     that process, each would have to progress the isends across the network. On this comm</div>
<div>     and all comms, incidentally.  </div>
<div>--- When waitall returns, the data has transferred to the receiver, otherwise the irecvs </div>
<div>      aren't done.</div>
<div>if rank == 1</div>
<div>  create_file("test")</div>
<div>if rank == 0</div>
<div>   while not_exists("test")</div>
<div>       sleep(1);</div>
</blockquote>
<br>
<div>I think it would clearly not guarantee progress since the send data can be buffered. Is the same true for barrier?</div>
<div><br>
</div>
<div>Cheers,</div>
<div> ~Jim.</div>
</div>
</div>
<table id="x_footer-notice" role="”presentation”" cellspacing="”0″" cellpadding="”0″" border="”0″" style="font-size:18px; background-color:#fdb736; width:100%; text-align:center">
<tbody>
<tr>
<td style="color:#112e51"><strong>This message is not from a UTC.EDU address. Caution should be used in clicking links and downloading attachments from unknown senders or unexpected email.
</strong></td>
</tr>
</tbody>
</table>
</div>
</body>
</html>