<div class="gmail_quote">On Thu, May 26, 2011 at 01:42, Li, Zhisong (lizs) <span dir="ltr">&lt;<a href="mailto:lizs@mail.uc.edu">lizs@mail.uc.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">I have been working for a while on applying ML precoditioner to improve performance of a KSP solving a Poisson-style problem.  So far the only speedup gain attributed to resetting the number of multigrid levels.  I wonder if all the available Petsc options
 to control ML are limited to those listed on the Petsc manual (about 10 totally). Do we have any other controls more than that?  
<br></div></blockquote><div><br></div><div>Run with &quot;-help |grep pc_ml_&quot; to see the full list of options that can be passed to ML. ML constructs the hierarchy and then you can control it through PCMG. Relevant options are under the prefixes -pc_mg_*, -mg_coarse_*, and -mg_levels_*.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">
<br>
In ML user&#39;s guide, they state another tip to improve ML&#39;s parallel speed: &quot;Instead of doing a direct solve on the coarsest level, try a few smoothing sweeps instead&quot;.  I don&#39;t think the available options &quot;-pc_mg_smoothup&quot; and &quot;-pc_mg_smoothdown&quot; correspond
 to this control.  Can any PETSC interface option do that?</div></blockquote></div><br><div><div>You can control the coarse level with -mg_coarse_ksp_*, for example,</div><div><br></div><div>-mg_coarse_ksp_type cg -mg_coarse_ksp_max_it 3 -mg_coarse_pc_type bjacobi -mg_coarse_sub_pc_type lu</div>
<div><br></div><div>to do 3 cycles of CG preconditioned by block Jacobi with direct subdomain solves (trivially cheap on a coarse level) as the coarse level solver. Note that Krylov iterations here will make the preconditioner nonlinear so you should use -ksp_type fgmres on the outside. If you know something about the spectrum, you could use something like -mg_coarse_ksp_type chebychev which is linear for a fixed number of iterations.</div>
</div>