- edited description
Improve solve status check in PETScLUSolver
According to http://lists.mcs.anl.gov/pipermail/petsc-users/2015-November/027637.html we should call KSPConvergedReason
. This could also include
- provide better feedback to users why LU/Cholesky factorization failed.
- tell how did factorization went: fill-in, pivoting for numerical stability v. not pivoting for sparsisty
- tell how backward substitution went: estimated accuracy, condition number, iterative refinement steps employed
provide some interface to allow disallow PETSc fiddling with diagonal entries[Seems that these calls influence only PETSc factorizations, not external ones using packages MUMPS, etc.]PCFactorSetShiftType
,PCFactorSetShiftAmount
. At least allow to turn it off. Now impossible because it is called afterKSPSetFromOptions
.PCSetFromOptions
is not called.- document better how the solver should be tweaked (by
PETScOptions
or--petsc.mat_<pkg>_<opt>
command-line option`) in the case of failure
Note also of new PCFailedReason
.
Comments (12)
-
reporter -
reporter - edited description
- changed title to Improve solve status check in PETScLUSolver
-
- removed milestone
Removing milestone: 1.8 (automated comment)
-
reporter - changed milestone to 2017.1
-
reporter - changed milestone to 2017.2
Seems that @garth-wells already dropped some
KSPConvergedReason
checks into LU so this is not that critical. Also might be quite related to#815. -
reporter - edited description
-
I think
#815will help - it will separate the generic solver stuff from the LU specifics, and it will ensure thatPETScKrylovSolver
andPETScLUSolver
have the same semantics for controlling options. -
reporter Yes. The situation is much better. This test case
from dolfin import * mesh = UnitSquareMesh(10, 10) V = FunctionSpace(mesh, "P", 1) u = TrialFunction(V) v = TestFunction(V) w = Function(V) A = assemble(w**2*u*v*dx) b = assemble(v*dx) #PETScOptions.set("mat_mumps_cntl_1", 1.0) PETScOptions.set("mat_mumps_icntl_4", 2) solve(A, w.vector(), b, "mumps") # Expecting an exception assert False # Should not end up here
now works with MUMPS. Jan: Add it as a unit test.
On the other hand the test fails with UMFPACK, which is known to make things up.
-
@blechta is this still an issue, or can it be closed/split into smaller issues?
-
reporter To be honest I don't know. I am aware you did some improvements there. Don't you mind if I keep this open, assigned to myself?
-
reporter - changed milestone to 2018.1
-
reporter - removed milestone
- removed responsible
- Log in to comment