<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<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 style="margin-top:0;margin-bottom:0"></p>
<pre width="80"><a name="line1199" class="OWAAutoLink" previewremoved="true" id="LPlnk845485">I met a case where MUMPS numeric factorization returned an error code -9 in </a>mumps->id.INFOG(1) but <span>A->erroriffailure was false in the following code in mumps.c</span></pre>
<pre width="80"><a name="line1199" id="LPlnk262316" class="OWAAutoLink" previewremoved="true" style="font-family: Calibri, Helvetica, sans-serif, Helvetica, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 12pt;">1199: </a><strong style="font-family: Calibri, Helvetica, sans-serif, Helvetica, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 12pt;"><font color="#4169E1"><a name="MatFactorNumeric_MUMPS" id="LPlnk124983" class="OWAAutoLink" previewremoved="true"></a><a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscErrorCode.html#PetscErrorCode" id="LPlnk352392" class="OWAAutoLink" previewremoved="true">PetscErrorCode</a> MatFactorNumeric_MUMPS(<a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/Mat.html#Mat" id="LPlnk183498" class="OWAAutoLink" previewremoved="true">Mat</a> F,<a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/Mat.html#Mat" id="LPlnk1002" class="OWAAutoLink" previewremoved="true">Mat</a> A,const <a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatFactorInfo.html#MatFactorInfo" id="LPlnk978200" class="OWAAutoLink" previewremoved="true">MatFactorInfo</a> *info)</font></strong><br></pre>
<p></p>
<p style="margin-top:0;margin-bottom:0"></p>
<pre width="80"><a name="line1200" id="LPlnk208341" class="OWAAutoLink" previewremoved="true">1200: </a>{
...
<a name="line1227" id="LPlnk634701" class="OWAAutoLink" previewremoved="true"><span style="color: rgb(255, 0, 0);">1227: </span></a><span style="color: rgb(255, 0, 0);"> PetscMUMPS_c(mumps);</span>
<a name="line1228" id="LPlnk890898" class="OWAAutoLink" previewremoved="true">1228: </a> <font color="#4169E1">if</font> (mumps->id.INFOG(1) < 0) {
<a name="line1229" id="LPlnk489254" class="OWAAutoLink" previewremoved="true">1229: </a> <font color="#4169E1">if</font> (A->erroriffailure) {
<a name="line1230" id="LPlnk369072" class="OWAAutoLink" previewremoved="true">1230: </a> <a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/SETERRQ2.html#SETERRQ2" id="LPlnk167748" class="OWAAutoLink" previewremoved="true">SETERRQ2</a>(<a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PETSC_COMM_SELF.html#PETSC_COMM_SELF" id="LPlnk977899" class="OWAAutoLink" previewremoved="true">PETSC_COMM_SELF</a>,PETSC_ERR_LIB,<font color="#666666">"Error reported by MUMPS in numerical factorization phase: INFOG(1)=%d, INFO(2)=%d\n"</font>,mumps->id.INFOG(1),mumps->id.INFO(2));
<a name="line1231" id="LPlnk528918" class="OWAAutoLink" previewremoved="true">1231: </a> } <font color="#4169E1">else</font> {
<a name="line1232" id="LPlnk733089" class="OWAAutoLink" previewremoved="true">1232: </a> <font color="#4169E1">if</font> (mumps->id.INFOG(1) == -10) { <font color="#B22222">/* numerically singular matrix */</font>
<a name="line1233" id="LPlnk306593" class="OWAAutoLink" previewremoved="true">1233: </a> PetscInfo2(F,<font color="#666666">"matrix is numerically singular, INFOG(1)=%d, INFO(2)=%d\n"</font>,mumps->id.INFOG(1),mumps->id.INFO(2));
<a name="line1234" id="LPlnk922593" class="OWAAutoLink" previewremoved="true">1234: </a> F->factorerrortype = MAT_FACTOR_NUMERIC_ZEROPIVOT;
<br></pre>
<pre width="80"><pre width="80" style="">The code continued to KSPSolve and finished successfully (with wrong answer). The user did not call KSPGetConvergedReason() after KSPSolve. I found I had to either add -ksp_error_if_not_converged or call KSPSetErrorIfNotConverged(ksp,PETSC_TRUE) to make the code fail. </pre><pre width="80" style="">Is it expected? In my view, it is dangerous. If MUMPS fails in one stage, PETSc should not proceed to the next stage because it may hang there.</pre></pre>
<p></p>
</div>
</body>
</html>