<div dir="ltr">Thanks for the feedback.  We will explore the different options and come back with an update.<div><br></div><div>Wim</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 24, 2017 at 5:45 AM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
> On Mar 23, 2017, at 11:23 PM, Jed Brown <<a href="mailto:jedbrown@mcs.anl.gov">jedbrown@mcs.anl.gov</a>> wrote:<br>
><br>
> Barry Smith <<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>> writes:<br>
><br>
>>   Jed,<br>
>><br>
>>      Ok I buy what you are saying as a possible solution but now I am<br>
>>      wondering why you need the request argument. Instead, as soon as<br>
>>      you hit the first End or PetscCommSplitReductionBegin why don't<br>
>>      you start a new batch (internally) that all new Begin() calls<br>
>>      feed into? Then each End call just checks through the previous<br>
>>      (still incompleted) batches to find its begin partner<br>
><br>
> How is the "begin partner" identified?<br>
<br>
</span>   The current model has always been first in, first out. If you do anything else currently it would/should error out.<br>
<span class=""><br>
><br>
>>      (or we can require always first in, first out). Thus your first<br>
>>      VecNormEnd(Y, would match the first begin with Y posted and your<br>
>>      second would match the second.<br>
><br>
> VecNormBegin(X,&norm);<br>
> function(X);<br>
> VecNormEnd(X,&norm);<br>
><br>
> would be broken if function() uses split reductions.<br>
<br>
</span>   Do we need to support this far more general model? I think the proposed use case doesn't need it. But you are right, who is to stop someone from writing that code.<br>
<br>
   If we match on both X and &norm then your case will work correctly but if you changed it to<br>
<br>
> VecNormBegin(X,&norm);<br>
> function(X,&norm);<br>
> VecNormEnd(X,&norm);<br>
<br>
and function() used split reduction with the &norm argument it would get a false match so yes your request argument would be required. But we could eliminate that possibly by checking for each new begin if its arguments exactly match an outstanding begin and erroring in that case. Thus eliminating the need for the publicly visible request? Does this still support all "reasonable" use cases?<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
  Barry<br>
<br>
<br>
<br>
<br>
</font></span></blockquote></div><br></div>