<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<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);">
Hi Edric,</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);">
After some pondering, we are closing <a href="https://github.com/pmodels/mpich/issues/5775" id="LPlnk969506">
https://github.com/pmodels/mpich/issues/5775</a> as <code>wontfix</code>. For the following reasons:</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);">
<ul dir="auto">
<li>Cancelling send is deprecated in MPI-4.</li><li>The potential fix will be very messy due to current design.<br>
</li><li>On the other hand, it is probably easier to work around in application. <br>
</li></ul>
<div>Example workaround could be to replace <code>MPI_Issend</code> with `MPI_Isend` plus separate
<code>MPI_Irecv</code> for acknowledgement. You only need do this for the <code>
MPI_Issend</code> that you may cancel, and I think it is a small inconvenience for more predictable behavior. Internally an
<code>MPI_Issend</code> is not implemented as an <code>MPI_Isend </code>+ <code>
MPI_Irecv</code> to be more efficient and to exploit hardware acceleration where we can, but that also made cancelling it very complicated.<br>
</div>
<div><br>
</div>
<div>If you have strong reasons to fix this issue, for example, no feasible work around, let's discuss.</div>
<div><br>
</div>
<div>-- <br>
</div>
<div>Hui Zhou<br>
</div>
<br>
</div>
<div id="appendonsend"></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> Zhou, Hui <zhouh@anl.gov><br>
<b>Sent:</b> Wednesday, January 19, 2022 12:28 PM<br>
<b>To:</b> discuss@mpich.org <discuss@mpich.org><br>
<b>Cc:</b> Edric Ellis <eellis@mathworks.com><br>
<b>Subject:</b> Re: MPI_Cancel + MPI_Wait stalls when using ch4, not when using ch3</font>
<div> </div>
</div>
<style type="text/css" style="display:none">
<!--
p
{margin-top:0;
margin-bottom:0}
-->
</style>
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Thanks for reporting. We'll fix this. Tracking issue: <a href="https://github.com/pmodels/mpich/issues/5775" id="LPlnkOWALinkPreview">
https://github.com/pmodels/mpich/issues/5775</a><br>
</div>
<div class="x__Entity x__EType_OWALinkPreview x__EId_OWALinkPreview x__EReadonly_1">
<div id="LPBorder_GTaHR0cHM6Ly9naXRodWIuY29tL3Btb2RlbHMvbXBpY2gvaXNzdWVzLzU3NzU." class="x_LPBorder383364" style="width:100%; margin-top:16px; margin-bottom:16px; max-width:800px; min-width:424px">
<table id="LPContainer383364" role="presentation" style="padding:12px 36px 12px 12px; width:100%; border-width:1px; border-style:solid; border-color:rgb(200,200,200); border-radius:2px">
<tbody>
<tr valign="top" style="border-spacing:0px">
<td>
<div id="LPImageContainer383364" style="margin-right:12px; height:120px; overflow:hidden; width:240px">
<a target="_blank" id="LPImageAnchor383364" href="https://github.com/pmodels/mpich/issues/5775"><img id="LPThumbnailImageId383364" alt="" width="240" height="120" style="display:block" src="https://opengraph.githubassets.com/abeb43664f034115c44e99f3e273e49dbfdeb9ebcc478dd9ede9ca4d439f78ab/pmodels/mpich/issues/5775"></a></div>
</td>
<td style="width:100%">
<div id="LPTitle383364" style="font-size:21px; font-weight:300; margin-right:8px; font-family:"wf_segoe-ui_light","Segoe UI Light","Segoe WP Light","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif; margin-bottom:12px">
<a target="_blank" id="LPUrlAnchor383364" href="https://github.com/pmodels/mpich/issues/5775" style="text-decoration:none">ch4: MPI_Cancel stalls MPI_Wait · Issue #5775 · pmodels/mpich</a></div>
<div id="LPDescription383364" style="font-size:14px; max-height:100px; color:rgb(102,102,102); font-family:"wf_segoe-ui_normal","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif; margin-bottom:12px; margin-right:8px; overflow:hidden">
Reported on discuss mailinglist: ---- quote ---- Hi, Running one of our test programs using MPICH 3.4.3 and ch4:ofi, I notice that MPI_Wait on an MPI_Request that has been MPI_Cancelled never compl...</div>
<div id="LPMetadata383364" style="font-size:14px; font-weight:400; color:rgb(166,166,166); font-family:"wf_segoe-ui_normal","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif">
github.com</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br>
<div id="x_appendonsend"></div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Edric Ellis via discuss <discuss@mpich.org><br>
<b>Sent:</b> Wednesday, January 19, 2022 11:21 AM<br>
<b>To:</b> discuss@mpich.org <discuss@mpich.org><br>
<b>Cc:</b> Edric Ellis <eellis@mathworks.com><br>
<b>Subject:</b> [mpich-discuss] MPI_Cancel + MPI_Wait stalls when using ch4, not when using ch3</font>
<div> </div>
</div>
<div class="x_BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="x_PlainText">Hi,<br>
<br>
Running one of our test programs using MPICH 3.4.3 and ch4:ofi, I notice that MPI_Wait on an MPI_Request that has been MPI_Cancelled never completes (it does when using ch3). (The documentation for MPI_Cancel states "If 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)")<br>
<br>
Here's a simple example:<br>
<br>
#include <mpi.h><br>
#include <stdio.h><br>
#include <stdlib.h><br>
<br>
void check(int const value) {<br>
if (value != MPI_SUCCESS) {<br>
fprintf(stderr, "Failed.\n");<br>
exit(1);<br>
}<br>
}<br>
<br>
int main(int argc, char** argv) {<br>
MPI_Request r1;<br>
int payload = 42;<br>
int result;<br>
<br>
check(MPI_Init(0,0));<br>
check(MPI_Issend(&payload, 1, MPI_INT, 0, 0, MPI_COMM_WORLD, &r1));<br>
check(MPI_Test(&r1, &result, MPI_STATUS_IGNORE));<br>
fprintf(stdout, "MPI_Test result: %d\n", result);<br>
check(MPI_Cancel(&r1));<br>
check(MPI_Wait(&r1, MPI_STATUS_IGNORE));<br>
MPI_Finalize();<br>
return 0;<br>
}<br>
<br>
This stalls in MPI_Wait when executed using "mpiexec -n 1 ./a.out". <br>
<br>
Cheers,<br>
Edric.<br>
<br>
_______________________________________________<br>
discuss mailing list discuss@mpich.org<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>
</div>
</span></font></div>
</div>
</body>
</html>