[petsc-dev] DMPLEX with VecGhost

Matthew Knepley knepley at gmail.com
Thu Oct 28 09:31:01 CDT 2021

On Thu, Oct 28, 2021 at 9:37 AM Barry Smith <bsmith at petsc.dev> wrote:

>   Matt,
>     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.

Firedrake already does this because they "vec ghost" their vectors by
default. Here is what you need:

  When you create the PetscSection, by default it orders the unknowns
according to the default point numbering. This
  is what causes the ghost unknowns to be mixed in with the local unknowns.
However, PetscSection allows you to set
  a point permutation


  This determines the order of dogs by iterating through points in this
permutation, and you can put all shared points at the end.

Does this make sense?



>   Barry
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20211028/a86e3069/attachment.html>

More information about the petsc-dev mailing list