[petsc-dev] Integrating PFLOTRAN, PETSC & SAMRAI

Jed Brown jed at 59A2.org
Mon Jun 6 16:56:13 CDT 2011


On Mon, Jun 6, 2011 at 23:49, Boyce Griffith <griffith at cims.nyu.edu> wrote:

> But if the model is that the Vec implementation is responsible for updating
> the state, then would it be better if PETSc did NOT increase the state,
> e.g., in calls to VecAXPY, or MatVecMult?  It seems like it might be better
> if it did not, so that if one has a non-"compliant" implementation, one
> finds out more quickly that their code is broken.


Good point. We could replace the increments with debug-mode checks that the
state actually did get incremented, with errors if it didn't. There are
perhaps 50 call sites to update. It would not be a big deal.

This would be great for SNESComputeFunction() too because a common mistake
is to forget to put anything in the output vector. This would check that
they at least got access to the vector (though we still couldn't confirm
that they put anything into it).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20110606/1a32d453/attachment.html>


More information about the petsc-dev mailing list