<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Do., 7. Feb. 2019 um 15:21 Uhr schrieb Hapla  Vaclav <<a href="mailto:vaclav.hapla@erdw.ethz.ch">vaclav.hapla@erdw.ethz.ch</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">



<div style="word-wrap:break-word;line-break:after-white-space">
<br>
<div><br>
<blockquote type="cite">
<div>On 7 Feb 2019, at 15:10, Patrick Sanan via petsc-dev <<a href="mailto:petsc-dev@mcs.anl.gov" target="_blank">petsc-dev@mcs.anl.gov</a>> wrote:</div>
<br class="gmail-m_-7240724474788485127Apple-interchange-newline">
<div>
<div dir="ltr" style="font-family:Menlo-Regular;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
(Forgot to reply-all before)
<div><br>
</div>
<div>I'd propose to update the guidelines in the dev manual to say that unless otherwise specified, collectivity is wrt the communicator associated with the PETSc object in the first argument slot.<br>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>Let me take e.g.</div>
<div><a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatTranspose.html" target="_blank">https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatTranspose.html</a></div>
<div>as an example.</div>
<div><br>
</div>
<div>So you mean that</div>
<div>  Collective on Mat</div>
<div>could be replaced by just</div>
<div>  Collective</div>
<div>which would implicitly mean</div>
<div>  Collective [on Mat mat argument]</div>
<div><br>
</div>
<div>That's perhaps quite a good idea!</div>
<div><br>
</div>
<div>Note that it's an information also for users, so this interpretation note about probably shouldn't be mentioned _only_ in <span style="font-family:Menlo-Regular">the dev manual.</span></div></div></div></blockquote><div>That's a good point - I don't think collectivity as used in the man pages is explicitly defined anywhere outside of the dev manual. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><div>
<div><br>
</div>
<div>Cheers,</div>
<div>Vaclav</div>
<br>
<blockquote type="cite">
<div>
<div dir="ltr" style="font-family:Menlo-Regular;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div><br>
</div>
</div>
<br style="font-family:Menlo-Regular;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div class="gmail_quote" style="font-family:Menlo-Regular;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div dir="ltr" class="gmail_attr">Am Do., 7. Feb. 2019 um 10:35 Uhr schrieb Patrick Sanan <<a href="mailto:patrick.sanan@gmail.com" target="_blank">patrick.sanan@gmail.com</a>>:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div dir="ltr"><br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Am Mi., 6. Feb. 2019 um 21:09 Uhr schrieb Matthew Knepley via petsc-dev <<a href="mailto:petsc-dev@mcs.anl.gov" target="_blank">petsc-dev@mcs.anl.gov</a>>:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div dir="ltr">On Wed, Feb 6, 2019 at 3:03 PM Dave May via petsc-dev <<a href="mailto:petsc-dev@mcs.anl.gov" target="_blank">petsc-dev@mcs.anl.gov</a>> wrote:<br>
</div>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">* I notice that most man pages will say
<div>  Collective on <type><br>
</div>
<div>e.g.</div>
<div><a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DMDA/DMDACreate.html" target="_blank">https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DMDA/DMDACreate.html</a><br>
</div>
<div><br>
</div>
<div>* Some others say</div>
<div>  Collective on <implementation-name><br>
</div>
<div><br>
</div>
<div>e.g.</div>
<div><a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DMDA/DMDACreateNaturalVector.html" target="_blank">https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DMDA/DMDACreateNaturalVector.html</a><br>
</div>
<div><br>
</div>
<div>or </div>
<div><br>
</div>
<div><a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMCompositeAddDM.html" target="_blank">https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMCompositeAddDM.html</a><br>
</div>
<div><br>
</div>
<div>In the former, at least the word "DMDA" gets linked back to the implementation, whilst in the latter "DMComposite" does not.</div>
<div><br>
</div>
<div>Should "Collective on <implementation-name>" be avoided?</div>
<div>It is potentially somewhat unclear given that the name of the implementation does not appear anywhere in the arg  list (type or variable name).</div>
<div><br>
</div>
<div>That said, "collective on <type>" could be similarly criticized if a method existed with two args of the same type.  </div>
<div><br>
</div>
<div>* Many of the methods in this file</div>
<div><br>
</div>
<div> <span class="gmail-m_-7240724474788485127Apple-converted-space"> </span><a href="http://www.mcs.anl.gov/petsc/petsc-current/src/dm/impls/shell/dmshell.c.html" target="_blank">www.mcs.anl.gov/petsc/petsc-current/src/dm/impls/shell/dmshell.c.html</a><br>
</div>
<div><br>
</div>
<div>simply say "Collective" (without a type or implementation name), or they say "Logically Collective on XXX"</div>
<div><br>
</div>
<div>
<div>I do realize that there is a pattern that the statement "collective on xxx" or "not collective" applies (implicitly) to the first argument of any PETSc function call (at least that I've come across) so possibly just indicating the method as "Collective"
 might suffice (assuming (i) there is a pattern and (ii) everyone knows about the pattern).</div>
</div>
<div><br>
</div>
<div>Q: Should I make a PR to unify these man pages (and any others I spot) to just say "Collective on <type>"?</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>This has always bugged me. It should say, I think, 'Collective on <arg name>", or "Logically collective on <arg name>".</div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>I agree - ultimately I think we're just trying to say "this operation is [logically] collective wrt the MPI communicator associated with object XXX", so specifying this with respect to an argument makes the most sense. Right now the dev manual
 says "class XXX" which seems potentially ambiguous (for instance you could have two arguments for local/global Vecs living on different communicators).</div>
<div><br>
</div>
<div>In terms of reducing clutter and making things more maintainable, I would support explicitly adopting the convention that if no argument is specified (e.g. just "Collective"), then this refers to the first argument - I think this is very intuitive
 for class methods (e.g. DMFoo(DM dm,..,) is going to be collective or not wrt the communicator associated with "dm").</div>
<div><br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div class="gmail_quote">
<div><br>
</div>
<div>  Thanks,</div>
<div><br>
</div>
<div>     Matt</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div>Thanks,</div>
<div>  Dave</div>
<div><br>
</div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
--<span class="gmail-m_-7240724474788485127Apple-converted-space"> </span><br>
<div dir="ltr" class="gmail-m_-7240724474788485127gmail-m_-912850822730805952gmail-m_3361126391979871154gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener</div>
<div><br>
</div>
<div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</blockquote>
</div>
</div>
</blockquote>
</div>
<br>
</div>

</blockquote></div></div>