[petsc-users] Is PCFactorSetZeroPivot() effective?

Jed Brown jedbrown at mcs.anl.gov
Thu May 31 15:58:44 CDT 2012


On Thu, May 31, 2012 at 3:47 PM, Jozsef Bakosi <jbakosi at lanl.gov> wrote:

> I don't seem to find any additional output from -ksp_view. Am I doing
> something wrong when I simply pass -ksp_view to the exectuable?
>
> The full file would be 48M, here is a snippet that keeps coming from all
> cores:
>
> [44]PETSC ERROR: --------------------- Error Message
> -----------------------------------
> [44]PETSC ERROR: Detected zero pivot in LU factorization see
>
> http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html#ZeroPivot
> !
> [44]PETSC ERROR: Zero pivot row 537 value 9.36276e-13 tolerance 1e-12!
> [44]PETSC ERROR:
> ------------------------------------------------------------------------
> [44]PETSC ERROR: Petsc Release Version 3.1.0, Patch 8, Thu Mar 17 13:37:48
> CDT 2011
> [44]PETSC ERROR: See docs/changes/index.html for recent updates.
> [44]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
> [44]PETSC ERROR: See docs/index.html for manual pages.
> [44]PETSC ERROR:
> ------------------------------------------------------------------------
> [44]PETSC ERROR: Unknown Name on a conejo-gn named mu0455.localdomain by
> jbakosi Thu May 31 14:26:36 2012
> [44]PETSC ERROR: Libraries linked from
> /scratch3/jbakosi/code/hydra/tpl/gnu/lib
> [44]PETSC ERROR: Configure run at Mon May 21 09:35:16 2012
> [44]PETSC ERROR: Configure options PETSC_DIR=/tmp/temp/petsc-3.1-p8
> PETSC_ARCH=conejo-gnu-opt --prefix=/scratch3/jbakosi/code/hydra/tpl/gnu
> --with-clanguage=c++ --with-x=false --with-x11=false
> --download-ml=/scratch3/jbakosi/code/hydra/tpl/tarballs/ml-6.2.tar.gz
> --with-debugging=0 -COPTFLAGS=-O3 -CXXOPTFLAGS=-O3 -FOPTFLAGS=-O3
> -FFLAGS=-ffree-line-length-none
> [44]PETSC ERROR:
> ------------------------------------------------------------------------
> [44]PETSC ERROR: MatLUFactorNumeric_SeqAIJ() line 574 in
> src/mat/impls/aij/seq/aijfact.c
> [44]PETSC ERROR: MatLUFactorNumeric() line 2587 in
> src/mat/interface/matrix.c
> [44]PETSC ERROR: PCSetUp_LU() line 158 in src/ksp/pc/impls/factor/lu/lu.c
> [44]PETSC ERROR: PCSetUp() line 795 in src/ksp/pc/interface/precon.c
> [44]PETSC ERROR: KSPSetUp() line 237 in src/ksp/ksp/interface/itfunc.c
> [44]PETSC ERROR: PCSetUp_Redundant() line 179 in
> src/ksp/pc/impls/redundant/redundant.c
> [44]PETSC ERROR: PCSetUp() line 795 in src/ksp/pc/interface/precon.c
> [44]PETSC ERROR: KSPSetUp() line 237 in src/ksp/ksp/interface/itfunc.c
> [44]PETSC ERROR: PCSetUp_MG() line 602 in src/ksp/pc/impls/mg/mg.c
> [44]PETSC ERROR: PCSetUp_ML() line 668 in src/ksp/pc/impls/ml/ml.c
> [44]PETSC ERROR: PCSetUp() line 795 in src/ksp/pc/interface/precon.c
> [44]PETSC ERROR: KSPSetUp() line 237 in src/ksp/ksp/interface/itfunc.c
> [44]PETSC ERROR: User provided function() line 275 in
> "unknowndirectory/"/scratch3/jbakosi/code/hydra/src/LinearAlgebra/PetscSolver.C
>

These are the options you can use to control the shift (assuming you
haven't added your own prefix; you can check for yourself with -help)

 -mg_coarse_redundant_pc_factor_shift_type <NONE> (choose one of) NONE
NONZERO POSITIVE_DEFINITE INBLOCKS (PCFactorSetShiftType)
  -mg_coarse_redundant_pc_factor_shift_amount <0>: Shift added to diagonal
(PCFactorSetShiftAmount)
  -mg_coarse_redundant_pc_factor_zeropivot <2.22045e-14>: Pivot is
considered zero if less than (PCFactorSetZeroPivot)

Due to peculiar setup dependencies, it's going to be quite difficult to
extract the coarse problem produced by ML in time to catch it before the
factorization is attempted.

Matt, this is another example of a setup dependency that I think would be
awkward to intercept as part of a "setup phases" approach.


>
> > What discretization are you using?
>
> Straightforward Galerkin FEM Poisson solver.
>

What boundary conditions? I'm guessing the constant is in the null space,
in which case the coarse space really should be singular and you should not
be trying to solve it with a direct solver.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120531/1c26dc87/attachment.html>


More information about the petsc-users mailing list