<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Hello all,</p>
<p><br>
</p>
<p>I am struggling to find the same convergence in iterations when using classical algebric multigrid in my code with PETSc 3.20 compared to PETSc 3.14.</p>
<p><br>
</p>
<p>I am using in order to solve a Poisson system:</p>
<p><b>-ksp_type cg -pc_type gamg -<span>pc_gamg_type</span> classical</b><br>
</p>
<p><br>
</p>
<p>I read the different releases notes between 3.15 and 3.20:</p>
<p><a href="https://petsc.org/release/changes/317" class="OWAAutoLink" id="LPlnk566993">https://petsc.org/release/changes/317</a>
<br>
</p>
<p><a href="https://petsc.org/main/manualpages/PC/PCGAMGSetThreshold/" class="OWAAutoLink">https://petsc.org/main/manualpages/PC/PCGAMGSetThreshold/</a><br>
</p>
<p><br>
</p>
<p>And have a look at the archive mailing list (especially this one: <a href="https://www.mail-archive.com/petsc-users@mcs.anl.gov/msg46688.html" class="OWAAutoLink">
https://www.mail-archive.com/petsc-users@mcs.anl.gov/msg46688.html</a>) <br>
</p>
<p>so I added some other options to try to have the same behaviour than PETSc 3.14:</p>
<p><br>
</p>
<p></p>
<p><b>-ksp_type cg -pc_type gamg -<span>pc_gamg_type</span> classical </b><span style="color: rgb(255, 0, 0);">-</span><span><span style="color: rgb(255, 0, 0);">mg_levels_pc_type sor -</span><span style="color: rgb(255, 0, 0);">pc_gamg_threshold</span><span style="color: rgb(255, 0, 0);">
0.</span></span></p>
<p></p>
<p><br>
</p>
<p>It improves the convergence but there still a different convergence though (26 vs 18 iterations).</p>
<p>On another of my test case, the number of levels is different (e.g. 6 vs 4) also, and here it is the same, but with a different coarsening according to the output from the -ksp_view option</p>
<br>
<p><b></b>The main point is that the convergence dramatically degrades in parallel on a third test case, so I can't upgrade to PETSc 3.20 for now unhappily.<br>
</p>
<br>
<p>I send you the partial report (petsc_314_vs_petsc_320.ksp_view) with -ksp_view (left PETSc 3.14, right PETSc 3.20) and the configure/command line options used (in petsc_XXX_petsc.TU files).</p>
<p><br>
</p>
<p>Could my issue related to the following 3.18 change ? I have not tried the first one.</p>
<p></p>
<ul class="simple" style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0px; color: rgb(50, 50, 50); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">
<li style="box-sizing: border-box;">
<p style="box-sizing: border-box; margin-bottom: 0.25rem; margin-top: 0px; color: var(--pst-color-text-base); font-size: 1em;">
Remove<span> </span><code class="docutils literal notranslate" style="box-sizing: border-box; font-family: var(--pst-font-family-monospace); font-size: 13.125px; overflow-wrap: break-word; color: var(--pst-color-inline-code); background-color: var(--pst-color-surface); border: 1px solid var(--pst-color-on-surface); border-radius: 0.25rem; padding: 0.1rem 0.25rem;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;">PCGAMGSetSymGraph()</span></code><span> </span>and<span> </span><code class="docutils literal notranslate" style="box-sizing: border-box; font-family: var(--pst-font-family-monospace); font-size: 13.125px; overflow-wrap: break-word; color: var(--pst-color-inline-code); background-color: var(--pst-color-surface); border: 1px solid var(--pst-color-on-surface); border-radius: 0.25rem; padding: 0.1rem 0.25rem;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;">-pc_gamg_sym_graph</span></code>.
<span style="color: rgb(255, 0, 0);">The user should now indicate symmetry and structural symmetry using</span><span style="color: rgb(255, 0, 0);"> </span><code class="docutils literal notranslate" style="box-sizing: border-box; font-family: var(--pst-font-family-monospace); font-size: 13.125px; overflow-wrap: break-word; color: var(--pst-color-inline-code); background-color: var(--pst-color-surface); border: 1px solid var(--pst-color-on-surface); border-radius: 0.25rem; padding: 0.1rem 0.25rem;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;"><a href="https://petsc.org/release/manualpages/Mat/MatSetOption/" style="box-sizing: border-box; background-color: transparent; color: var(--pst-color-link); text-decoration: none;"><span style="color: rgb(255, 0, 0);">MatSetOption</span></a><span style="color: rgb(255, 0, 0);">()</span></span></code><span style="color: rgb(255, 0, 0);"> </span><span style="color: rgb(255, 0, 0);">and
GAMG will symmetrize the graph if a symmetric options is not set</span></p>
</li><li style="box-sizing: border-box;">
<p style="box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; color: var(--pst-color-text-base); font-size: 1em;">
Change<span> </span><code class="docutils literal notranslate" style="box-sizing: border-box; font-family: var(--pst-font-family-monospace); font-size: 13.125px; overflow-wrap: break-word; color: var(--pst-color-inline-code); background-color: var(--pst-color-surface); border: 1px solid var(--pst-color-on-surface); border-radius: 0.25rem; padding: 0.1rem 0.25rem;"><span class="pre" style="box-sizing: border-box; hyphens: none; white-space: nowrap;">-pc_gamg_reuse_interpolation</span></code><span style="color: rgb(255, 0, 0);"> </span><span style="color: rgb(255, 0, 0);">default
from false to true.</span></p>
</li></ul>
<br>
<p></p>
<p>Any advice would be greatly appreciated,<br>
</p>
<p><br>
</p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<div style="font-family:Tahoma; font-size:13px">
<div class="BodyFragment"><font size="2"><span style="font-size:10pt">
<div class="PlainText">Pierre LEDAC<br>
Commissariat à l’énergie atomique et aux énergies alternatives<br>
Centre de SACLAY<br>
DES/ISAS/DM2S/SGLS/LCAN<br>
Bâtiment 451 – point courrier n°43<br>
F-91191 Gif-sur-Yvette<br>
+33 1 69 08 04 03<br>
+33 6 83 42 05 79</div>
</span></font></div>
</div>
</div>
</div>
</div>
</body>
</html>