[petsc-users] Is PCFactorSetZeroPivot() effective?

Jozsef Bakosi jbakosi at lanl.gov
Thu May 31 17:26:43 CDT 2012


On 05.31.2012 15:58, Jed Brown wrote:
> 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)
> 

Great. Thanks. When I pass these options on the command line, how can I
get a feedback to see if the option has actually been used or not?

> > > 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.

I do set the additive constant. I have no problem with this on lower core-counts.

I did another test and set the PETSC_OPTIONS environment variable to
'-options_table -options_left', then I get:

...

[49]PETSC ERROR: Zero pivot row 537 value 9.36276e-13 tolerance 1e-12!

...

#PETSc Option Table entries:
-mg_levels_ksp_norm_type no
-mg_levels_ksp_richardson_scale 0.90
-mg_levels_ksp_type richardson
-mg_levels_pc_type bjacobi
-mg_levels_sub_ksp_norm_type no
-mg_levels_sub_ksp_type preonly
-mg_levels_sub_pc_type icc
-options_left
-options_table
-pc_asm_overlap 1
-pc_mg_cycle_type v
-pc_mg_smoothdown 1
-pc_mg_smoothup 1
-pc_ml_maxCoarseSize 1500
-pc_ml_maxNlevels 10
-pc_type asm
-sub_pc_factor_levels 0
-sub_pc_factor_zeropivot 1e-20
-sub_pc_type ilu
#End of PETSc Option Table entries
There are no unused options.

So how do I tell, which zeropivot setting (the 1e-20 or the 1e-12) is the one petsc is using?

Thanks,
J


More information about the petsc-users mailing list