[petsc-users] PC_SUBPC_ERROR with -pc_factor_zeropivot

Matthew Overholt overholt at capesim.com
Fri Jul 6 15:15:19 CDT 2018

I am working on handling very small pivot values for a very small
percentage of my matrix (linear Ax = b solution), and I am getting an error
that I don't understand when I run the KSPCG solver in parallel.

KSPCreate(comm, &ksp)
KSPSetTolerances(ksp, rtol, ...)
KSPSetType(ksp, KSPCG)
KSPSetInitialGuessNonzero(ksp, PETSC_TRUE)
KSPSetOperators(ksp, V, V)
KSPGetConvergedReason(ksp, &kspReason)
  PCGetSetUpFailedReason(pc, &pcReason)

Default Case (zeropivot is 2.22045E-14):
mpiexec -n 1 ...
==> ksp fails due to pcReason = PC_FACTOR_NUMERIC_ZEROPIVOT

Reduced pivot case, n = 1:
mpiexec -n 1 ... -pc_factor_zeropivot 1E-15
==> runs successfully

Reduced pivot case, n > 1:
mpiexec -n 2 ... -pc_factor_zeropivot 1E-15
==>  ksp fails due to pcReason = PC_SUBPC_ERROR
What does this mean?

If I use the MUMPS solver and either Cholesky or LU preconditioning
instead, it runs fine with any number of MPI ranks, but I'd like to be able
to run the CG solver in parallel too.

Thanks in advance,

Matt Overholt
CapeSym, Inc.
(508) 653-7100 x204
overholt at capesim.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180706/60cea18c/attachment.html>

More information about the petsc-users mailing list