<html aria-label="message body"><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">  Looks reasonable. Send the output running with <div><br></div><div>   -ksp_monitor -mg_levels_ksp_monitor -ksp_converged_reason -mg_levels_ksp_converged_reason<br id="lineBreakAtBeginningOfMessage"><div><br><blockquote type="cite"><div>On Sep 26, 2025, at 1:19 PM, Moral Sanchez, Elena <Elena.Moral.Sanchez@ipp.mpg.de> wrote:</div><br class="Apple-interchange-newline"><div><meta charset="UTF-8"><div id="divtagdefaultwrapper" dir="ltr" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;"><div style="margin-top: 0px; margin-bottom: 0px;">Dear Barry,</div><div style="margin-top: 0px; margin-bottom: 0px;"><br></div><div style="margin-top: 0px; margin-bottom: 0px;">This is -ksp_view for the smoother at the finest level:</div><p style="margin-top: 0px; margin-bottom: 0px;"></p><div><blockquote>KSP Object: (mg_levels_1_) 1 MPI process<br>  type: cg<br>    variant HERMITIAN<br>  maximum iterations=10, nonzero initial guess<br>  tolerances: relative=0.1, absolute=0.1, divergence=1e+30<br>  left preconditioning<br>  using UNPRECONDITIONED norm type for convergence test<br>PC Object: (mg_levels_1_) 1 MPI process<br>  type: none<br>  linear system matrix = precond matrix:<br>  Mat Object: 1 MPI process<br>    type: python<br>    rows=524, cols=524<br>        Python: Solver_petsc.LeastSquaresOperator<br></blockquote>And at the coarsest level:<br><blockquote><div>KSP Object: (mg_coarse_) 1 MPI process<br>  type: cg<br>    variant HERMITIAN<br>  maximum iterations=100, initial guess is zero<br>  tolerances: relative=0.1, absolute=0.1, divergence=1e+30<br>  left preconditioning<br>  using UNPRECONDITIONED norm type for convergence test<br>PC Object: (mg_coarse_) 1 MPI process<br>  type: none<br>  linear system matrix = precond matrix:<br>  Mat Object: 1 MPI process<br>    type: python<br>    rows=344, cols=344<br>        Python: Solver_petsc.LeastSquaresOperator</div></blockquote>And for the whole solver:</div><div><blockquote><div>KSP Object: 1 MPI process<br>  type: cg<br>    variant HERMITIAN<br>  maximum iterations=100, nonzero initial guess<br>  tolerances: relative=1e-08, absolute=1e-09, divergence=10000.<br>  left preconditioning<br>  using UNPRECONDITIONED norm type for convergence test<br>PC Object: 1 MPI process<br>  type: mg<br>    type is MULTIPLICATIVE, levels=2 cycles=v<br>      Cycles per PCApply=1<br>      Not using Galerkin computed coarse grid matrices<br>  Coarse grid solver -- level 0 -------------------------------<br>    KSP Object: (mg_coarse_) 1 MPI process<br>      type: cg<br>        variant HERMITIAN<br>      maximum iterations=100, initial guess is zero<br>      tolerances: relative=0.1, absolute=0.1, divergence=1e+30<br>      left preconditioning<br>      using UNPRECONDITIONED norm type for convergence test<br>    PC Object: (mg_coarse_) 1 MPI process<br>      type: none<br>      linear system matrix = precond matrix:<br>      Mat Object: 1 MPI process<br>        type: python<br>        rows=344, cols=344<br>            Python: Solver_petsc.LeastSquaresOperator<br>  Down solver (pre-smoother) on level 1 -------------------------------<br>    KSP Object: (mg_levels_1_) 1 MPI process<br>      type: cg<br>        variant HERMITIAN<br>      maximum iterations=10, nonzero initial guess<br>      tolerances: relative=0.1, absolute=0.1, divergence=1e+30<br>      left preconditioning<br>      using UNPRECONDITIONED norm type for convergence test<br>    PC Object: (mg_levels_1_) 1 MPI process<br>      type: none<br>      linear system matrix = precond matrix:<br>      Mat Object: 1 MPI process<br>        type: python<br>        rows=524, cols=524<br>            Python: Solver_petsc.LeastSquaresOperator<br>  Up solver (post-smoother) same as down solver (pre-smoother)<br>  linear system matrix = precond matrix:<br>  Mat Object: 1 MPI process<br>    type: python<br>    rows=524, cols=524<br>        Python: Solver_petsc.LeastSquaresOperator</div></blockquote>Best,</div><div>Elena</div><br><p style="margin-top: 0px; margin-bottom: 0px;"></p></div><hr tabindex="-1" style="font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; display: inline-block; width: 1043.6875px;"><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;"></span><div id="divRplyFwdMsg" dir="ltr" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><font face="Calibri, sans-serif" style="font-size: 11pt;"><b>From:</b><span class="Apple-converted-space"> </span>Barry Smith <<a href="mailto:bsmith@petsc.dev">bsmith@petsc.dev</a>><br><b>Sent:</b><span class="Apple-converted-space"> </span>26 September 2025 19:05:02<br><b>To:</b><span class="Apple-converted-space"> </span>Moral Sanchez, Elena<br><b>Cc:</b><span class="Apple-converted-space"> </span><a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a><br><b>Subject:</b><span class="Apple-converted-space"> </span>Re: [petsc-users] setting correct tolerances for MG smoother CG at the finest level</font><div> </div></div><div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">  <div>Send the output using -ksp_view </div><div><br></div><div>Normally one uses a fixed number of iterations of smoothing  on level with multigrid rather than a tolerance, but yes PETSc should respect such a tolerance.</div><div><br></div><div>Barry</div><div><br id="lineBreakAtBeginningOfMessage"><div><br><blockquote type="cite"><div>On Sep 26, 2025, at 12:49 PM, Moral Sanchez, Elena <<a href="mailto:Elena.Moral.Sanchez@ipp.mpg.de">Elena.Moral.Sanchez@ipp.mpg.de</a>> wrote:</div><br class="Apple-interchange-newline"><div><div id="divtagdefaultwrapper" dir="ltr" style="font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;"><p style="margin-top: 0px; margin-bottom: 0px;"></p><div>Hi, <br>I am using multigrid (multiplicative) as a preconditioner with a V-cycle of two levels. At each level, I am setting CG as the smoother with certain tolerance.<br><br>What I observe is that in the finest level the CG continues iterating after the residual norm reaches the tolerance (atol) and it only stops when reaching the maximum number of iterations at that level. At the coarsest level this does not occur and the CG stops when the tolerance is reached.<br><br>I double-checked that the smoother at the finest level has the right tolerance. And I am using a Monitor function to track the residual.<br><br>Do you know how to make the smoother at the finest level stop when reaching the tolerance?<br><br>Cheers,<br>Elena.</div></div></div></blockquote></div></div></div></div></blockquote></div><br></div></body></html>