Jan Blechta <[email protected]> writes:

> It seems then rather unnecessary that DOLFIN creates ghosted local
> vector with all the on-process dofs + "ghosts". On-process dofs are
> then stored twice and must be copied everytime VecGhostUpdateBegin/End
> is called.

VecGhost shares memory between the global and local forms, but that is
just an optimization.  On the other hand, it implies that every Krylov
vector also has space for the ghosts.  With large subdomains and small
stencils/low order, that fringe is a negligible amount of memory.  With
smaller subdomains and larger stencils, the ghost region can be larger
than the interior.  That extra memory isn't accessed unless you get the
local form, but it's still allocated.  This usually isn't a problem
because the small-subdomain case usually isn't memory-limited, but if
your application has a very large number of vectors (e.g., some model
reduction scenarios), you might want to avoid using VecGhost.

In practice, the local copy is in the noise compared to the cost to
communicate the off-process entries or do actual work like compute a FEM
residual.
_______________________________________________
fenics mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics

Reply via email to