<div dir="ltr">Oh, actually this worked.  You have this ...pc_type jacobi in there twice, so one of them was "unused".<div><br></div><div>Try this with 2 processors now.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 26, 2016 at 6:42 PM, Mark Adams <span dir="ltr"><<a href="mailto:mfadams@lbl.gov" target="_blank">mfadams@lbl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Tue, Jul 26, 2016 at 6:24 PM, Ari Rappaport <span dir="ltr"><<a href="mailto:arir@vosssci.com" target="_blank">arir@vosssci.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">So I commented out the line PCSetType(pc, PCGAMG). The line KSPSetFromOptions(ksp) was already in the code at the end of our initialization routine. I also added .petscrc to the working dir. Here is the current output. It seems as if Option left: name:-mg_levels_pc_type jacobi (no value) is still present in the output..I dunno.<br></blockquote><div><br></div></span><div>Yea, I dunno either.  If you use -help you will get printout of the available options.  If you do this you will see stuff like -mg_levels_1_ ... you can also see this in the ksp_view.  There is a shortcut that lets you _not_ put "_1" in.  Try putting this in for each level like so:</div><div><br></div><div><div>-mg_levels_1_pc_type jacobi</div></div><div><div>-mg_levels_2_pc_type jacobi</div></div><div>-mg_levels_3_pc_type jacobi<br></div><div><br></div><div>I also notice that the coarse grid ksp is GMRES.  This is our fault.  It should be preonly. Add:</div><div><br></div><div>-mg_coarse_ksp_type preonly<br></div><div><div class="h5"><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<span><br>
-Ari<br>
<br>
----- Original Message -----<br>
From: "Mark Adams" <<a href="mailto:mfadams@lbl.gov" target="_blank">mfadams@lbl.gov</a>><br>
</span><span>To: "Ari Rappaport" <<a href="mailto:arir@vosssci.com" target="_blank">arir@vosssci.com</a>>, "For users of the development version of PETSc" <<a href="mailto:petsc-dev@mcs.anl.gov" target="_blank">petsc-dev@mcs.anl.gov</a>><br>
Sent: Tuesday, July 26, 2016 4:03:03 PM<br>
Subject: Re: [petsc-dev] Algebraic Multigrid<br>
<br>
<br>
</span><div><div>At the end of this you have:<br>
<br>
<br>
<br>
#PETSc Option Table entries:<br>
-ksp_view<br>
-mg_levels_pc_type jacobi<br>
-options_left<br>
#End of PETSc Option Table entries<br>
There is one unused database option. It is:<br>
Option left: name:-mg_levels_pc_type jacobi (no value)<br>
<br>
<br>
So this jacobi parameter is not being used.<br>
<br>
<br>
Do you call KPSSetFromOptions? Do you set solver parameters in the code? Like PCGAMG?<br>
<br>
<br>
You should not set anything in the code, it just confuses things at this point. Use KSPSetFromOptions(). You can hardwire stuff before this call, this just lets you set the defaults, but you should always call this last to let command line parameters override the defaults.<br>
<br>
<br>
You can put this in a .petscrc file in the working directory and try again.<br>
<br>
<br>
<br>
-ksp_type cg<br>
-ksp_max_it 50<br>
<br>
-ksp_rtol 1.e-6<br>
-ksp_converged_reason<br>
-pc_type gamg<br>
-pc_gamg_type agg<br>
-pc_gamg_agg_nsmooths 1<br>
-pc_gamg_coarse_eq_limit 10<br>
-pc_gamg_reuse_interpolation true<br>
-pc_gamg_square_graph 1<br>
-pc_gamg_threshold -0.05<br>
-mg_levels_ksp_max_it 2<br>
-mg_levels_ksp_type chebyshev<br>
-mg_levels_esteig_ksp_type cg<br>
-mg_levels_esteig_ksp_max_it 10<br>
-mg_levels_ksp_chebyshev_esteig 0,.05,0,1.05<br>
-mg_levels_pc_type jacobi<br>
-pc_hypre_type boomeramg<br>
-pc_hypre_boomeramg_no_CF<br>
-pc_hypre_boomeramg_agg_nl 1<br>
-pc_hypre_boomeramg_coarsen_type HMIS<br>
-pc_hypre_boomeramg_interp_type ext+i<br>
<br>
</div></div></blockquote></div></div></div><br></div></div>
</blockquote></div><br></div>