<div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 7 Feb 2019 at 09:27, Hapla Vaclav <<a href="mailto:vaclav.hapla@erdw.ethz.ch">vaclav.hapla@erdw.ethz.ch</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div style="overflow-wrap: break-word;">
<br>
<div><br>
<blockquote type="cite">
<div>On 6 Feb 2019, at 21:08, Matthew Knepley 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_440851913542689314Apple-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">
<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:1px solid 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_440851913542689314Apple-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>
</div>
</blockquote>
<div><br>
</div>
+1</div>
<div><br>
</div>
<div>I also think it's a property of the concrete argument and not the class. </div></div></blockquote><div><br></div><div><div>Completely agree.</div></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;"><div>But it would be an epic task to rewrite it everywhere.</div></div></blockquote><div><br></div><div>Well, we have to start somewhere.<br></div><div><br></div><div>Rather than a re-write I'd advocate adopting a better style in anything new you write and cleaning up whenever you edit existing code.</div><div><br></div><div>In PR #1365 I've explicitly indicated which variable is assumed to be logically collective.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;">
<div><br>
</div>
<div>Vaclav</div>
<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 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:1px solid 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_440851913542689314Apple-converted-space"> </span><br>
<div dir="ltr" class="gmail-m_440851913542689314gmail_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>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote></div></div></div>