Re: [petsc-users] Convergence of AMG

2018-10-31 Thread Mark Adams via petsc-users
On Wed, Oct 31, 2018 at 3:43 PM Manav Bhatia 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

Re: [petsc-users] Convergence of AMG

2018-10-30 Thread Mark Adams via petsc-users
And you can also always use -mg_levels_esteig_ksp_type cg On Tue, Oct 30, 2018 at 2:51 PM Mark Adams wrote: > The last two cases were cut off but that is OK. > > Lets just do -pc_gamg_square_graph 0 and please add/do -ksp_view - > mg_levels_ksp_type richardson -pc_mg_levels 5 -gamg_est_ksp_type

Re: [petsc-users] Convergence of AMG

2018-10-30 Thread Mark Adams via petsc-users
The last two cases were cut off but that is OK. Lets just do -pc_gamg_square_graph 0 and please add/do -ksp_view - mg_levels_ksp_type richardson -pc_mg_levels 5 -gamg_est_ksp_type cg Send the grep GAMG again, and the ksp_view output. And then do this again with: -pc_gamg_agg_nsmooths I think

Re: [petsc-users] Convergence of AMG

2018-10-30 Thread Mark Adams via petsc-users
Nicolas, Smoothed aggregation is fine with shells. see the original SA paper ( https://link.springer.com/article/10.1007/BF02238511). The rotational modes, which are the non-trivial modes that must be supplied, are used in the interpolation. Mark On Tue, Oct 30, 2018 at 5:22 AM Karin wrote:

Re: [petsc-users] Convergence of AMG

2018-10-29 Thread Mark Adams via petsc-users
* the two level results tell us that MG is not doing well on the coarse grids. So the coarse grids are the problem. * Do not worry about timing now. Get the math correct. The two level solve is not meant to be a solution just a diagnostic so don't try to optimize it by squaring the graph. Use

Re: [petsc-users] Convergence of AMG

2018-10-29 Thread Jed Brown
This is about removing edges when creating aggregates. Consider diffusion with an anisotropic conductivity tensor. If you drop connections (do not aggregate across) in the small-conductivity direction, then your aggregates will be aligned with the high conductivity, yielding what is called

Re: [petsc-users] Convergence of AMG

2018-10-29 Thread Manav Bhatia
Barry, Here are some quick numbers with the following options on 4 CPUs and 543,606 dofs: -mg_levels_ksp_max_it 4 -pc_gamg_square_graph 1 -pc_gamg_threshold 0. #levels |#KSP Iters ——— 2| 18 3| 18 4| 40 5|

Re: [petsc-users] Convergence of AMG

2018-10-29 Thread Manav Bhatia
I am trying to follow the meaning of this note from the manual: “ GAMG removes small values from the graph with this threshold, and thus reducing the coupling in the graph and a different (perhaps better) coarser set of points" So, I understand that increasing the value of threshold will

Re: [petsc-users] Convergence of AMG

2018-10-29 Thread Smith, Barry F.
Exactly how much does it increase with number of levels? Send a chart number of levels and number of iterations. With say -mg_levels_ksp_maxit 4 Thanks Barry > On Oct 29, 2018, at 12:59 PM, Manav Bhatia wrote: > > Thanks for the clarification. > > I also observed that the

Re: [petsc-users] Convergence of AMG

2018-10-29 Thread Manav Bhatia
This is really helpful, Jed! Thanks, Manav > On Oct 29, 2018, at 1:57 PM, Jed Brown wrote: > > Manav Bhatia writes: > >> I am experimenting with the threshold parameter. >> >> As described in the manual: >>

Re: [petsc-users] Convergence of AMG

2018-10-29 Thread Jed Brown
Manav Bhatia writes: > I am experimenting with the threshold parameter. > > As described in the manual: > https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCGAMGSetThreshold.html > > > >

Re: [petsc-users] Convergence of AMG

2018-10-29 Thread Manav Bhatia
I am experimenting with the threshold parameter. As described in the manual: https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCGAMGSetThreshold.html “ Conversely reducing the threshold

Re: [petsc-users] Convergence of AMG

2018-10-29 Thread Manav Bhatia
Thanks! > On Oct 29, 2018, at 1:03 PM, Jed Brown wrote: > > Manav Bhatia writes: > >> I also observed that the number of KSP iterations increases with an increase >> in the levels of AMG. Is this true, in general, for all/most applications? > > Adding levels replaces a direct solve with a

Re: [petsc-users] Convergence of AMG

2018-10-29 Thread Jed Brown
Manav Bhatia writes: > I also observed that the number of KSP iterations increases with an increase > in the levels of AMG. Is this true, in general, for all/most applications? Adding levels replaces a direct solve with a deeper V-cycle. When MG is behaving well, this makes little difference

Re: [petsc-users] Convergence of AMG

2018-10-29 Thread Manav Bhatia
Thanks for the clarification. I also observed that the number of KSP iterations increases with an increase in the levels of AMG. Is this true, in general, for all/most applications? -Manav > On Oct 29, 2018, at 12:53 PM, Jed Brown wrote: > > Manav Bhatia writes: > >> Thanks, Jed. >> >>

Re: [petsc-users] Convergence of AMG

2018-10-29 Thread Jed Brown
Manav Bhatia writes: > Thanks, Jed. > > The description says: “ Square the graph, ie. compute A'*A before aggregating > it" > > What is A here? The original matrix, or its "graph" (your 6x6 blocks condensed to scalars). > What is the impact of setting this to 0, which led to a very

Re: [petsc-users] Convergence of AMG

2018-10-29 Thread Manav Bhatia
Thanks, Jed. The description says: “ Square the graph, ie. compute A'*A before aggregating it" What is A here? What is the impact of setting this to 0, which led to a very significant increase in the CPU time in my case? -Manav > On Oct 29, 2018, at 12:21 PM, Jed Brown wrote: > >

Re: [petsc-users] Convergence of AMG

2018-10-29 Thread Jed Brown
https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCGAMGSetSquareGraph.html Squaring the graph speeds up coarsening at the expense of convergence rate. Manav Bhatia writes: > Hi, > > I am trying to understand the meaning of “pc_gamg_square_graph”. I did not > find a specific

Re: [petsc-users] Convergence of AMG

2018-10-29 Thread Manav Bhatia
Hi Mark, Here are some results (still running with 4 cpus): With the default options the convergence is slow -pc_type gamg -ksp_view --node-major-dofs -mat_block_size 6 -ksp_rtol 1.e-8 0 KSP Residual norm 1.696304497263e+00 1 KSP Residual norm 1.120485505766e+00 2 KSP Residual

Re: [petsc-users] Convergence of AMG

2018-10-29 Thread Mark Adams
I would recommend using '-mg_levels 2' and check that that gives you two levels. I would also run this on one processor just to start. Use -mg_levels_ksp_max_it 4. And '-pc_gamg_threshold 0.04' These parameters are meant to increase convergence rate at all costs. Once we our best rate we should

Re: [petsc-users] Convergence of AMG

2018-10-29 Thread Mark Adams
On Sun, Oct 28, 2018 at 1:17 PM Manav Bhatia wrote: > Hi, > >I am attempting to solve a Mindlin plate bending problem with AMG > solver in petsc. This test case is with a mesh of 300x300 elements and > 543,606 dofs. > >The discretization includes 6 variables (u, v, w, tx, ty, tz), but

Re: [petsc-users] Convergence of AMG

2018-10-28 Thread Manav Bhatia
Var: 0,…,5 are the 6 variables that I am solving for: u, v, w, theta_x, theta_y, theta_z. The norms identified in my email are the L2 norms of all dofs corresponding to each variable in the solution vector. So, var: 0: u: norm is the L2 norm of the dofs for u only, and so on. I expect u,

Re: [petsc-users] Convergence of AMG

2018-10-28 Thread Smith, Barry F.
> On Oct 28, 2018, at 12:16 PM, Manav Bhatia wrote: > > Hi, > >I am attempting to solve a Mindlin plate bending problem with AMG solver > in petsc. This test case is with a mesh of 300x300 elements and 543,606 dofs. > >The discretization includes 6 variables (u, v, w, tx, ty,

[petsc-users] Convergence of AMG

2018-10-28 Thread Manav Bhatia
Hi, I am attempting to solve a Mindlin plate bending problem with AMG solver in petsc. This test case is with a mesh of 300x300 elements and 543,606 dofs. The discretization includes 6 variables (u, v, w, tx, ty, tz), but only three are relevant for plate bending (w, tx, ty). I am