<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Oct 28, 2021, at 10:31 AM, Matthew Knepley <<a href="mailto:knepley@gmail.com" class="">knepley@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class="">On Thu, Oct 28, 2021 at 9:37 AM Barry Smith <<a href="mailto:bsmith@petsc.dev" class="">bsmith@petsc.dev</a>> wrote:<br class=""></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"><br class="">
  Matt,<br class="">
<br class="">
    How difficult would it be to rework DMPLEX to allow the use of VecGhost? We have performance problems with GPUs with simple DMNETWORK models because the code spends more time uselessly copying the local part of the vector to another vector in global to local and local to global;  more than 1/2 the time of the total simulation.<br class=""></blockquote><div class=""><br class=""></div><div class="">Firedrake already does this because they "vec ghost" their vectors by default. Here is what you need:</div><div class=""><br class=""></div><div class="">  When you create the PetscSection, by default it orders the unknowns according to the default point numbering. This</div><div class="">  is what causes the ghost unknowns to be mixed in with the local unknowns. However, PetscSection allows you to set</div><div class="">  a point permutation</div><div class=""><br class=""></div><div class="">    <a href="https://petsc.org/main/docs/manualpages/PetscSection/PetscSectionSetPermutation.html" class="">https://petsc.org/main/docs/manualpages/PetscSection/PetscSectionSetPermutation.html</a></div><div class=""><br class=""></div><div class="">  This determines the order of dogs by iterating through points in this permutation, and you can put all shared points at the end.</div></div></div></div></blockquote><div><br class=""></div>  How do I know what are shared points to put at the end? Couldn't DMPLEX do this automatically with an option? Where is the Firedrake code that does this with DMPLEX so I can see it?</div><div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_quote"><div class=""><br class=""></div><div class="">Does this make sense?</div><div class=""><br class=""></div><div class="">  Thanks,</div><div class=""><br class=""></div><div class="">     Matt</div><div class=""> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  Barry<br class=""></blockquote></div>-- <br class=""><div dir="ltr" class="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class="">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br class="">-- Norbert Wiener</div><div class=""><br class=""></div><div class=""><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank" class="">https://www.cse.buffalo.edu/~knepley/</a><br class=""></div></div></div></div></div></div></div></div>
</div></blockquote></div><br class=""></body></html>