[petsc-users] Convergence of AMG

Mark Adams mfadams at lbl.gov
Wed Oct 31 16:32:04 CDT 2018


On Wed, Oct 31, 2018 at 3:43 PM Manav Bhatia <bhatiamanav at gmail.com> wrote:

> Here are the updates. I did not find the options to make much difference
> in the results.
>
> I noticed this message in the GAMG output for cases 2, 3:  HARD stop of
> coarsening on level 3.  Grid too small: 1 block nodes
>

Yea, this is what it looks like but I can see that there are 5 levels below.


>
> Is this implying that the mesh on level 3 could not be coarsened towards
> levels 4/5?
>
> In one of your earlier emails you had mentioned about reducing the rate of
> coarsening. What is the option to do that.
>

The coarsening rate is pretty slow but you could try reducing it more with
a finite -pc_gamg_threshold val (you could try val=0.01, 0.02, 0.05).


>
> Common options:
> -pc_mg_levels 5 -mg_levels_ksp_max_it 4 -pc_gamg_square_graph 0
> -pc_gamg_threshold 0. -mg_levels_ksp_type richardson -gamg_est_ksp_type cg
>
> Case#  |  #levels   |    #KSP Iters  |  Extra Options
> ————————————————————————————
>      1      |     5        |       67            |
>      2      |     5        |       67            |
>  -pc_gamg_agg_nsmooths 2
>      3      |     5        |       67            |
>  -pc_gamg_agg_nsmooths 2  -mg_levels_esteig_ksp_type cg
>

I have done plates a long time ago and they worked fine, but there is
something going wrong here. Perhaps my plate formulations were different
but I don't think so (what we called Reissner-Mindlin).

You might try an easier test case if this is not a super simple test (eg,
well shaped elements).

Otherwise you can limit the number of levels that you use and use a
parallel direct solver for the (large) coarse grid. To do that use:
"-pc_gamg_use_parallel_coarse_grid_solver -mg_coarse_pc_type lu" and
configure your PETSc with a parallel coarse grid solver like MUMPS or
SuperLU.

Then set -pc_gamg_coarse_eq_limit N with N being large. Increase it and
minimize the solve time. You will find that parallel lu is faster than MG
for "small" problems (note, small could be pretty large here). So you will
want to run LU first (ie, no AMG) to get a baseline and then try GAMG.

Oh, and you could also try hypre (=pc_type hypre -pc_hypre_type boomeramg).
Hypre should not be great in theory but it is worth a try. Maybe there's
just something going wrong with GAMG.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20181031/7c4c3625/attachment-0001.html>


More information about the petsc-users mailing list