Great idea, thanks again! Matt...
On Mon, Jul 9, 2018 at 11:08 AM, Matthew Knepley <[email protected]> wrote: > On Mon, Jul 9, 2018 at 11:05 AM Matthew Overholt <[email protected]> > wrote: > >> The -sub_pc_factor_zeropivot <value> option works, but since this is for >> a commercial code I don't want users to have to type that every time. >> >> Is there an equivalent call to >> PCFactorSetZeroPivot() >> for the block Jacobi method (like PCSubFactorSetZeroPivot())? I can't >> find it. >> >> Instead, does one need to call >> PCBjacobiGetSubKSP() >> and then loop over every block, calling >> KSPGetPC() >> PCFactorSetZeroPivot() >> on each block? That seems a little tedious, but if that is the correct >> approach I'll do it >> > > Yes, that is the API approach. As you can see, for composed solvers its > not a great option. How about > putting > > http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/ > PetscOptionsSetValue.html > > in the code? > > Thanks, > > Matt > > >> Thanks, >> Matt Overholt >> >> On Mon, Jul 9, 2018 at 10:17 AM, Matthew Overholt <[email protected]> >> wrote: >> >>> Thanks, Matt, that option works perfectly, and explains the -ksp_view >>> output. >>> >>> Much appreciated! >>> Matt... >>> >>> On Fri, Jul 6, 2018 at 6:25 PM, Matthew Knepley <[email protected]> >>> wrote: >>> >>>> 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 >>>>> >>>> >>>> Okay, what is likely happening is that your preconditioner is actually >>>> Block-Jacobi/LU >>>> instead of parallel LU. Thus you would need >>>> >>>> -sub_pc_factor_zeropivot 1e-15 >>>> >>>> >> > > -- > What most experimenters take for granted before they begin their > experiments is infinitely more interesting than any results to which their > experiments lead. > -- Norbert Wiener > > https://www.cse.buffalo.edu/~knepley/ <http://www.caam.rice.edu/~mk51/> >
