<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div dir="ltr">OK, I see. I will check with MUMPS developers to know its expected behavior with failures in previous phases. 
<div>
<div>
<div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr"><br>
</div>
<div dir="ltr">--Junchao Zhang<br>
</div>
</div>
</div>
<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Wed, Oct 10, 2018 at 2:54 PM Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div class="gmail_quote">
<div dir="ltr">On Wed, Oct 10, 2018 at 3:12 PM Zhang, Junchao <<a href="mailto:jczhang@mcs.anl.gov" target="_blank">jczhang@mcs.anl.gov</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div id="m_8152558461931885594m_-9094558541213758904divtagdefaultwrapper" 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="m_8152558461931885594_m_-9094558541213758904_line1199" class="m_8152558461931885594m_-9094558541213758904OWAAutoLink" id="m_8152558461931885594m_-9094558541213758904LPlnk845485">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="m_8152558461931885594_m_-9094558541213758904_line1199" id="m_8152558461931885594m_-9094558541213758904LPlnk262316" class="m_8152558461931885594m_-9094558541213758904OWAAutoLink" 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="m_8152558461931885594_m_-9094558541213758904_MatFactorNumeric_MUMPS" id="m_8152558461931885594m_-9094558541213758904LPlnk124983" class="m_8152558461931885594m_-9094558541213758904OWAAutoLink"></a><a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscErrorCode.html#PetscErrorCode" id="m_8152558461931885594m_-9094558541213758904LPlnk352392" class="m_8152558461931885594m_-9094558541213758904OWAAutoLink" target="_blank">PetscErrorCode</a> MatFactorNumeric_MUMPS(<a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/Mat.html#Mat" id="m_8152558461931885594m_-9094558541213758904LPlnk183498" class="m_8152558461931885594m_-9094558541213758904OWAAutoLink" target="_blank">Mat</a> F,<a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/Mat.html#Mat" id="m_8152558461931885594m_-9094558541213758904LPlnk1002" class="m_8152558461931885594m_-9094558541213758904OWAAutoLink" target="_blank">Mat</a> A,const <a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatFactorInfo.html#MatFactorInfo" id="m_8152558461931885594m_-9094558541213758904LPlnk978200" class="m_8152558461931885594m_-9094558541213758904OWAAutoLink" target="_blank">MatFactorInfo</a> *info)</font></strong><br></pre>
<p></p>
<p style="margin-top:0;margin-bottom:0"></p>
<pre width="80"><a name="m_8152558461931885594_m_-9094558541213758904_line1200" id="m_8152558461931885594m_-9094558541213758904LPlnk208341" class="m_8152558461931885594m_-9094558541213758904OWAAutoLink">1200: </a>{
...
<a name="m_8152558461931885594_m_-9094558541213758904_line1227" id="m_8152558461931885594m_-9094558541213758904LPlnk634701" class="m_8152558461931885594m_-9094558541213758904OWAAutoLink"><span style="color:rgb(255,0,0)">1227: </span></a><span style="color:rgb(255,0,0)">  PetscMUMPS_c(mumps);</span>
<a name="m_8152558461931885594_m_-9094558541213758904_line1228" id="m_8152558461931885594m_-9094558541213758904LPlnk890898" class="m_8152558461931885594m_-9094558541213758904OWAAutoLink">1228: </a>  <font color="#4169E1">if</font> (mumps->id.INFOG(1) < 0) {
<a name="m_8152558461931885594_m_-9094558541213758904_line1229" id="m_8152558461931885594m_-9094558541213758904LPlnk489254" class="m_8152558461931885594m_-9094558541213758904OWAAutoLink">1229: </a>    <font color="#4169E1">if</font> (A->erroriffailure) {
<a name="m_8152558461931885594_m_-9094558541213758904_line1230" id="m_8152558461931885594m_-9094558541213758904LPlnk369072" class="m_8152558461931885594m_-9094558541213758904OWAAutoLink">1230: </a>      <a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/SETERRQ2.html#SETERRQ2" id="m_8152558461931885594m_-9094558541213758904LPlnk167748" class="m_8152558461931885594m_-9094558541213758904OWAAutoLink" target="_blank">SETERRQ2</a>(<a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PETSC_COMM_SELF.html#PETSC_COMM_SELF" id="m_8152558461931885594m_-9094558541213758904LPlnk977899" class="m_8152558461931885594m_-9094558541213758904OWAAutoLink" target="_blank">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="m_8152558461931885594_m_-9094558541213758904_line1231" id="m_8152558461931885594m_-9094558541213758904LPlnk528918" class="m_8152558461931885594m_-9094558541213758904OWAAutoLink">1231: </a>    } <font color="#4169E1">else</font> {
<a name="m_8152558461931885594_m_-9094558541213758904_line1232" id="m_8152558461931885594m_-9094558541213758904LPlnk733089" class="m_8152558461931885594m_-9094558541213758904OWAAutoLink">1232: </a>      <font color="#4169E1">if</font> (mumps->id.INFOG(1) == -10) { <font color="#B22222">/* numerically singular matrix */</font>
<a name="m_8152558461931885594_m_-9094558541213758904_line1233" id="m_8152558461931885594m_-9094558541213758904LPlnk306593" class="m_8152558461931885594m_-9094558541213758904OWAAutoLink">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="m_8152558461931885594_m_-9094558541213758904_line1234" id="m_8152558461931885594m_-9094558541213758904LPlnk922593" class="m_8152558461931885594m_-9094558541213758904OWAAutoLink">1234: </a>        F->factorerrortype = MAT_FACTOR_NUMERIC_ZEROPIVOT;
<br></pre>
<pre width="80"><pre width="80">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">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>
</div>
</blockquote>
</div>
We made the executive decision to have solves complete by default. This is consistent with that decision. Users who want safety can ask for the error. It would be nice of MUMPS would cleanup correctly, but we can report that to them as a bug.
<div><br>
</div>
<div>  Matt<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="m_8152558461931885594gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener</div>
<div><br>
</div>
<div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</body>
</html>