[petsc-users] An issue about two parameter options in PETSc/GAMG

Mark Adams mfadams at lbl.gov
Thu Feb 24 09:06:15 CST 2022


On Thu, Feb 24, 2022 at 6:24 AM 赵刚 <zhaog6 at lsec.cc.ac.cn> wrote:

> Dear Mark and PETSc team,
>
> I have a question when using PETSc/GAMG. For the parameter options
> `-pc_gamg_process_eq_limit <a>` and `-pc_gamg_coarse_eq_limit <b>`, when or
> for what kind of problems can it bring significant performance improvement?
> In addition, generally, what relationship do the `a`, `b` and number of
> processes need to meet?


`-pc_gamg_process_eq_limit <a>` guides the process reduction on coarse
grids. 'a' is the number of equations that you want to aim for on each
active process. So if you have 1000 processors and a = 100, then GAMG
should make 10 processes active and leave the rest empty on that level.
`-pc_gamg_coarse_eq_limit <b>` tells GAMG when to stop coarsening. So 'b'
should be the size problem that you can solve (eg, not factor) fast on your
machine and problem.

You can run with '-info' and grep on GAMG to see what GAMG is doing with
respect to the active number of processes, size of each level, average
number of non-zeros per level.
-log_view will print the time in the coarse grid solver.


>
> If there are some papers or numerical examples that show the performance
> advantages and importance of using the both parameters, could you provide
> it to me? Thanks a lot.
>

These parameters are not too important until you get to a very large scale,
but you can play with them (on as large a problem as you can deal with so
that you see something).
-log_view prints info about time on each level that can help to see the
effects of this, but it is a bit hard to interpret.
Some of my old papers had some data on this but it is so machine specific,
and problem specific, that you really just need to test it.
Setup a problem, again as large as possible, start with the defaults and
search for the minimum. It will be a convex function so it is not hard.
The two parameters are almost orthogonal.

Mark


>
>
> Best Regards,
> Gang Zhao
>
>
> </b></a>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220224/9fbf77bc/attachment.html>


More information about the petsc-users mailing list