<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Yes, I know exactly where the zero diagonal entries are.  Is there a way to compensate for that?<div class=""><br class=""><div class="">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;  ">-gideon</span>

</div>
<br class=""><div style=""><blockquote type="cite" class=""><div class="">On Sep 19, 2015, at 10:09 PM, Barry Smith <<a href="mailto:bsmith@mcs.anl.gov" class="">bsmith@mcs.anl.gov</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><br class="">  Oh, it is a different kind of zero pivot value. There is a zero on the diagonal while it is trying to do SOR.  Should there be zeros on the diagonal of your matrix? <br class=""><br class="">   You can use -mg_levels_pc_type jacobi  and it will ignore those zero values.<br class=""><br class="">   Barry<br class=""><br class=""><br class=""><blockquote type="cite" class="">On Sep 19, 2015, at 7:12 PM, Gideon Simpson <<a href="mailto:gideon.simpson@gmail.com" class="">gideon.simpson@gmail.com</a>> wrote:<br class=""><br class="">I never get to see the output.  When it runs, I get:<br class=""><br class="">  0 SNES Function norm 8.405398322914e-02 <br class="">[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<br class="">[0]PETSC ERROR: Zero pivot in LU factorization: <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html#zeropivot" class="">http://www.mcs.anl.gov/petsc/documentation/faq.html#zeropivot</a><br class="">[0]PETSC ERROR: Zero pivot on row 0<br class="">[0]PETSC ERROR: See <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html" class="">http://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble shooting.<br class="">[0]PETSC ERROR: Petsc Release Version 3.6.1, unknown <br class="">[0]PETSC ERROR: ./blowup_refine on a arch-darwin-c-debug named gs_air by gideon Sat Sep 19 20:11:44 2015<br class="">[0]PETSC ERROR: Configure options --download-mpich=yes --download-suitesparse=yes --download-superlu=yes --download-superlu_dist=yes --download-mumps=yes --download-sprng=yes --with-cxx=clang++ --with-cc=clang --with-fc=gfortran --download-metis=yes --download-parmetis=yes --download-scalapack=yes<br class="">[0]PETSC ERROR: #1 MatSOR_SeqAIJ_Inode() line 2795 in /opt/petsc/src/mat/impls/aij/seq/inode.c<br class="">[0]PETSC ERROR: #2 MatSOR_MPIAIJ() line 1496 in /opt/petsc/src/mat/impls/aij/mpi/mpiaij.c<br class="">[0]PETSC ERROR: #3 MatSOR() line 3697 in /opt/petsc/src/mat/interface/matrix.c<br class="">[0]PETSC ERROR: #4 PCApply_SOR() line 37 in /opt/petsc/src/ksp/pc/impls/sor/sor.c<br class="">[0]PETSC ERROR: #5 PCApply() line 483 in /opt/petsc/src/ksp/pc/interface/precon.c<br class="">[0]PETSC ERROR: #6 KSP_PCApply() line 242 in /opt/petsc/include/petsc/private/kspimpl.h<br class="">[0]PETSC ERROR: #7 KSPInitialResidual() line 63 in /opt/petsc/src/ksp/ksp/interface/itres.c<br class="">[0]PETSC ERROR: #8 KSPSolve_GMRES() line 235 in /opt/petsc/src/ksp/ksp/impls/gmres/gmres.c<br class="">[0]PETSC ERROR: #9 KSPSolve() line 604 in /opt/petsc/src/ksp/ksp/interface/itfunc.c<br class="">[0]PETSC ERROR: #10 KSPSolve_Chebyshev() line 381 in /opt/petsc/src/ksp/ksp/impls/cheby/cheby.c<br class="">[0]PETSC ERROR: #11 KSPSolve() line 604 in /opt/petsc/src/ksp/ksp/interface/itfunc.c<br class="">[0]PETSC ERROR: #12 PCMGMCycle_Private() line 19 in /opt/petsc/src/ksp/pc/impls/mg/mg.c<br class="">[0]PETSC ERROR: #13 PCApply_MG() line 340 in /opt/petsc/src/ksp/pc/impls/mg/mg.c<br class="">[0]PETSC ERROR: #14 PCApply() line 483 in /opt/petsc/src/ksp/pc/interface/precon.c<br class="">[0]PETSC ERROR: #15 KSP_PCApply() line 242 in /opt/petsc/include/petsc/private/kspimpl.h<br class="">[0]PETSC ERROR: #16 KSPInitialResidual() line 63 in /opt/petsc/src/ksp/ksp/interface/itres.c<br class="">[0]PETSC ERROR: #17 KSPSolve_GMRES() line 235 in /opt/petsc/src/ksp/ksp/impls/gmres/gmres.c<br class="">[0]PETSC ERROR: #18 KSPSolve() line 604 in /opt/petsc/src/ksp/ksp/interface/itfunc.c<br class="">[0]PETSC ERROR: #19 SNESSolve_NEWTONLS() line 233 in /opt/petsc/src/snes/impls/ls/ls.c<br class="">[0]PETSC ERROR: #20 SNESSolve() line 3906 in /opt/petsc/src/snes/interface/snes.c<br class="">[1]PETSC ERROR: #1 VecNorm_MPI() line 63 in /opt/petsc/src/vec/vec/impls/mpi/pvec2.c<br class="">[1]PETSC ERROR: #2 VecNorm() line 242 in /opt/petsc/src/vec/vec/interface/rvector.c<br class="">[1]PETSC ERROR: #3 VecNormalize() line 337 in /opt/petsc/src/vec/vec/interface/rvector.c<br class="">[1]PETSC ERROR: #4 KSPGMRESCycle() line 127 in /opt/petsc/src/ksp/ksp/impls/gmres/gmres.c<br class="">[1]PETSC ERROR: #5 KSPSolve_GMRES() line 236 in /opt/petsc/src/ksp/ksp/impls/gmres/gmres.c<br class="">[1]PETSC ERROR: #6 KSPSolve() line 604 in /opt/petsc/src/ksp/ksp/interface/itfunc.c<br class="">[1]PETSC ERROR: #7 KSPSolve_Chebyshev() line 381 in /opt/petsc/src/ksp/ksp/impls/cheby/cheby.c<br class="">[1]PETSC ERROR: #8 KSPSolve() line 604 in /opt/petsc/src/ksp/ksp/interface/itfunc.c<br class="">[1]PETSC ERROR: #9 PCMGMCycle_Private() line 19 in /opt/petsc/src/ksp/pc/impls/mg/mg.c<br class="">[1]PETSC ERROR: #10 PCApply_MG() line 340 in /opt/petsc/src/ksp/pc/impls/mg/mg.c<br class="">[1]PETSC ERROR: #11 PCApply() line 483 in /opt/petsc/src/ksp/pc/interface/precon.c<br class="">[1]PETSC ERROR: #12 KSP_PCApply() line 242 in /opt/petsc/include/petsc/private/kspimpl.h<br class="">[1]PETSC ERROR: #13 KSPInitialResidual() line 63 in /opt/petsc/src/ksp/ksp/interface/itres.c<br class="">[1]PETSC ERROR: #14 KSPSolve_GMRES() line 235 in /opt/petsc/src/ksp/ksp/impls/gmres/gmres.c<br class="">[1]PETSC ERROR: #15 KSPSolve() line 604 in /opt/petsc/src/ksp/ksp/interface/itfunc.c<br class="">[1]PETSC ERROR: #16 SNESSolve_NEWTONLS() line 233 in /opt/petsc/src/snes/impls/ls/ls.c<br class="">[1]PETSC ERROR: #17 SNESSolve() line 3906 in /opt/petsc/src/snes/interface/snes.c<br class=""><br class="">and then it just sits there.<br class=""><br class="">-gideon<br class=""><br class=""><blockquote type="cite" class="">On Sep 19, 2015, at 7:18 PM, Matthew Knepley <<a href="mailto:knepley@gmail.com" class="">knepley@gmail.com</a>> wrote:<br class=""><br class="">On Sat, Sep 19, 2015 at 6:10 PM, Gideon Simpson <<a href="mailto:gideon.simpson@gmail.com" class="">gideon.simpson@gmail.com</a>> wrote:<br class="">It gives zero pivots on:<br class=""><br class="">Send -ksp_view<br class=""><br class="">  Matt<br class=""><br class="">-ksp_type gmres -pc_type gamg -mg_coarse_sub_pc_factor_shift_type NONZERO<br class=""><br class="">It has no problem with:<br class=""><br class="">-ksp_type gmres -pc_type bjacobi -sub_pc_factor_shift_type NONZERO<br class=""><br class="">-gideon<br class=""><br class=""><blockquote type="cite" class="">On Sep 19, 2015, at 12:37 AM, Barry Smith <<a href="mailto:bsmith@mcs.anl.gov" class="">bsmith@mcs.anl.gov</a>> wrote:<br class=""><br class=""><br class=""><blockquote type="cite" class="">On Sep 18, 2015, at 10:42 PM, Gideon Simpson <<a href="mailto:gideon.simpson@gmail.com" class="">gideon.simpson@gmail.com</a>> wrote:<br class=""><br class="">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.<br class=""></blockquote><br class=""> 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.<br class=""><br class="">  The option is like something like -mg_coarse_pc_factor_shift_type nonzero or -mg_coarse_sub_pc_factor_shift_type<br class=""><br class=""> Barry<br class=""><br class=""><blockquote type="cite" class=""><br class="">-gideon<br class=""><br class=""></blockquote><br class=""></blockquote><br class=""><br class=""><br class=""><br class="">-- <br class="">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br class="">-- Norbert Wiener<br class=""></blockquote><br class=""></blockquote><br class=""></div></blockquote></div><br class=""></div></body></html>