[petsc-users] Is PCFactorSetZeroPivot() effective?

Jozsef Bakosi jbakosi at lanl.gov
Thu May 31 15:08:21 CDT 2012


Hi Matt,

Thanks for you answer.

On 05.30.2012 19:27, Matthew Knepley wrote:
> On Wed, May 30, 2012 at 7:20 PM, Jozsef Bakosi <jbakosi at lanl.gov> wrote:
> 
> > Hello,
> >
> > I have a mesh with very small cell sizes and in a Poisson equation CG solve
> > with ML preconditioner I get the following error:
> >
> > [31]PETSC ERROR: --------------------- Error Message
> > ------------------------------------
> > [31]PETSC ERROR: Detected zero pivot in LU factorization see
> >
> > http://www.mcs.anl.gov/petsc/petsc-as/documentation/troubleshooting.html#ZeroPivot
> > !
> > [31]PETSC ERROR: Zero pivot row 537 value 9.41111e-13 tolerance 1e-12!
> >
> > I really would like PETSc to NOT treat matrix values lower than 1e-12 to
> > be zero, so I'm trying to set the zero pivot to a lower value with
> > PCFactorSetZeroPivot(), but I still get the same error message: as if
> > the function call would have no effect. I also tried setting the
> > zeropivot via PetscOptionsSetValue("-pc_factor_zeropivot", ...), but
> > still no luck.
> >
> > Is there another way to set the zero pivot that I'm not aware of?
> >
> 
> 1) Always look at -ksp_view
> 
> 2) I bet this is a subsolve, so that it would be -sub_pc_factor_zeropivot
> <value>. You
>     can verify by looking at -ksp_view
> 

Using -sub_pc_factor_zeropivot does not seem to make any difference.

> 
> > Is there a way to query the zero pivot value?
> >
> 
> 3) Its printed out, 1.0e-12
> 

Yeah. I mean something like PCFactorGetZeroPivot(), so I can check what
PETSc think I'm trying to use. The above persistent error message seems
to indicate that whatever I'm setting is not being used.

BTW, this error seems to happen only at larger core counts. I wonder if
that gives you a clue as to what might be the problem (e.g. what might
cause a zeropivot).

Thanks,
Jozsef


More information about the petsc-users mailing list