<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Yes, the current text is buggy and also trying to address a very subtle point.<div><br></div><div>The intent of the text you quote about MPI_Wait is to ensure that either a message is cancelled successfully, or it completes, rather than being in some deferred not-yet-cancelled-and-not-yet-completed state.  The phrase “irrespective of the activities of the other processes” is the most confusing.  It was intended to mean that, once cancel is called on the request, the request will either be successfully cancelled or it will successfully complete without relying on further MPI calls in the user program at the target rank.  It was not intended to mean that this might not require processing at the target rank (and in fact some of the cancel text points this out), just that it can’t wait for some subsequent MPI call made by the user to decide whether the cancel was successful.  I know, the text isn’t very clear about that, but that was the intent. </div><div><br></div><div>The text is also not correct once you include any way to “observe” a message other than posting a receive.  Here’s the thinking on this.</div><div>Assume that there are only sends and receives.  In the case where the cancel failed, the MPI_Wait should succeed because the send is matched.  Thus, the receive will complete, and the MPI_Wait will return without the process on the target node needing to execute any *other* MPI calls (this assumes something about progress, of course).  Thus, in the MPI sense, the MPI_Wait is local because it doesn’t require any (more) MPI calls at the target.  </div><div><br></div><div>This breaks once you can observe a message with probe or mprobe (or MPI_T).  Then you have an observation without a message match, and then MPI_Wait might not complete until there is a matching receive issued by the user at the target process.  Fixing this would require a careful definition of the states and the consequences; in particular, it would probably require that MPI_Wait complete only in the case where the send had been matched by a receive or not observed at all; if observed without a receive, we’d need another state and would require the user to issue the necessary receive commands on it.  Getting this right is not easy, which is why removing cancel of send might be the best route.</div><div><br></div><div>Bill</div><div><br><div>
William Gropp<br>Director, Parallel Computing Institute<br>Thomas M. Siebel Chair in Computer Science<br>Chief Scientist, NCSA<br>University of Illinois Urbana-Champaign<br><br><br><br><br>

</div>
<br><div><div>On Nov 3, 2015, at 3:41 PM, Marek Tomáštík <<a href="mailto:tomastik.marek@gmail.com">tomastik.marek@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Thank you for the detailed explanation. The described intent makes 
sense, but I am not sure how this statement follows from the standard:<br><br>2015-11-02 15:41 GMT+01:00 William Gropp <span dir="ltr"><<a href="mailto:wgropp@illinois.edu" target="_blank">wgropp@illinois.edu</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word">However, note that if the cancel fails, then the communication is not marked for cancellation, and an MPI_Wait could then wait until the message is received. <br></div></blockquote><div><br></div><div>The standard says that "[a] call to MPI_CANCEL marks for cancellation a pending, nonblocking communication operation". It does not say that the cancellation has to suceed, but it does say that MPI_Cancel marks the operation for cancellation -- unconditionally, as far as I can see (unless an error occurs, of course -- but that wasn't what you meant by the cancel failing, or was it?). From this and the statement I cited previously ("[i]f a communication is marked for cancellation, then a MPI_WAIT call 
for that communication is guaranteed to return, irrespective of the 
activities of other processes (i.e., MPI_WAIT behaves as a local 
function)") it follows by modus ponens that MPI_Wait for a request on which MPI_Cancel has been called must behave as a local function. Am I interpreting this incorrectly?<br><br></div><div>Once again, thank you for your time.<br></div></div><br></div><div class="gmail_extra">Marek Tomáštík<br></div></div>
_______________________________________________<br>mpi-forum mailing list<br><a href="mailto:mpi-forum@lists.mpi-forum.org">mpi-forum@lists.mpi-forum.org</a><br>http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi-forum</blockquote></div><br></div></body></html>