> > All I can tell you is that, many years ago, at least some of these calls > to PetscObjectStateIncrease() were needed in the Vec routines in order > to get PETSc solvers to work with the SAMRAI PETSc Vec class. To try to > avoid the issues that Bobby is reporting, I went ahead and made any Vec > routine that could conceivably result in an invalidation of cached Vec > data call PetscObjectStateIncrease(). I probably went overboard and > call it unnecessarily in some places. >
I followed a very similar strategy. > I will work on systematically removing these calls and report any problems. > > Besides nonlinear function evalutations, is it also necessary in > implementations of MatVecMult/MatVecMultAdd/etc? Or should these also > be handled automatically by PETSc? > Again, these exist on AMR grids as part of some the PFLOTRAN work - Boyce I can share if you are interested. > Thanks, > > -- Boyce
