<div>Can you briefly describe your application,?</div><div><br></div><div dir="auto">AMG usually only works well for straightforward elliptic problems, at least right out of the box.</div><div dir="auto"><br></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 12, 2021 at 11:35 AM Milan Pelletier via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Dear all,<br></div><div><br></div><div>I am currently trying to use PETSc with CG solver and GAMG preconditioner.<br></div><div>I have started with the following set of parameters:<br></div><div>-ksp_type cg<br></div><div>-pc_type gamg<br></div><div>-pc_gamg_agg_nsmooths 1 <br></div><div>-pc_gamg_threshold 0.02 <br></div><div>-mg_levels_ksp_type chebyshev <br></div><div>-mg_levels_pc_type sor <br></div><div>-mg_levels_ksp_max_it 2<b><br></b></div><div><br></div><div>Unfortunately, the preconditioning seems to run extremely slowly. I tried to play around with the numbers, to check if I could notice some difference, but could not observe significant changes. <br></div><div>As a comparison, the KSPSetup call with GAMG PC takes more than 10 times longer than completing the whole computation (preconditioning + ~400 KSP iterations to convergence) of the similar case using the following parameters :<br></div><div>-ksp_type cg<br></div><div>-pc_type ilu<br></div><div>-pc_factor_levels 0<br></div><div><br></div><div>The matrix size for my case is ~1,850,000*1,850,000 elements, with ~38,000,000 non-zero terms (i.e. ~20 per row). For both ILU and AMG cases I use matseqaij/vecseq storage (as a first step I work with only 1 MPI process).<br></div><div><br></div><div>Is there something wrong in the parameter set I have been using?<br></div><div>I understand that the preconditioning overhead with AMG is higher than with ILU, but I would also expect CG/GAMG to be competitive against CG/ILU, especially considering the relatively big problem size.<br></div><div><br></div><div>For information, I am using the PETSc version built from commit 6840fe907c1a3d26068082d180636158471d79a2 (release branch from April 7, 2021). <br></div><div><br></div><div>Any clue or idea would be greatly appreciated!<br></div><div>Thanks for your help,<br></div><div><br></div><div>Best regards,<br></div><div><div><div><span style="color:rgb(107,107,107)">Milan Pelletier</span><br></div></div><div><br></div></div><div><br></div></blockquote></div></div>