<head><!-- BaNnErBlUrFlE-HeAdEr-start -->
<style>
#pfptBanner9g5g4q6 { all: revert !important; display: block !important;
visibility: visible !important; opacity: 1 !important;
background-color: #D0D8DC !important;
max-width: none !important; max-height: none !important }
.pfptPrimaryButton9g5g4q6:hover, .pfptPrimaryButton9g5g4q6:focus {
background-color: #b4c1c7 !important; }
.pfptPrimaryButton9g5g4q6:active {
background-color: #90a4ae !important; }
</style>
<!-- BaNnErBlUrFlE-HeAdEr-end -->
</head><!-- BaNnErBlUrFlE-BoDy-start -->
<!-- Preheader Text : BEGIN -->
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">
So are you saying that MKL_Padiso is returning inf/nan in the solution but a return code less than or equal to zero? - that's correct Is this expected behavior of MKL Pardiso? - from what I can see, that does appear to be the expected behavior
</div>
<!-- Preheader Text : END -->
<!-- Email Banner : BEGIN -->
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">ZjQcmQRYFpfptBannerStart</div>
<!--[if ((ie)|(mso))]>
<table border="0" cellspacing="0" cellpadding="0" width="100%" style="padding: 16px 0px 16px 0px; direction: ltr" ><tr><td>
<table border="0" cellspacing="0" cellpadding="0" style="padding: 0px 10px 5px 6px; width: 100%; border-radius:4px; border-top:4px solid #90a4ae;background-color:#D0D8DC;"><tr><td valign="top">
<table align="left" border="0" cellspacing="0" cellpadding="0" style="padding: 4px 8px 4px 8px">
<tr><td style="color:#000000; font-family: 'Arial', sans-serif; font-weight:bold; font-size:14px; direction: ltr">
This Message Is From an External Sender
</td></tr>
<tr><td style="color:#000000; font-weight:normal; font-family: 'Arial', sans-serif; font-size:12px; direction: ltr">
This message came from outside your organization.
</td></tr>
</table>
</td></tr></table>
</td></tr></table>
<![endif]-->
<![if !((ie)|(mso))]>
<div dir="ltr" id="pfptBanner9g5g4q6" style="all: revert !important; display:block !important; text-align: left !important; margin:16px 0px 16px 0px !important; padding:8px 16px 8px 16px !important; border-radius: 4px !important; min-width: 200px !important; background-color: #D0D8DC !important; background-color: #D0D8DC; border-top: 4px solid #90a4ae !important; border-top: 4px solid #90a4ae;">
<div id="pfptBanner9g5g4q6" style="all: unset !important; float:left !important; display:block !important; margin: 0px 0px 1px 0px !important; max-width: 600px !important;">
<div id="pfptBanner9g5g4q6" style="all: unset !important; display:block !important; visibility: visible !important; background-color: #D0D8DC !important; color:#000000 !important; color:#000000; font-family: 'Arial', sans-serif !important; font-family: 'Arial', sans-serif; font-weight:bold !important; font-weight:bold; font-size:14px !important; line-height:18px !important; line-height:18px">
This Message Is From an External Sender
</div>
<div id="pfptBanner9g5g4q6" style="all: unset !important; display:block !important; visibility: visible !important; background-color: #D0D8DC !important; color:#000000 !important; color:#000000; font-weight:normal; font-family: 'Arial', sans-serif !important; font-family: 'Arial', sans-serif; font-size:12px !important; line-height:18px !important; line-height:18px; margin-top:2px !important;">
This message came from outside your organization.
</div>
</div>
<div style="clear: both !important; display: block !important; visibility: hidden !important; line-height: 0 !important; font-size: 0.01px !important; height: 0px"> </div>
</div>
<![endif]>
<div style="display:none !important;display:none;visibility:hidden;mso-hide:all;font-size:1px;color:#ffffff;line-height:1px;height:0px;max-height:0px;opacity:0;overflow:hidden;">ZjQcmQRYFpfptBannerEnd</div>
<!-- Email Banner : END -->
<!-- BaNnErBlUrFlE-BoDy-end -->
<div dir="auto"><div><div dir="auto">So are you saying that MKL_Padiso is returning inf/nan in the solution but a return code less than or equal to zero? </div><div dir="auto">- that's correct </div><div dir="auto"><br></div><div dir="auto"> Is this expected behavior of MKL Pardiso?</div><div dir="auto">- from what I can see, that does appear to be the expected behavior of Pardiso. I mean I guess it has solved the system correctly.</div><div dir="auto"><br></div><div dir="auto">Thanks Mark for the suggestion, that seems like a reasonable solution.</div><div dir="auto"><br></div><div dir="auto">Chris</div><div dir="auto"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 11, 2024, 13:53 Barry Smith <<a href="mailto:bsmith@petsc.dev" target="_blank" rel="noreferrer">bsmith@petsc.dev</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="line-break:after-white-space"><div><br></div> We don't by default, for example, check the norm of the solution returned by an external direct solver due to the added expense. <div><br></div><div> We do check the error condition returned by MKL Pardiso with </div><div><br></div><div> PetscCheck(mat_mkl_pardiso->err >= 0, PETSC_COMM_SELF, PETSC_ERR_LIB, "Error reported by MKL PARDISO: err=%d. Please check manual", mat_mkl_pardiso->err);</div><div><br></div><div> except (I don't know why) in MatDestroy_MKL_PARDISO() </div><div><br></div><div>So are you saying that MKL_Padiso is returning inf/nan in the solution but a return code less than or equal to zero? Is this expected behavior of MKL Pardiso?</div><div><br></div><div><br id="m_-3198587807598700349m_-639451237853524264lineBreakAtBeginningOfMessage"><div><br><blockquote type="cite"><div>On Jul 10, 2024, at 5:01 PM, Chris Hewson <<a href="mailto:chris@resfrac.com" rel="noreferrer noreferrer" target="_blank">chris@resfrac.com</a>> wrote:</div><br><div><div dir="ltr" id="m_-3198587807598700349m_-639451237853524264pfptBanner1mnup45" style="writing-mode:revert!important;color:revert!important;font-family:revert!important;font-feature-settings:revert!important;font-kerning:revert!important;font-size:revert!important;font-size-adjust:revert!important;font-stretch:revert!important;font-variant-alternates:revert!important;font-variant-caps:revert!important;font-variant-east-asian:revert!important;font-variant-ligatures:revert!important;font-variant-numeric:revert!important;font-weight:revert!important;text-orientation:revert!important;zoom:revert!important;letter-spacing:revert!important;text-autospace:revert!important;background-blend-mode:revert!important;background-image:revert!important;background-position:revert!important;background-repeat:revert!important;background-size:revert!important;border-collapse:revert!important;box-sizing:revert!important;break-after:revert!important;break-before:revert!important;break-inside:revert!important;caption-side:revert!important;clear:revert!important;column-count:revert!important;column-fill:revert!important;column-gap:revert!important;column-rule-color:revert!important;column-rule-style:revert!important;column-rule-width:revert!important;column-span:revert!important;column-width:revert!important;empty-cells:revert!important;float:revert!important;image-orientation:revert!important;isolation:revert!important;line-break:revert!important;line-height:revert!important;list-style:revert!important;mix-blend-mode:revert!important;object-fit:revert!important;object-position:revert!important;outline:revert!important;overflow:revert!important;quotes:revert!important;table-layout:revert!important;text-align:left!important;text-align-last:revert!important;text-decoration-color:revert!important;text-decoration:revert!important;text-decoration-style:revert!important;text-emphasis-color:revert!important;text-emphasis-style:revert!important;text-indent:revert!important;text-justify:revert!important;text-overflow:revert!important;text-transform:revert!important;text-underline-position:revert!important;vertical-align:revert!important;white-space:revert!important;word-break:revert!important;border-spacing:revert!important;word-spacing:revert!important;background-clip:revert!important;background-origin:revert!important;text-combine-upright:revert!important;display:block!important;opacity:revert!important;background-color:rgb(208,216,220)!important;border-bottom-color:revert!important;border-bottom-style:revert!important;border-bottom-width:revert!important;border-left-color:revert!important;border-left-style:revert!important;border-left-width:revert!important;border-right-color:revert!important;border-right-style:revert!important;border-right-width:revert!important;height:revert!important;max-height:revert!important;max-width:revert!important;min-height:revert!important;width:revert!important;margin:16px 0px!important;padding:8px 16px!important;border-radius:4px!important;min-width:200px!important;border-top-width:4px!important;border-top-style:solid!important;border-top-color:rgb(144,164,174)!important"><div id="m_-3198587807598700349m_-639451237853524264pfptBanner1mnup45" style="writing-mode:unset!important;color:unset!important;font-family:unset!important;font-feature-settings:unset!important;font-kerning:unset!important;font-size:unset!important;font-size-adjust:unset!important;font-stretch:unset!important;font-variant-alternates:unset!important;font-variant-caps:unset!important;font-variant-east-asian:unset!important;font-variant-ligatures:unset!important;font-variant-numeric:unset!important;font-weight:unset!important;text-orientation:unset!important;zoom:unset!important;letter-spacing:unset!important;text-autospace:unset!important;background:unset!important;background-blend-mode:unset!important;border-collapse:unset!important;border:unset!important;box-sizing:unset!important;break-after:unset!important;break-before:unset!important;break-inside:unset!important;caption-side:unset!important;clear:unset!important;column-count:unset!important;column-fill:unset!important;column-gap:unset!important;column-rule-color:unset!important;column-rule-style:unset!important;column-rule-width:unset!important;column-span:unset!important;column-width:unset!important;empty-cells:unset!important;float:left!important;image-orientation:unset!important;isolation:unset!important;line-break:unset!important;line-height:unset!important;list-style:unset!important;mix-blend-mode:unset!important;object-fit:unset!important;object-position:unset!important;outline:unset!important;overflow:unset!important;quotes:unset!important;table-layout:unset!important;text-align:unset!important;text-align-last:unset!important;text-decoration-color:unset!important;text-decoration:unset!important;text-decoration-style:unset!important;text-emphasis-color:unset!important;text-emphasis-style:unset!important;text-indent:unset!important;text-justify:unset!important;text-overflow:unset!important;text-transform:unset!important;text-underline-position:unset!important;vertical-align:unset!important;white-space:unset!important;word-break:unset!important;border-spacing:unset!important;word-spacing:unset!important;text-combine-upright:unset!important;display:block!important;opacity:unset!important;border-radius:unset!important;height:unset!important;max-height:unset!important;min-height:unset!important;min-width:unset!important;padding:unset!important;width:unset!important;margin:0px 0px 1px!important;max-width:600px!important"><div id="m_-3198587807598700349m_-639451237853524264pfptBanner1mnup45" style="writing-mode:unset!important;font-family:Arial,sans-serif!important;font-feature-settings:unset!important;font-kerning:unset!important;font-size:14px!important;font-size-adjust:unset!important;font-stretch:unset!important;font-variant-alternates:unset!important;font-variant-caps:unset!important;font-variant-east-asian:unset!important;font-variant-ligatures:unset!important;font-variant-numeric:unset!important;font-weight:bold!important;text-orientation:unset!important;zoom:unset!important;letter-spacing:unset!important;background-blend-mode:unset!important;background-image:unset!important;background-position:unset!important;background-repeat:unset!important;background-size:unset!important;border-collapse:unset!important;border:unset!important;box-sizing:unset!important;break-after:unset!important;break-before:unset!important;break-inside:unset!important;caption-side:unset!important;clear:unset!important;column-count:unset!important;column-fill:unset!important;column-gap:unset!important;column-rule-color:unset!important;column-rule-style:unset!important;column-rule-width:unset!important;column-span:unset!important;column-width:unset!important;empty-cells:unset!important;float:unset!important;image-orientation:unset!important;isolation:unset!important;line-break:unset!important;line-height:18px!important;list-style:unset!important;mix-blend-mode:unset!important;object-fit:unset!important;object-position:unset!important;outline:unset!important;overflow:unset!important;quotes:unset!important;table-layout:unset!important;text-align:unset!important;text-align-last:unset!important;text-decoration-color:unset!important;text-decoration:unset!important;text-decoration-style:unset!important;text-emphasis-color:unset!important;text-emphasis-style:unset!important;text-indent:unset!important;text-overflow:unset!important;text-transform:unset!important;text-underline-position:unset!important;vertical-align:unset!important;white-space:unset!important;word-break:unset!important;border-spacing:unset!important;word-spacing:unset!important;background-clip:unset!important;background-origin:unset!important;text-combine-upright:unset!important;display:block!important;opacity:unset!important;background-color:rgb(208,216,220)!important;border-radius:unset!important;height:unset!important;margin:unset!important;max-height:unset!important;max-width:unset!important;min-height:unset!important;min-width:unset!important;padding:unset!important;width:unset!important">This Message Is From an External Sender</div><div id="m_-3198587807598700349m_-639451237853524264pfptBanner1mnup45" style="writing-mode:unset!important;font-family:Arial,sans-serif!important;font-feature-settings:unset!important;font-kerning:unset!important;font-size:12px!important;font-size-adjust:unset!important;font-stretch:unset!important;font-variant-alternates:unset!important;font-variant-caps:unset!important;font-variant-east-asian:unset!important;font-variant-ligatures:unset!important;font-variant-numeric:unset!important;font-weight:unset!important;text-orientation:unset!important;zoom:unset!important;letter-spacing:unset!important;background-blend-mode:unset!important;background-image:unset!important;background-position:unset!important;background-repeat:unset!important;background-size:unset!important;border-collapse:unset!important;border:unset!important;box-sizing:unset!important;break-after:unset!important;break-before:unset!important;break-inside:unset!important;caption-side:unset!important;clear:unset!important;column-count:unset!important;column-fill:unset!important;column-gap:unset!important;column-rule-color:unset!important;column-rule-style:unset!important;column-rule-width:unset!important;column-span:unset!important;column-width:unset!important;empty-cells:unset!important;float:unset!important;image-orientation:unset!important;isolation:unset!important;line-break:unset!important;line-height:18px!important;list-style:unset!important;mix-blend-mode:unset!important;object-fit:unset!important;object-position:unset!important;outline:unset!important;overflow:unset!important;quotes:unset!important;table-layout:unset!important;text-align:unset!important;text-align-last:unset!important;text-decoration-color:unset!important;text-decoration:unset!important;text-decoration-style:unset!important;text-emphasis-color:unset!important;text-emphasis-style:unset!important;text-indent:unset!important;text-overflow:unset!important;text-transform:unset!important;text-underline-position:unset!important;vertical-align:unset!important;white-space:unset!important;word-break:unset!important;border-spacing:unset!important;word-spacing:unset!important;background-clip:unset!important;background-origin:unset!important;text-combine-upright:unset!important;display:block!important;opacity:unset!important;background-color:rgb(208,216,220)!important;border-radius:unset!important;height:unset!important;margin-bottom:unset!important;margin-left:unset!important;margin-right:unset!important;max-height:unset!important;max-width:unset!important;min-height:unset!important;min-width:unset!important;padding:unset!important;width:unset!important;margin-top:2px!important">This message came from outside your organization.</div></div><div style="height:0px;clear:both!important;display:block!important;line-height:0!important;font-size:0.01px!important"></div></div><div dir="ltr" style="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;text-decoration:none">Hi There,<div><br></div><div>We have a matrix that is singular and trying to solve it. We first use an iterative solve with KSPBCGS, the solution vector is nan values and the converged reason from PETSc of KSP_DIVERGED_NANORINF, that's great and what I would expect.</div><div><br></div><div>Sometimes in our program we redo a failed solve using the MKL Pardiso solver, when the same matrix and vectors get put into that solver which is a KSPPREONLY, I get KSP_CONVERGED_ITS as a converged reason and solution vector with nan values in it. </div><div><br></div><div>Stepping through the PETSc calls, I see that the external call to Pardiso doesn't return an error for this, so not really the fault of PETSc, but curious if y'all have seen this before or a solution/workaround to this?<br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><b><br></b></div><div dir="ltr"><b>Chris Hewson</b><div>Senior Reservoir Simulation Engineer</div><div>ResFrac</div><div>+1.587.575.9792</div></div></div></div></div></div></div></div></div></div></div></blockquote></div><br></div></div></blockquote></div></div></div>