<div dir="ltr">Yes, the eigen estimates are converging slowly.<div><br></div><div>BTW, have you tried hypre? It is a good solver (lots lots more woman years)</div><div>These eigen estimates are conceptually simple, but they can lead to problems like this (hypre and an eigen estimate free smoother).</div><div><br></div><div>But try this (good to have options anyway):</div><div><br></div><div>-pc_gamg_esteig_ksp_max_it 20<br></div><div><br></div><div>Chevy will scale the estimate that we give by, I think, 5% by default. Maybe 10.</div><div>You can set that with:</div><div><br></div><div>-mg_levels_ksp_chebyshev_esteig 0,0.2,0,<b><font color="#ff0000">1.05</font></b><br></div><div><br></div><div>0.2 is the scaling of the high eigen estimate for the low eigen value in Chebyshev.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 27, 2023 at 5:06 PM Blaise Bourdin <<a href="mailto:bourdin@mcmaster.ca">bourdin@mcmaster.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<br>
<div><br>
<blockquote type="cite">
<div>On Mar 24, 2023, at 3:21 PM, Mark Adams <<a href="mailto:mfadams@lbl.gov" target="_blank">mfadams@lbl.gov</a>> wrote:</div>
<br>
<div>
<div dir="ltr">
<div dir="ltr">* Do you set:
<div><br>
</div>
<div> PetscCall(MatSetOption(Amat, MAT_SPD, PETSC_TRUE));</div>
</div>
</div>
</div>
</blockquote>
<blockquote type="cite">
<div>
<div dir="ltr">
<div dir="ltr">
<div> PetscCall(MatSetOption(Amat, MAT_SPD_ETERNAL, PETSC_TRUE));<br>
</div>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
Yes</div>
<div><br>
<blockquote type="cite">
<div>
<div dir="ltr">
<div dir="ltr">
<div><br>
</div>
<div>Do that to get CG Eigen estimates. Outright failure is usually caused by a bad Eigen estimate.</div>
<div>-pc_gamg_esteig_ksp_monitor_singular_value<br>
</div>
<div>Will print out the estimates as its iterating. You can look at that to check that the max has converged.</div>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
I just did, and something is off:</div>
<div>I do multiple calls to SNESSolve (staggered scheme for phase-field fracture), but only get informations on the first solve (which is not the one failing, of course)</div>
<div>Here is what I get:</div>
<div>
<div>
<div>Residual norms for Displacement_pc_gamg_esteig_ solve.</div>
<div> 0 KSP Residual norm 7.636421712860e+01 % max 1.000000000000e+00 min 1.000000000000e+00 max/min 1.000000000000e+00</div>
<div> 1 KSP Residual norm 3.402024867977e+01 % max 1.114319928921e+00 min 1.114319928921e+00 max/min 1.000000000000e+00</div>
<div> 2 KSP Residual norm 2.124815079671e+01 % max 1.501143586520e+00 min 5.739351119078e-01 max/min 2.615528402732e+00</div>
<div> 3 KSP Residual norm 1.581785698912e+01 % max 1.644351137983e+00 min 3.263683482596e-01 max/min 5.038329074347e+00</div>
<div> 4 KSP Residual norm 1.254871990315e+01 % max 1.714668863819e+00 min 2.044075812142e-01 max/min 8.388479789416e+00</div>
<div> 5 KSP Residual norm 1.051198229090e+01 % max 1.760078533063e+00 min 1.409327403114e-01 max/min 1.248878386367e+01</div>
<div> 6 KSP Residual norm 9.061658306086e+00 % max 1.792995287686e+00 min 1.023484740555e-01 max/min 1.751853463603e+01</div>
<div> 7 KSP Residual norm 8.015529297567e+00 % max 1.821497535985e+00 min 7.818018001928e-02 max/min 2.329871248104e+01</div>
<div> 8 KSP Residual norm 7.201063258957e+00 % max 1.855140071935e+00 min 6.178572472468e-02 max/min 3.002538337458e+01</div>
<div> 9 KSP Residual norm 6.548491711695e+00 % max 1.903578294573e+00 min 5.008612895206e-02 max/min 3.800609738466e+01</div>
<div> 10 KSP Residual norm 6.002109992255e+00 % max 1.961356890125e+00 min 4.130572033722e-02 max/min 4.748390475004e+01</div>
<div> Residual norms for Displacement_pc_gamg_esteig_ solve.</div>
<div> 0 KSP Residual norm 2.373573910237e+02 % max 1.000000000000e+00 min 1.000000000000e+00 max/min 1.000000000000e+00</div>
<div> 1 KSP Residual norm 8.845061415709e+01 % max 1.081192207576e+00 min 1.081192207576e+00 max/min 1.000000000000e+00</div>
<div> 2 KSP Residual norm 5.607525485152e+01 % max 1.345947059840e+00 min 5.768825326129e-01 max/min 2.333138869267e+00</div>
<div> 3 KSP Residual norm 4.123522550864e+01 % max 1.481153523075e+00 min 3.070603564913e-01 max/min 4.823655974348e+00</div>
<div> 4 KSP Residual norm 3.345765664017e+01 % max 1.551374710727e+00 min 1.953487694959e-01 max/min 7.941563771968e+00</div>
<div> 5 KSP Residual norm 2.859712984893e+01 % max 1.604588395452e+00 min 1.313871480574e-01 max/min 1.221267391199e+01</div>
<div> 6 KSP Residual norm 2.525636054248e+01 % max 1.650487481750e+00 min 9.322735730688e-02 max/min 1.770389646804e+01</div>
<div> 7 KSP Residual norm 2.270711391451e+01 % max 1.697243639599e+00 min 6.945419058256e-02 max/min 2.443687883140e+01</div>
<div> 8 KSP Residual norm 2.074739485241e+01 % max 1.737293728907e+00 min 5.319942519758e-02 max/min 3.265624999621e+01</div>
<div> 9 KSP Residual norm 1.912808268870e+01 % max 1.771708608618e+00 min 4.229776586667e-02 max/min 4.188657656771e+01</div>
<div> 10 KSP Residual norm 1.787394414641e+01 % max 1.802834420843e+00 min 3.460455235448e-02 max/min 5.209818645753e+01</div>
<div> Residual norms for Displacement_pc_gamg_esteig_ solve.</div>
<div> 0 KSP Residual norm 1.361990679391e+03 % max 1.000000000000e+00 min 1.000000000000e+00 max/min 1.000000000000e+00</div>
<div> 1 KSP Residual norm 5.377188333825e+02 % max 1.086812916769e+00 min 1.086812916769e+00 max/min 1.000000000000e+00</div>
<div> 2 KSP Residual norm 2.819790765047e+02 % max 1.474233179517e+00 min 6.475176340551e-01 max/min 2.276745994212e+00</div>
<div> 3 KSP Residual norm 1.856720658591e+02 % max 1.646049713883e+00 min 4.391851040105e-01 max/min 3.747963441500e+00</div>
<div> 4 KSP Residual norm 1.446507859917e+02 % max 1.760403013135e+00 min 2.972886103795e-01 max/min 5.921528614526e+00</div>
<div> 5 KSP Residual norm 1.212491636433e+02 % max 1.839250080524e+00 min 1.921591413785e-01 max/min 9.571494061277e+00</div>
<div> 6 KSP Residual norm 1.052783637696e+02 % max 1.887062042760e+00 min 1.275920366984e-01 max/min 1.478981048966e+01</div>
<div> 7 KSP Residual norm 9.230292625762e+01 % max 1.917891358356e+00 min 8.853577120467e-02 max/min 2.166233300122e+01</div>
<div> 8 KSP Residual norm 8.262607594297e+01 % max 1.935857204308e+00 min 6.706949937710e-02 max/min 2.886345093206e+01</div>
<div> 9 KSP Residual norm 7.616474911000e+01 % max 1.946323901431e+00 min 5.354310733090e-02 max/min 3.635059671458e+01</div>
<div> 10 KSP Residual norm 7.138356892221e+01 % max 1.954382723686e+00 min 4.367661484659e-02 max/min 4.474666204216e+01</div>
<div> Residual norms for Displacement_pc_gamg_esteig_ solve.</div>
<div> 0 KSP Residual norm 3.702300162209e+03 % max 1.000000000000e+00 min 1.000000000000e+00 max/min 1.000000000000e+00</div>
<div> 1 KSP Residual norm 1.255008322497e+03 % max 9.938792139169e-01 min 9.938792139169e-01 max/min 1.000000000000e+00</div>
<div> 2 KSP Residual norm 6.727201181977e+02 % max 1.297844907149e+00 min 6.478406586220e-01 max/min 2.003339694532e+00</div>
<div> 3 KSP Residual norm 5.218419298230e+02 % max 1.435817121668e+00 min 3.868381643086e-01 max/min 3.711673909512e+00</div>
<div> 4 KSP Residual norm 4.562548407646e+02 % max 1.507841675332e+00 min 1.835807205925e-01 max/min 8.213507771759e+00</div>
<div> 5 KSP Residual norm 3.829651184063e+02 % max 1.544809112105e+00 min 9.645201420491e-02 max/min 1.601634890510e+01</div>
<div> 6 KSP Residual norm 2.858162778588e+02 % max 1.571662611009e+00 min 6.326714268751e-02 max/min 2.484168786904e+01</div>
<div> 7 KSP Residual norm 2.074805889949e+02 % max 1.587767457742e+00 min 5.145942909400e-02 max/min 3.085474296347e+01</div>
<div> 8 KSP Residual norm 1.566220417755e+02 % max 1.597548616381e+00 min 4.650092979233e-02 max/min 3.435519727274e+01</div>
<div> 9 KSP Residual norm 1.157894309297e+02 % max 1.603863600136e+00 min 4.344076378399e-02 max/min 3.692070443585e+01</div>
<div> 10 KSP Residual norm 8.447209442299e+01 % max 1.608204129656e+00 min 4.123402730882e-02 max/min 3.900186895670e+01</div>
<div> Linear Displacement_ solve converged due to CONVERGED_RTOL iterations 14</div>
<div><br>
</div>
<div><br>
</div>
</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>
<blockquote type="cite">
<div>
<div dir="ltr">
<div dir="ltr">
<div><br>
</div>
<div>* -pc_gamg_aggressive_coarsening 0<br>
</div>
<div><br>
</div>
<div>will slow coarsening as well as threshold.</div>
</div>
</div>
</div>
</blockquote>
That did not help</div>
<div><br>
<blockquote type="cite">
<div>
<div dir="ltr">
<div dir="ltr">
<div><br>
</div>
<div>* you can run with '-info :pc' and send me the output (grep on GAMG)</div>
</div>
</div>
</div>
</blockquote>
<div>Let’s try to figure out if the fact that -pc_gamg_esteig_ksp_monitor_singular_value is an indication of a problem first.</div>
<div><br>
</div>
<div>Blaise</div>
<div><br>
</div>
</div>
<div>
<div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">
<div>— <br>
Canada Research Chair in Mathematical and Computational Aspects of Solid Mechanics (Tier 1)</div>
<div>Professor, Department of Mathematics & Statistics<br>
Hamilton Hall room 409A, McMaster University<br>
1280 Main Street West, Hamilton, Ontario L8S 4K1, Canada <br>
<a href="https://www.math.mcmaster.ca/bourdin" target="_blank">https://www.math.mcmaster.ca/bourdin</a> | +1 (905) 525 9140 ext. 27243</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
</div>
</blockquote></div>