[petsc-dev] How to know MatSolve() was successful?

Zhang, Hong hzhang at mcs.anl.gov
Fri Oct 12 11:47:40 CDT 2018

Junchao :
I learned users should call KSPGetConvergedReason to check if a KSPSolve was successful. But if users directly call MatSolve() or MatMatSolve etc, how can they know it was successful?
I see in MatSolve_MUMPS, it first checks factor errors. If there is, it sets the solution to infinity;  But it does not do that in MatMatSolve.  Also, in MatSolve_MUMPS, if the factorization was fine but the solve failed, the code just aborts. Is it wrong in a KSP context?

If you suspect something is wrong, produce an example that validate your guess. We then work from there and improve PETSc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20181012/b961a1ac/attachment-0002.html>

More information about the petsc-dev mailing list