Hey,

       In theory PETSc Mat have two "state" values,

1) nonzerostate - this is increased anytime the nonzero structure changes

2) state - this is increased anytime any numerical values are changed

    These are used by PCSetUp() to determine if the preconditioner needs to be 
updated and if that involves a new nonzero structure.

The reason I say "in theory" is that it looks like certain changes to matrices 
do not properly update the state.

Hi Barry: Sounds good. In the meantime, I'm simply making a corresponding 
_SeqAIJMKL version of all of the functions in question that will just call the 
_SeqAIJ version and then call a function that creates an updated MKL sparse 
matrix handle. It appears that several of these do not have function prototypes 
in any of the .h files (they haven't been needed outside of aij.c). I assume I 
can just add PETSC_INTERN prototypes in src/mat/impls/aij/seq/aij.h (where we 
have things like prototypes for MatAssemblyEnd_SeqAIJ)?

   I think this is the correct place. If they have static in front of them you 
will need to remove that also.

I'm just wondering: Isn't fixing the state variables the faster, easier and more maintainable approach?

Best regards,
Karli

Reply via email to