<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 class="elementToProof"><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">Hi Jeff,</span></div>
<div class="elementToProof"><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"><br>
</span></div>
<div class="elementToProof"><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">The nonblocking cases can also do the same support by copying to and from contiguous buffers
 if we stick the temporary buffer pointer in the request object and free it upon completion. But if you are looking at this from the Fortran binding layer, which does not have access to MPICH internals, then it is difficult to do. The straight-forward solution
 would be ask MPICH to add an extension, so the user can stick the buffer pointer somewhere, for example, the status object.<br>
</span></div>
<div class="elementToProof"><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"><br>
</span></div>
<blockquote style="border-color: rgb(200, 200, 200); border-left: 3px solid rgb(200, 200, 200); padding-left: 1ex; margin-left: 0.8ex; color: rgb(102, 102, 102);" itemscope="" itemtype="https://schemas.microsoft.com/QuotedText">
<div class="elementToProof"><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="ContentPasted0">I wonder if there is a code path in MPICH associated with nonblocking
 communication that is deferred until the request is synchronized.  For example, is there code that merely copies all the arguments passed to the call into some object and then processes the whole operation when the request is synchronized?<br>
</span></div>
</blockquote>
<div>I am not exactly sure what do you mean here, but the persistent request most resembles your idea of merely hold all the arguments and only process it at start time. But again, if you are not allowed to access MPICH internals, then that is out-of-reach.</div>
<div><span style=""><br>
</span></div>
<div><span style="">-- <br>
</span></div>
<div><span style="">Hui<br>
</span></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 style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Jeff Hammond via devel <devel@mpich.org><br>
<b>Sent:</b> Thursday, January 5, 2023 4:50 AM<br>
<b>To:</b> MPICH <devel@mpich.org><br>
<b>Cc:</b> Jeff Hammond <jeff.science@gmail.com><br>
<b>Subject:</b> [mpich-devel] code path for non-blocking operations that are deferred until synchronization</font>
<div> </div>
</div>
<div>
<div dir="ltr">This is related to <a href="https://github.com/mpi-forum/mpi-issues/issues/663" data-auth="NotApplicable">https://github.com/mpi-forum/mpi-issues/issues/663</a> but there are other scenarios where nonblocking communication with non-contiguous
 Fortran subarrays is extremely difficult to implement.  The blocking cases are easy to support by copying to and from contiguous buffers.
<div><br>
</div>
<div>I wonder if there is a code path in MPICH associated with nonblocking communication that is deferred until the request is synchronized.  For example, is there code that merely copies all the arguments passed to the call into some object and then processes
 the whole operation when the request is synchronized?</div>
<div><br>
</div>
<div>Critically for my case, the Fortran arguments would need to be copied, meaning the CFI_cdesc_t pointer not just the associated base_addr, which I doubt is there based on what I've read so far.</div>
<div><br>
Thanks,</div>
<div><br>
</div>
<div>Jeff<br>
<div>
<div><br>
</div>
-- <br>
<div dir="ltr" class="x_gmail_signature" data-smartmail="gmail_signature">Jeff Hammond<br>
<a href="mailto:jeff.science@gmail.com" data-auth="NotApplicable">jeff.science@gmail.com</a><br>
<a href="http://jeffhammond.github.io/" data-auth="NotApplicable">http://jeffhammond.github.io/</a></div>
</div>
</div>
</div>
</div>
</body>
</html>