Yeah based on my experiments it seems setting pc_mg_levels to $DAREFINE + 1 has decent performance.
1) is there ever a case where you'd want $MGLEVELS <= $DAREFINE? In some of the PETSc tutorial slides (e.g., http://www.mcs.anl.gov/ petsc/documentation/tutorials/TutorialCEMRACS2016.pdf 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 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? Thanks, Justin On Thu, Mar 30, 2017 at 2:35 PM, Barry Smith <[email protected]> wrote: > > -da_refine $DAREFINE determines how large the final problem will be. > > 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. > > > > On Mar 30, 2017, at 2:17 PM, Justin Chang <[email protected]> wrote: > > > > Hi all, > > > > Just a general conceptual question: say I am tinkering around with SNES > ex48.c and am running the program with these options: > > > > mpirun -n $NPROCS -pc_type mg -M $XSEED -N $YSEED -P $ZSEED > -thi_mat_type baij -da_refine $DAREFINE -pc_mg_levels $MGLEVELS > > > > 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). > > > > Is there a rule of thumb on how these parameters should be? I am > guessing it probably is also hardware/architectural dependent? > > > > Thanks, > > Justin > >
