<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Mar 30, 2017 at 3:04 PM, Justin Chang <span dir="ltr"><<a href="mailto:jychang48@gmail.com" target="_blank">jychang48@gmail.com</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">Yeah based on my experiments it seems setting pc_mg_levels to $DAREFINE + 1 has decent performance. <div><br></div><div>1) is there ever a case where you'd want $MGLEVELS <= $DAREFINE? In some of the PETSc tutorial slides (e.g., <a href="http://www.mcs.anl.gov/petsc/documentation/tutorials/TutorialCEMRACS2016.pdf" target="_blank">http://www.mcs.anl.gov/<wbr>petsc/documentation/tutorials/<wbr>TutorialCEMRACS2016.pdf</a> on slide 203/227) they say to use $MGLEVELS = 4 and $DAREFINE = 5, but when I ran this, it was almost twice as slow as if $MGLEVELS >= $DAREFINE</div></div></blockquote><div><br></div><div>Depending on how big the initial grid is, you may want this. There is a balance between coarse grid and fine grid work.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>2) So I understand that one cannot refine further than one grid point in each direction, but is there any benefit to having $MGLEVELS > $DAREFINE by a lot?</div></div></blockquote><div><br></div><div>Again, it depends on the size of the initial grid.</div><div><br></div><div>On really large problems, you want to use GAMG as the coarse solver, which will move the problem onto a smaller number of nodes</div><div>so that you can coarsen further.</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Thanks,</div><div>Justin</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 30, 2017 at 2:35 PM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
-da_refine $DAREFINE determines how large the final problem will be.<br>
<br>
By default if you don't supply pc_mg_levels then it uses $DAREFINE + 1 as the number of levels of MG to use; for example -da_refine 1 would result in 2 levels of multigrid.<br>
<div class="m_-6704646030448738838HOEnZb"><div class="m_-6704646030448738838h5"><br>
<br>
> On Mar 30, 2017, at 2:17 PM, Justin Chang <<a href="mailto:jychang48@gmail.com" target="_blank">jychang48@gmail.com</a>> wrote:<br>
><br>
> Hi all,<br>
><br>
> Just a general conceptual question: say I am tinkering around with SNES ex48.c and am running the program with these options:<br>
><br>
> mpirun -n $NPROCS -pc_type mg -M $XSEED -N $YSEED -P $ZSEED -thi_mat_type baij -da_refine $DAREFINE -pc_mg_levels $MGLEVELS<br>
><br>
> I am not too familiar with mg, but it seems to me there is a very strong correlation between $MGLEVELS and $DAREFINE as well as perhaps even the initial coarse grid size (provided by $X/YZSEED).<br>
><br>
> Is there a rule of thumb on how these parameters should be? I am guessing it probably is also hardware/architectural dependent?<br>
><br>
> Thanks,<br>
> Justin<br>
<br>
</div></div></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</div></div>