VecGhost and state

Matthew Knepley knepley at gmail.com
Thu Apr 30 06:53:14 CDT 2009


On Thu, Apr 30, 2009 at 5:38 AM, Jed Brown <jed at 59a2.org> wrote:

> I'm bringing this up after a confusing debugging session.
>
> After VecGhostGetLocalForm/VecGhostRestoreLocalForm, the state is not
> increased.  This is not a problem as long as the user calls
> VecGhostUpdateBegin/End which will increase the state, but that is not
> always required.  However, the state *must* be increased after changing
> the local form.  In my case, the cached norm was being used erroneously
> after function evaluation.
>
> Since the local and global forms refer to the same memory, I think their
> states would ideally be synchronized.  Doing this robustly when the user
> is messing with the global form and local form at the same time is a
> problem because the local form does not have a reference to the global
> form, but I think we can at least eliminate one class of bugs by
> synchronizing the states using MAX in VecGhostGetLocalForm and
> VecGhostRestoreLocalForm.
>
> Do you see a better way, or should I just go ahead with this?


We should just treat LocalForm as GetArray, and increase the state on
RestoreLocalForm. I will do it.

   Matt


>
> Jed
>
-- 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20090430/eb2b716d/attachment.html>


More information about the petsc-dev mailing list