[petsc-users] gamg and zero pivots

Barry Smith bsmith at mcs.anl.gov
Sat Sep 19 18:23:42 CDT 2015


Hmmm

./ex19 -da_refine 2 -pc_type gamg -help | grep mg_coarse | grep shift
  -mg_coarse_sub_pc_factor_shift_type <INBLOCKS> (choose one of) NONE NONZERO POSITIVE_DEFINITE INBLOCKS (PCFactorSetShiftType)
  -mg_coarse_sub_pc_factor_shift_amount <2.22045e-14>: Shift added to diagonal (PCFactorSetShiftAmount)

What do you get with -ksp_type gmres -pc_type gamg -help | grep factor_shift ?

What do you get with -ksp_type gmres -pc_type gamg  -mg_coarse_sub_pc_factor_shift_type gibberish  ?

You should get an error message saying it doesn't know the type. Otherwise it is not checking that option. Or perhaps you somehow have it set to use a LU factorization that doesn't support this option like SuperLU.

  Barry




> On Sep 19, 2015, at 6:10 PM, Gideon Simpson <gideon.simpson at gmail.com> wrote:
> 
> It gives zero pivots on:
> 
> -ksp_type gmres -pc_type gamg -mg_coarse_sub_pc_factor_shift_type NONZERO
> 
> It has no problem with:
> 
> -ksp_type gmres -pc_type bjacobi -sub_pc_factor_shift_type NONZERO
> 
> -gideon
> 
>> On Sep 19, 2015, at 12:37 AM, Barry Smith <bsmith at mcs.anl.gov> wrote:
>> 
>> 
>>> On Sep 18, 2015, at 10:42 PM, Gideon Simpson <gideon.simpson at gmail.com> wrote:
>>> 
>>> I’m getting a zero pivot in LU factorization error when I use the gamg preconditioner.  I know there is some issue with my matrix, as I get the same error if I use pc_type lu in serial, or if I use pc_type bjacobi in parallel, both of which are corrected by adding -pc_factor_shift_type NONZERO -sub_pc_factor_shift_type NONZERO, respectively.  However, I can’t quite seem to figure out the analogous command to use for the gamg preconditioner.
>> 
>> You need to figure out the prefix to the option that is added by gamg to set it. One way is to run with the gamg options and -help and grep for factor_shift.   
>> 
>>  The option is like something like -mg_coarse_pc_factor_shift_type nonzero or -mg_coarse_sub_pc_factor_shift_type 
>> 
>> Barry
>> 
>>> 
>>> -gideon
>>> 
>> 
> 



More information about the petsc-users mailing list