I have a situation with a c++ code where I get an error when destroying the solver context after destroying the matrix. I have the following lines at the end of my function
KSPDestroy(&ksp); MatDestroy(&A); PetscObjectDestroy((PetscObject*)&x); PetscObjectDestroy((PetscObject*)&b); It is a very simple program, very similar to the /ksp/ksp/ex1.c example. I can destroy the solver context (ksp) or the matrix (A) but not both. Does anybody have a clue? Adolfo