VecGhost and state

Jed Brown jed at 59A2.org
Thu Apr 30 05:38:38 CDT 2009


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?

Jed

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20090430/8e0e16e9/attachment.sig>


More information about the petsc-dev mailing list