<html><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;"><div><br></div><div>static PetscErrorCode KSPFGMRESCycle(PetscInt *itcount, KSP ksp)</div><div>{</div><div>...</div><div>  PetscCall(VecNorm(VEC_VV(0), NORM_2, &res_norm));</div><div><br></div><div><br></div><div>  /* The first entry in the right-hand side of the Hessenberg system is just</div><div>     the initial residual norm */</div><div>  *RS(0) = res_norm;</div><div><br></div><div>  ksp->rnorm = res_norm;</div><div><br></div><div>...</div><div><br></div><div>  /* scale VEC_VV (the initial residual) */</div><div>  PetscCall(VecScale(VEC_VV(0), 1.0 / res_norm));</div><div><br></div><div><br></div><div>So, it is expected behavior. GMRES scales the initial residual so it has norm 1, chugs along doing its thing and then when it builds the solution at the end, it knows it has solved the scaled problem so unscales it in KSPFGMRESBuildSoln()  with PetscCall(VecMAXPBY(VEC_TEMP, it + 1, nrs, 0, &PREVEC(0))); the first entry of nrs[0] contains what was set in *RS(0) = res_norm;</div><div><br></div><div>The KSPMonitor on the outer GMRES knows that the GMRES is solving a scaled right-hand side, so it still prints the correct original unscaled residual at each iteration.</div><div><br></div><div>It is a peculiar feature of the GMES family, the subproblems that are solved are scaled from the original problem. Presumably, this is also true for block Jacobi etc.</div><div><br></div><div><br></div><div><br></div><div><br><blockquote type="cite"><div>On Sep 17, 2024, at 11:48 AM, miguel.salazar <miguel.salazar@corintis.com> wrote:</div><br class="Apple-interchange-newline"><div><meta charset="UTF-8"><div class="WordSection1" style="page: WordSection1; 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 style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">Is this the expected behavior though? I am not sure if it might be an issue with the Firedrake implementation. Getting a minimum example on PETSc like this one is not trivial<o:p></o:p></span></div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;"><o:p> </o:p></span></div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">Miguel<o:p></o:p></span></div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;"><o:p> </o:p></span></div><div style="font-size: 10pt; font-family: Arial;"><br class="webkit-block-placeholder"></div><table cellspacing="0" cellpadding="0" border="0" style="width: 409px;"><tbody><tr><td valign="top" style="font-size: 10pt; font-family: Arial; width: 260px; padding-bottom: 20px;"><br></td><td valign="top" style="font-size: 10pt; font-family: Arial; width: 149px; padding-bottom: 20px;"><br></td></tr><tr><td valign="top" colspan="1" style="width: 260px; font-family: Arial; color: rgb(138, 138, 140); font-size: 8pt; line-height: 14pt; padding: 0px 0px 15px;"><span data-codetwo-visible="Name"><b style="color: rgb(27, 20, 100);">MIGUEL ANGEL SALAZAR DE TROYA<br></b></span><span style="font-size: 8pt; color: rgb(138, 138, 140);"><span data-codetwo-visible="Job title">Head of Software Engineering</span></span><br><span data-codetwo-visible="Email"><a href="mailto:miguel.salazar@corintis.com" style="color: rgb(138, 138, 140); text-decoration: underline; font-size: 8pt;"><em>miguel.salazar@corintis.com</em></a><br></span><span data-codetwo-visible="Phone">Corintis SA<br></span><span data-codetwo-visible="Company address">EPFL Innovation Park Building C<br>1015 Lausanne<br></span></td><td valign="top" colspan="1" style="width: 149px; font-family: Arial; line-height: 14pt; padding: 0px 0px 15px;"><span id="cid:2024-08-1609_02_11-re_mailmigrationfromgoogletooffice365-sebastien.gobel@corintis.com-co_4456a1bf-dd3e-46b7-85f9-21f278e66a79.png"><2024-08-1609_02_11-re_mailmigrationfromgoogletooffice365-sebastien.gobel@corintis.com-co_4456a1bf-dd3e-46b7-85f9-21f278e66a79.png></span></td></tr><tr data-codetwo-visible="Disclaimer"><td valign="top" colspan="2" style="font-size: 7pt; font-family: Arial; width: 409px; color: rgb(255, 255, 255); padding: 3px 10px; background-color: rgb(27, 20, 100);">Here at Corintis we care for your privacy. That is why we have taken appropriate measures to ensure that the data you have provided to us is always secure.</td></tr></tbody></table><div id="mail-editor-reference-message-container"><div><div><div style="border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) currentcolor currentcolor; border-image: none; padding: 3pt 0cm 0cm;"><p class="MsoNormal" style="margin: 0cm 0cm 12pt; font-size: 12pt; font-family: Aptos, sans-serif;"><b><span style="">From:<span class="Apple-converted-space"> </span></span></b><span style="">Barry Smith <<a href="mailto:bsmith@petsc.dev" style="color: blue; text-decoration: underline;">bsmith@petsc.dev</a>><br><b>Date:<span class="Apple-converted-space"> </span></b>Tuesday, 17 September 2024 at 16:58<br><b>To:<span class="Apple-converted-space"> </span></b>miguel.salazar <<a href="mailto:miguel.salazar@corintis.com" style="color: blue; text-decoration: underline;">miguel.salazar@corintis.com</a>><br><b>Cc:<span class="Apple-converted-space"> </span></b><a href="mailto:petsc-users@mcs.anl.gov" style="color: blue; text-decoration: underline;">petsc-users@mcs.anl.gov</a><span class="Apple-converted-space"> </span><<a href="mailto:petsc-users@mcs.anl.gov" style="color: blue; text-decoration: underline;">petsc-users@mcs.anl.gov</a>><br><b>Subject:<span class="Apple-converted-space"> </span></b>Re: [petsc-users] Residual at the fieldsplit level<o:p></o:p></span></p></div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><o:p> </o:p></div></div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">   Ok. Please ignore my last message about fieldsplit_0_fieldsplit_0 I misunderstood <o:p></o:p></div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><o:p> </o:p></div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><br><br><o:p></o:p></div><blockquote style="margin-top: 5pt; margin-bottom: 5pt;"><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">On Sep 17, 2024, at 10:52<span style="font-family: Arial, sans-serif;"> </span>AM, miguel.salazar <<a href="mailto:miguel.salazar@corintis.com" style="color: blue; text-decoration: underline;">miguel.salazar@corintis.com</a>> wrote:<o:p></o:p></div></div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><o:p> </o:p></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">That is correct</span><o:p></o:p></div></div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;"> </span><o:p></o:p></div></div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 10pt; font-family: Arial, sans-serif;"><o:p> </o:p></span></div></div><table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="409" style="width: 306.75pt;"><tbody><tr><td width="260" valign="top" style="width: 195pt; padding: 0cm 0cm 15pt;"></td><td width="149" valign="top" style="width: 111.75pt; padding: 0cm 0cm 15pt;"></td></tr><tr><td width="260" valign="top" style="width: 195pt; padding: 0cm 0cm 11.25pt;"><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif; line-height: 14pt;"><b><span style="font-size: 8pt; font-family: Arial, sans-serif; color: rgb(27, 20, 100);">MIGUEL ANGEL SALAZAR DE TROYA<br></span></b><span style="font-size: 8pt; font-family: Arial, sans-serif; color: rgb(138, 138, 140);">Head of Software Engineering<br><a href="mailto:miguel.salazar@corintis.com" style="color: blue; text-decoration: underline;"><em><span style="font-family: Arial, sans-serif; color: rgb(138, 138, 140);">miguel.salazar@corintis.com</span></em></a><br>Corintis SA<br>EPFL Innovation Park Building C<br>1015 Lausanne<br><br><o:p></o:p></span></div></td><td width="149" valign="top" style="width: 111.75pt; padding: 0cm 0cm 11.25pt;"><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif; line-height: 14pt;"><span style="font-family: Arial, sans-serif;"><2024-08-1609_02_11-re_mailmigrationfromgoogletooffice365-sebastien.gobel@corintis.com-co_4456a1bf-dd3e-46b7-85f9-21f278e66a79.png><o:p></o:p></span></div></td></tr><tr><td width="409" colspan="2" valign="top" style="width: 306.75pt; background: rgb(27, 20, 100); padding: 2.25pt 7.5pt;"><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 7pt; font-family: Arial, sans-serif; color: white;">Here at Corintis we care for your privacy. That is why we have taken appropriate measures to ensure that the data you have provided to us is always secure.<o:p></o:p></span></div></td></tr></tbody></table><div id="mail-editor-reference-message-container"><div><div><div style="border-width: 1pt medium medium; border-style: solid none none; border-image: none; padding: 3pt 0cm 0cm; border-color: currentcolor;"><p class="MsoNormal" style="margin: 0cm 0cm 12pt; font-size: 12pt; font-family: Aptos, sans-serif;"><b>From:<span class="apple-converted-space"> </span></b>Barry Smith <<a href="mailto:bsmith@petsc.dev" style="color: blue; text-decoration: underline;">bsmith@petsc.dev</a>><br><b>Date:<span class="apple-converted-space"> </span></b>Tuesday, 17 September 2024 at 16:49<br><b>To:<span class="apple-converted-space"> </span></b>miguel.salazar <<a href="mailto:miguel.salazar@corintis.com" style="color: blue; text-decoration: underline;">miguel.salazar@corintis.com</a>><br><b>Cc:<span class="apple-converted-space"> </span></b><a href="mailto:petsc-users@mcs.anl.gov" style="color: blue; text-decoration: underline;">petsc-users@mcs.anl.gov</a><span class="apple-converted-space"> </span><<a href="mailto:petsc-users@mcs.anl.gov" style="color: blue; text-decoration: underline;">petsc-users@mcs.anl.gov</a>><br><b>Subject:<span class="apple-converted-space"> </span></b>Re: [petsc-users] Residual at the fieldsplit level<o:p></o:p></p></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"> <o:p></o:p></div></div></div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">   So firedrake_0 is the object prefix of your SNES object?<o:p></o:p></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"> <o:p></o:p></div></div><div><div><p class="MsoNormal" style="margin: 0cm 0cm 12pt; font-size: 12pt; font-family: Aptos, sans-serif;"><o:p> </o:p></p></div><blockquote style="margin-top: 5pt; margin-bottom: 5pt;"><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">On Sep 17, 2024, at 10:37<span style="font-family: Arial, sans-serif;"> </span>AM, miguel.salazar <<a href="mailto:miguel.salazar@corintis.com" style="color: blue; text-decoration: underline;">miguel.salazar@corintis.com</a>> wrote:<o:p></o:p></div></div></div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"> <o:p></o:p></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;"> </span><span lang="EN-US" style="font-size: 11pt;">></span><span style="font-size: 11pt;">In my reading, it says </span><o:p></o:p></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">>Residual norms for firedrake_0_ solve.</span><o:p></o:p></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">>    0 KSP Residual norm 4.621368953027e+02</span><o:p></o:p></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;"> </span><o:p></o:p></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">></span><span style="font-size: 11pt;">     so the residual in the first (0th) split  does correspond to the outer-most KSP residual norm (not printed but equal to the SNES at the first iteration of Newton.</span><o:p></o:p></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;"> </span><o:p></o:p></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">></span><span style="font-size: 11pt;">     It is the residual norm of the first field of the first field that is 1</span><o:p></o:p></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;"> </span><o:p></o:p></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">>Residual norms for firedrake_0_fieldsplit_0_ solve.</span><o:p></o:p></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;"> >     0 KSP Residual norm 1.000000000000e+00</span><o:p></o:p></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;"> </span><o:p></o:p></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">Residual norms for firedrake_0_ solve.</span><o:p></o:p></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">   0 KSP Residual norm 4.621368953027e+02</span><o:p></o:p></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;"> </span><o:p></o:p></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">Is the residual of the outer solve (it is being printed).</span><o:p></o:p></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;"> </span><o:p></o:p></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">Residual norms for firedrake_0_fieldsplit_0_ solve.</span><o:p></o:p></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">   0 KSP Residual norm 1.000000000000e+00</span><o:p></o:p></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;"> </span><o:p></o:p></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">Is the residual of the first field. I am not sure what you are referring to with “</span><span style="font-size: 11pt;">the residual norm of the first field of the first field</span><span lang="EN-US" style="font-size: 11pt;">”</span><o:p></o:p></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;"> </span><o:p></o:p></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">Thanks,</span><o:p></o:p></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">Miguel</span><o:p></o:p></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;"> </span><o:p></o:p></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;"> </span><o:p></o:p></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;"> </span><o:p></o:p></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 10pt; font-family: Arial, sans-serif;"> </span><o:p></o:p></div></div></div><table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="409" style="width: 306.75pt;"><tbody><tr><td width="260" valign="top" style="width: 195pt; padding: 0cm 0cm 15pt;"></td><td width="149" valign="top" style="width: 111.75pt; padding: 0cm 0cm 15pt;"></td></tr><tr><td width="260" valign="top" style="width: 195pt; padding: 0cm 0cm 11.25pt;"><div><p class="MsoNormal" style="margin: 0cm 0cm 12pt; font-size: 12pt; font-family: Aptos, sans-serif; line-height: 14pt;"><b><span style="font-size: 8pt; font-family: Arial, sans-serif; color: rgb(27, 20, 100);">MIGUEL ANGEL SALAZAR DE TROYA<br></span></b><span style="font-size: 8pt; font-family: Arial, sans-serif; color: rgb(138, 138, 140);">Head of Software Engineering<br><a href="mailto:miguel.salazar@corintis.com" style="color: blue; text-decoration: underline;"><em><span style="font-family: Arial, sans-serif; color: rgb(138, 138, 140);">miguel.salazar@corintis.com</span></em></a><br>Corintis SA<br>EPFL Innovation Park Building C<br>1015 Lausanne</span><o:p></o:p></p></div></td><td width="149" valign="top" style="width: 111.75pt; padding: 0cm 0cm 11.25pt;"><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif; line-height: 14pt;"><span style="font-family: Arial, sans-serif;"><2024-08-1609_02_11-re_mailmigrationfromgoogletooffice365-sebastien.gobel@corintis.com-co_4456a1bf-dd3e-46b7-85f9-21f278e66a79.png></span><o:p></o:p></div></div></td></tr><tr><td width="409" colspan="2" valign="top" style="width: 306.75pt; background: rgb(27, 20, 100); padding: 2.25pt 7.5pt;"><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 7pt; font-family: Arial, sans-serif; color: white;">Here at Corintis we care for your privacy. That is why we have taken appropriate measures to ensure that the data you have provided to us is always secure.</span><o:p></o:p></div></div></td></tr></tbody></table><div id="mail-editor-reference-message-container"><div><div><div style="border-width: 1pt medium medium; border-style: solid none none; border-image: none; padding: 3pt 0cm 0cm; border-color: currentcolor;"><p class="MsoNormal" style="margin: 0cm 0cm 12pt; font-size: 12pt; font-family: Aptos, sans-serif;"><b>From:<span class="apple-converted-space"> </span></b>Barry Smith <<a href="mailto:bsmith@petsc.dev" style="color: blue; text-decoration: underline;">bsmith@petsc.dev</a>><br><b>Date:<span class="apple-converted-space"> </span></b>Tuesday, 17 September 2024 at 16:24<br><b>To:<span class="apple-converted-space"> </span></b>miguel.salazar <<a href="mailto:miguel.salazar@corintis.com" style="color: blue; text-decoration: underline;">miguel.salazar@corintis.com</a>><br><b>Cc:<span class="apple-converted-space"> </span></b><a href="mailto:petsc-users@mcs.anl.gov" style="color: blue; text-decoration: underline;">petsc-users@mcs.anl.gov</a><span class="apple-converted-space"> </span><<a href="mailto:petsc-users@mcs.anl.gov" style="color: blue; text-decoration: underline;">petsc-users@mcs.anl.gov</a>><br><b>Subject:<span class="apple-converted-space"> </span></b>Re: [petsc-users] Residual at the fieldsplit level<o:p></o:p></p></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"> <o:p></o:p></div></div></div></div><div><blockquote style="margin-top: 5pt; margin-bottom: 5pt;"><div><div id="mail-editor-reference-message-container"><blockquote style="margin-top: 5pt; margin-bottom: 5pt;"><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">Initial residual: 462.13689530272404</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">  0 SNES Function norm 4.621368953027e+02</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">    Residual norms for firedrake_0_ solve.</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">    0 KSP Residual norm 4.621368953027e+02</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">      Residual norms for firedrake_0_fieldsplit_0_ solve.</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">     <span class="apple-converted-space"> </span></span><span lang="IT-CH" style="font-size: 11pt;">0 KSP Residual norm 1.000000000000e+00</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="IT-CH" style="font-size: 11pt;">      1 KSP Residual norm 3.501082228626e-15</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="IT-CH" style="font-size: 11pt;">     <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 11pt;">Residual norms for firedrake_0_fieldsplit_1_ solve.</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">     <span class="apple-converted-space"> </span></span><span lang="IT-CH" style="font-size: 11pt;">0 KSP Residual norm 0.000000000000e+00</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="IT-CH" style="font-size: 11pt;">      1 KSP Residual norm 0.000000000000e+00</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="IT-CH" style="font-size: 11pt;">   <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 11pt;">1 KSP Residual norm 1.612167203819e-12</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">  1 SNES Function norm 1.599350481360e-12<br>```</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;"> </span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">Using the fieldsplit additive preconditioner, the problem converges in a single KSP iteration, as expected. However, I do not understand<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 11pt;">why the</span><span class="apple-converted-space"><span style="font-size: 11pt;"> </span></span><span style="font-size: 11pt;">residual of fieldsplit_0 (1e+0) does not coincide with the outer residual (462.13689530272404)</span><span lang="EN-US" style="font-size: 11pt;">. It should be the case given that only<span class="apple-converted-space"> </span></span><span style="font-size: 11pt;">fieldsplit_0 has</span><span class="apple-converted-space"><span lang="EN-US" style="font-size: 11pt;"> </span></span><span lang="EN-US" style="font-size: 11pt;">a non-zero residual contribution</span><span style="font-size: 11pt;">. The fact that it is just 1 is suspicious. Is there something about how the fieldsplit works that I am missing?</span><o:p></o:p></div></div></div></div></div></blockquote></div></div></blockquote></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"> <o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">     In my reading, it says <o:p></o:p></div></div></div></div><div><blockquote style="margin-top: 5pt; margin-bottom: 5pt;"><div><div id="mail-editor-reference-message-container"><blockquote style="margin-top: 5pt; margin-bottom: 5pt;"><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">Residual norms for firedrake_0_ solve.</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">    0 KSP Residual norm 4.621368953027e+02</span><o:p></o:p></div></div></div></div></div></blockquote></div></div></blockquote><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"> <o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">     so the <span style="font-size: 11pt;">residual in the first (0th) split  does correspond to the outer-most KSP residual norm (not printed but equal to the SNES at the first iteration of Newton.</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"> <o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">     It is the residual norm of the first field of the first field that is 1</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"> <o:p></o:p></div></div></div></div><div><blockquote style="margin-top: 5pt; margin-bottom: 5pt;"><div><div id="mail-editor-reference-message-container"><blockquote style="margin-top: 5pt; margin-bottom: 5pt;"><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">Residual norms for firedrake_0_fieldsplit_0_ solve.</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">     <span class="apple-converted-space"> </span></span><span lang="IT-CH" style="font-size: 11pt;">0 KSP Residual norm 1.000000000000e+00</span><o:p></o:p></div></div></div></div></div></blockquote></div></div></blockquote><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"> <o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">   Or am I missing something<o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"> <o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">   Barry<o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"> <o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"> <o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"> <o:p></o:p></div></div></div></div><div><p class="MsoNormal" style="margin: 0cm 0cm 12pt; font-size: 12pt; font-family: Aptos, sans-serif;"> <o:p></o:p></p></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"> <o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"> <o:p></o:p></div></div></div></div><blockquote style="margin-top: 5pt; margin-bottom: 5pt;"><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">Initial residual: 462.13689530272404</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">  0 SNES Function norm 4.621368953027e+02</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">    Residual norms for firedrake_0_ solve.</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">    0 KSP Residual norm 4.621368953027e+02</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">      Residual norms for firedrake_0_ solve.</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">      0 KSP unpreconditioned resid norm 4.621368953027e+02 true resid norm 4.621368953027e+02 ||r(i)||/||b|| 1.000000000000e+00</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">        Residual norms for firedrake_0_fieldsplit_0_ solve.</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">        0 KSP Residual norm 1.000000000000e+00</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">        Residual norms for firedrake_0_fieldsplit_0_ solve.</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">        </span><span lang="IT-CH" style="font-size: 11pt;">0 KSP none resid norm 1.000000000000e+00 true resid norm 3.501082228626e-15 ||r(i)||/||b|| 3.501082228626e-15</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="IT-CH" style="font-size: 11pt;">        1 KSP Residual norm 3.501082228626e-15</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="IT-CH" style="font-size: 11pt;">      1 KSP none resid norm 3.501082228626e-15 true resid norm 3.501082228626e-15 ||r(i)||/||b|| 3.501082228626e-15</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="IT-CH" style="font-size: 11pt;">        </span><span lang="EN-US" style="font-size: 11pt;">Residual norms for firedrake_0_fieldsplit_1_ solve.</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">        0 KSP Residual norm 0.000000000000e+00</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">        Residual norms for firedrake_0_fieldsplit_1_ solve.</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">        0 KSP none resid norm 0.000000000000e+00 true resid norm 0.000000000000e+00 ||r(i)||/||b|| inf</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">        1 KSP Residual norm 0.000000000000e+00</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">      1 KSP none resid norm 0.000000000000e+00 true resid norm 0.000000000000e+00 ||r(i)||/||b|| inf</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">      1 KSP Residual norm 1.612167203819e-12</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">    1 KSP unpreconditioned resid norm 1.612167203819e-12 true resid norm 1.589286585800e-12 ||r(i)||/||b|| 3.438995245681e-15</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">  1 SNES Function norm 1.599350481360e-12</span><o:p></o:p></div></div></div></div></div></blockquote><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"> <o:p></o:p></div></div></div><div><div><p class="MsoNormal" style="margin: 0cm 0cm 12pt; font-size: 12pt; font-family: Aptos, sans-serif;"> <o:p></o:p></p></div><blockquote style="margin-top: 5pt; margin-bottom: 5pt;"><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">On Sep 17, 2024, at 1:04<span style="font-family: Arial, sans-serif;"> </span>AM, miguel.salazar <<a href="mailto:miguel.salazar@corintis.com" style="color: blue; text-decoration: underline;">miguel.salazar@corintis.com</a>> wrote:<o:p></o:p></div></div></div></div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"> <o:p></o:p></div></div></div><div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">These are the new options (with ksp_monitor_true_residual)<br><br>solver_mumps_assembled = {</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">    "ksp_type": "preonly",</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">    "ksp_monitor": None,</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">    "ksp_monitor_true_residual": None,</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">    "pc_type": "python",</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">    "pc_python_type": "firedrake.AssembledPC",</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">    "assembled_pc_type": "lu",</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">    "assembled_pc_factor_mat_solver_type": "mumps",</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">    "assembled_mat_mumps_icntl_14": 200,</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">    "assembled_mat_mumps_icntl_24": 1,</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">}</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">solver_fieldsplit = {</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">    "mat_type": "matfree",</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">    "snes_monitor": None,</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">    "snes_type": "newtonls",</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">    "ksp_type": "fgmres",</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">    "ksp_monitor_true_residual": None,</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">   <span class="apple-converted-space"> </span></span><span lang="IT-CH" style="font-size: 11pt;">"ksp_rtol": 1e-1,</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="IT-CH" style="font-size: 11pt;">    "ksp_monitor": None,</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="IT-CH" style="font-size: 11pt;">   <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 11pt;">"pc_type": "fieldsplit",</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">    "pc_fieldsplit_type": "additive",</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">    "fieldsplit_0": solver_mumps_assembled,</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">    "fieldsplit_1": solver_mumps_assembled,</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">}</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;"> </span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">And this is the output</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;"> </span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">Initial residual: 462.13689530272404</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">  0 SNES Function norm 4.621368953027e+02</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">    Residual norms for firedrake_0_ solve.</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">    0 KSP Residual norm 4.621368953027e+02</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">    Residual norms for firedrake_0_ solve.</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">    0 KSP unpreconditioned resid norm 4.621368953027e+02 true resid norm 4.621368953027e+02 ||r(i)||/||b|| 1.000000000000e+00</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">      Residual norms for firedrake_0_fieldsplit_0_ solve.</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">      0 KSP Residual norm 1.000000000000e+00</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">      Residual norms for firedrake_0_fieldsplit_0_ solve.</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">     <span class="apple-converted-space"> </span></span><span lang="IT-CH" style="font-size: 11pt;">0 KSP none resid norm 1.000000000000e+00 true resid norm 3.501082228626e-15 ||r(i)||/||b|| 3.501082228626e-15</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="IT-CH" style="font-size: 11pt;">      1 KSP Residual norm 3.501082228626e-15</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="IT-CH" style="font-size: 11pt;">      1 KSP none resid norm 3.501082228626e-15 true resid norm 3.501082228626e-15 ||r(i)||/||b|| 3.501082228626e-15</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="IT-CH" style="font-size: 11pt;">     <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 11pt;">Residual norms for firedrake_0_fieldsplit_1_ solve.</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">      0 KSP Residual norm 0.000000000000e+00</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">      Residual norms for firedrake_0_fieldsplit_1_ solve.</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">      0 KSP none resid norm 0.000000000000e+00 true resid norm 0.000000000000e+00 ||r(i)||/||b|| inf</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">      1 KSP Residual norm 0.000000000000e+00</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">      1 KSP none resid norm 0.000000000000e+00 true resid norm 0.000000000000e+00 ||r(i)||/||b|| inf</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">    1 KSP Residual norm 1.612167203819e-12</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">    1 KSP unpreconditioned resid norm 1.612167203819e-12 true resid norm 1.589286585800e-12 ||r(i)||/||b|| 3.438995245681e-15</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">  1 SNES Function norm 1.599350481360e-12</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;"> </span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">The true residual is very low. (</span><span lang="IT-CH" style="font-size: 11pt;">3.501082228626e-15)</span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;"> </span><o:p></o:p></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 10pt; font-family: Arial, sans-serif;"> </span><o:p></o:p></div></div></div></div><table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="409" style="width: 306.75pt;"><tbody><tr><td width="260" valign="top" style="width: 195pt; padding: 0cm 0cm 15pt;"></td><td width="149" valign="top" style="width: 111.75pt; padding: 0cm 0cm 15pt;"></td></tr><tr><td width="260" valign="top" style="width: 195pt; padding: 0cm 0cm 11.25pt;"><div><p class="MsoNormal" style="margin: 0cm 0cm 12pt; font-size: 12pt; font-family: Aptos, sans-serif; line-height: 14pt;"><b><span style="font-size: 8pt; font-family: Arial, sans-serif; color: rgb(27, 20, 100);">MIGUEL ANGEL SALAZAR DE TROYA<br></span></b><span style="font-size: 8pt; font-family: Arial, sans-serif; color: rgb(138, 138, 140);">Head of Software Engineering<br><a href="mailto:miguel.salazar@corintis.com" style="color: blue; text-decoration: underline;"><em><span style="font-family: Arial, sans-serif; color: rgb(138, 138, 140);">miguel.salazar@corintis.com</span></em></a><br>Corintis SA<br>EPFL Innovation Park Building C<br>1015 Lausanne</span><o:p></o:p></p></div></td><td width="149" valign="top" style="width: 111.75pt; padding: 0cm 0cm 11.25pt;"><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif; line-height: 14pt;"><span style="font-family: Arial, sans-serif;"><2024-08-1609_02_11-re_mailmigrationfromgoogletooffice365-sebastien.gobel@corintis.com-co_4456a1bf-dd3e-46b7-85f9-21f278e66a79.png></span><o:p></o:p></div></div></div></td></tr><tr><td width="409" colspan="2" valign="top" style="width: 306.75pt; background: rgb(27, 20, 100); padding: 2.25pt 7.5pt;"><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 7pt; font-family: Arial, sans-serif; color: white;">Here at Corintis we care for your privacy. That is why we have taken appropriate measures to ensure that the data you have provided to us is always secure.</span><o:p></o:p></div></div></div></td></tr></tbody></table><div id="mail-editor-reference-message-container"><div><div><div style="border-width: 1pt medium medium; border-style: solid none none; border-image: none; padding: 3pt 0cm 0cm; border-color: currentcolor;"><p class="MsoNormal" style="margin: 0cm 0cm 12pt; font-size: 12pt; font-family: Aptos, sans-serif;"><b>From:<span class="apple-converted-space"> </span></b>Barry Smith <<a href="mailto:bsmith@petsc.dev" style="color: blue; text-decoration: underline;">bsmith@petsc.dev</a>><br><b>Date:<span class="apple-converted-space"> </span></b>Monday, 16 September 2024 at 19:34<br><b>To:<span class="apple-converted-space"> </span></b>miguel.salazar <<a href="mailto:miguel.salazar@corintis.com" style="color: blue; text-decoration: underline;">miguel.salazar@corintis.com</a>><br><b>Cc:<span class="apple-converted-space"> </span></b><a href="mailto:petsc-users@mcs.anl.gov" style="color: blue; text-decoration: underline;">petsc-users@mcs.anl.gov</a><span class="apple-converted-space"> </span><<a href="mailto:petsc-users@mcs.anl.gov" style="color: blue; text-decoration: underline;">petsc-users@mcs.anl.gov</a>><br><b>Subject:<span class="apple-converted-space"> </span></b>Re: [petsc-users] Residual at the fieldsplit level<o:p></o:p></p></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"> <o:p></o:p></div></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">  Try ksp_monitor_true_residual. Let's see if it is an issue of preconditioned vs unpreconditioned residual.<o:p></o:p></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"> <o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"> <o:p></o:p></div></div></div></div><div><div><p class="MsoNormal" style="margin: 0cm 0cm 12pt; font-size: 12pt; font-family: Aptos, sans-serif;"> <o:p></o:p></p></div><blockquote style="margin-top: 5pt; margin-bottom: 5pt;"><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;">On Sep 16, 2024, at 1:05<span style="font-family: Arial, sans-serif;"> </span>PM, miguel.salazar <<a href="mailto:miguel.salazar@corintis.com" style="color: blue; text-decoration: underline;">miguel.salazar@corintis.com</a>> wrote:<o:p></o:p></div></div></div></div></div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"> <o:p></o:p></div></div></div></div><div><div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">Hello,</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;"> </span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">I have this simple example on Firedrake to illustrate my point.  I am solving for a two-component poisson equation (uncoupled). Only the first component has a non-zero residual.<br><br>```<br></span><span style="font-size: 11pt;">import firedrake as fd</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">from firedrake import inner, grad, dx, sin, pi</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;"> </span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">N = 10</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">mesh = fd.UnitSquareMesh(N, N)</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">V = fd.FunctionSpace(mesh, "CG", 1)</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">W = V * V</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">u = fd.Function(W)</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">v = fd.TestFunction(W)</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">a = inner(grad(u[0]), grad(v[0])) * dx + inner(grad(u[1]), grad(v[1])) * dx</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">x = fd.SpatialCoordinate(mesh)</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">f = fd.Function(V)</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">f.interpolate(fd.Constant(1e4) * sin(x[0] * pi) * sin(2 * x[1] * pi))</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">L = f * v[0] * dx</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">F = a - L</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">bcs = [fd.DirichletBC(W.sub(0), fd.Constant(2.0), (1,))]</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;"> </span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;"> </span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">def snes_firedrake_residual(F, u, bcs):</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">    for bcs_ in bcs:</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">        bcs_.apply(u)</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">    residual = fd.assemble(F, bcs=bcs, zero_bc_nodes=True)</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">    with residual.dat.vec_ro as r:</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">        print("Initial residual:", r.norm())</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;"> </span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;"> </span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">snes_firedrake_residual(F, u, bcs)</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;"> </span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;"> </span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">problem = fd.NonlinearVariationalProblem(F, u, bcs=bcs)</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">solver_mumps_assembled = {</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">    "ksp_type": "preonly",</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">    "ksp_monitor": None,</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">    "pc_type": "python",</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">    "pc_python_type": "firedrake.AssembledPC",</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">    "assembled_pc_type": "lu",</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">    "assembled_pc_factor_mat_solver_type": "mumps",</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">    "assembled_mat_mumps_icntl_14": 200,</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">    "assembled_mat_mumps_icntl_24": 1,</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">}</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">solver_fieldsplit = {</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">    "mat_type": "matfree",</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">    "snes_type": "newtonls",</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">    "ksp_type": "fgmres",</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">    "ksp_rtol": 1e-1,</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">    "ksp_monitor": None,</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">    "pc_type": "fieldsplit",</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">    "pc_fieldsplit_type": "additive",</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">    "fieldsplit_0": solver_mumps_assembled,</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">    "fieldsplit_1": solver_mumps_assembled,</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">}</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;"> </span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">solver = fd.NonlinearVariationalSolver(problem, solver_parameters=solver_fieldsplit)</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">solver.solve()</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">```<br><br>The PETSc output is as follow<br><br>```<br>Initial residual: 462.13689530272404</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">  0 SNES Function norm 4.621368953027e+02</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">    Residual norms for firedrake_0_ solve.</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">    0 KSP Residual norm 4.621368953027e+02</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">      Residual norms for firedrake_0_fieldsplit_0_ solve.</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">     <span class="apple-converted-space"> </span></span><span lang="IT-CH" style="font-size: 11pt;">0 KSP Residual norm 1.000000000000e+00</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="IT-CH" style="font-size: 11pt;">      1 KSP Residual norm 3.501082228626e-15</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="IT-CH" style="font-size: 11pt;">     <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 11pt;">Residual norms for firedrake_0_fieldsplit_1_ solve.</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">     <span class="apple-converted-space"> </span></span><span lang="IT-CH" style="font-size: 11pt;">0 KSP Residual norm 0.000000000000e+00</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="IT-CH" style="font-size: 11pt;">      1 KSP Residual norm 0.000000000000e+00</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="IT-CH" style="font-size: 11pt;">   <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 11pt;">1 KSP Residual norm 1.612167203819e-12</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">  1 SNES Function norm 1.599350481360e-12<br>```</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;"> </span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 11pt;">Using the fieldsplit additive preconditioner, the problem converges in a single KSP iteration, as expected. However, I do not understand<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 11pt;">why the</span><span class="apple-converted-space"><span style="font-size: 11pt;"> </span></span><span style="font-size: 11pt;">residual of fieldsplit_0 (1e+0) does not coincide with the outer residual (462.13689530272404)</span><span lang="EN-US" style="font-size: 11pt;">. It should be the case given that only<span class="apple-converted-space"> </span></span><span style="font-size: 11pt;">fieldsplit_0 has</span><span class="apple-converted-space"><span lang="EN-US" style="font-size: 11pt;"> </span></span><span lang="EN-US" style="font-size: 11pt;">a non-zero residual contribution</span><span style="font-size: 11pt;">. The fact that it is just 1 is suspicious. Is there something about how the fieldsplit works that I am missing?</span><span lang="EN-US" style="font-size: 11pt;"><br><br>Thanks,</span><o:p></o:p></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span lang="EN-US" style="font-size: 11pt;">Miguel</span><o:p></o:p></div></div></div></div></div></div><div><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 10pt; font-family: Arial, sans-serif;"> </span><o:p></o:p></div></div></div></div></div><table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="409" style="width: 306.75pt; word-spacing: 0px;"><tbody><tr><td width="260" valign="top" style="width: 195pt; padding: 0cm 0cm 15pt;"></td><td width="149" valign="top" style="width: 111.75pt; padding: 0cm 0cm 15pt;"></td></tr><tr><td width="260" valign="top" style="width: 195pt; padding: 0cm 0cm 11.25pt;"><div><p class="MsoNormal" style="margin: 0cm 0cm 12pt; font-size: 12pt; font-family: Aptos, sans-serif; line-height: 14pt;"><b><span style="font-size: 8pt; font-family: Arial, sans-serif; color: rgb(27, 20, 100);">MIGUEL ANGEL SALAZAR DE TROYA<br></span></b><span style="font-size: 8pt; font-family: Arial, sans-serif; color: rgb(138, 138, 140);">Head of Software Engineering<br><a href="mailto:miguel.salazar@corintis.com" style="color: blue; text-decoration: underline;"><em><span style="font-family: Arial, sans-serif; color: rgb(138, 138, 140);">miguel.salazar@corintis.com</span></em></a><br>Corintis SA<br>EPFL Innovation Park Building C<br>1015 Lausanne</span><o:p></o:p></p></div></td><td width="149" valign="top" style="width: 111.75pt; padding: 0cm 0cm 11.25pt;"><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif; line-height: 14pt;"><span style="font-family: Arial, sans-serif;"><2024-08-1609_02_11-re_mailmigrationfromgoogletooffice365-sebastien.gobel@corintis.com-co_4456a1bf-dd3e-46b7-85f9-21f278e66a79.png></span><o:p></o:p></div></div></div></div></td></tr><tr><td width="409" colspan="2" valign="top" style="width: 306.75pt; background: rgb(27, 20, 100); padding: 2.25pt 7.5pt;"><div><div><div><div style="margin: 0cm; font-size: 12pt; font-family: Aptos, sans-serif;"><span style="font-size: 7pt; font-family: Arial, sans-serif; color: white;">Here at Corintis we care for your privacy. That is why we have taken appropriate measures to ensure that the data you have provided to us is always secure.</span></div></div></div></div></td></tr></tbody></table></div></blockquote></div></div></div></div></div></div></div></blockquote></div></div></div></div></div></div></blockquote></div></div></div></div></div></div></div></blockquote></div></div></div></div></div></div></div></blockquote></div><br></body></html>