<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Jun 5, 2018 at 11:08 AM, Matthew Overholt <span dir="ltr"><<a href="mailto:overholt@capesim.com" target="_blank">overholt@capesim.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Yes to Matthew - not repeating <span style="color:rgb(85,85,85);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:15px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Phase 1: Fill-reduction analysis and symbolic factorization</span>
. Numerical factoring is required because the matrix values have changed (although only slightly) as well as the RHS.<div><br></div><div>We are using KSPPREONLY with Picard iterations. Thank you, Barry, for the KSP*Preconditioner calls I wasn't aware of.</div><div><br></div><div>It sounds like PETSc and/or Pardiso automatically determines whether Phase 1 is required or not, but if we want to force a new Phase 1 (such as in a long unsteady run), then I suppose we could just destroy KSP and remake it.</div></div></blockquote><div><br></div><div>Hmm, we have PetscErrorCode MatGetNonzeroState(Mat mat,PetscObjectState *state). We probably should add <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures: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;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">MatIncrementNonzeroState().</span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures: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;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures: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;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> Matt</span></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Matt...</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail-m_304611646397854281gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><span style="font-size:12.8px">Matt Overholt</span><br></div><div dir="ltr"><div>CapeSym, Inc.</div><div>(508) 653-7100 x204</div><div><a href="mailto:overholt@capesim.com" target="_blank">overholt@capesim.com<br></a></div></div></div></div></div></div></div><div><div class="gmail-h5">
<br><div class="gmail_quote">On Tue, Jun 5, 2018 at 10:40 AM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>On Tue, Jun 5, 2018 at 10:04 AM, Matthew Overholt <span dir="ltr"><<a href="mailto:overholt@capesim.com" target="_blank">overholt@capesim.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Barry,<div><br></div><div>What I should have said was that I wanted to control when it does the "Analysis" (phase 11), not Factoring (phase 22). </div></div></blockquote><div><br></div></span><div>If you only change values in the matrix, but not the structure of the matrix, PETSc will only repeat the numerical factorization,</div><div>not the symbolic factorization, which I think is what you want.</div><div><br></div><div> Matt</div><span><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div> We are solving the heat conduction equation, which makes for a nearly linear system; the non-linearity only enters through the material properties dependence on temperature, which is usually weak. We use the direct approach with several fixed point iterations to get the solution. We have found (in our non-PETSc code) that a lot of time can be saved, particularly when unsteady, by judiciously choosing when to (re)do the Analysis. Typically we do the Analysis on output time steps when unsteady, and just for the first fixed point iteration when steady.</div><div><br></div><div>Matt...</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 5, 2018 at 5:03 AM, Smith, Barry F. <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span><br>
<br>
> On Jun 4, 2018, at 10:32 PM, Matthew Overholt <<a href="mailto:overholt@capesim.com" target="_blank">overholt@capesim.com</a>> wrote:<br>
> <br>
> Hello,<br>
> <br>
> I am using KSP in KSPPREONLY mode to do a direct solve on an A*x = b system, with solver algorithms MUMPS, CPardiso and Pardiso. For Pardiso, is it possible to control the solver execution step (denoted "phase" in Intel's docs)? I would like to be able to control when it refactors as one can when calling it directly.<br>
<br>
</span> Matt,<br>
<br>
This is handled automatically by PETSc. If the matrix entries change than PETSc will automatically call the correct code to perform a new numerical factorization; if the matrix entries are not changed then it will not refactor the matrix. I am not sure if it makes sense for a user to be setting different phase values since it is handled automatically. Could you explain your exact use case where you would like to control the phase variable directly?<br>
<span class="gmail-m_304611646397854281m_-638649454576570936m_2747826685420155052HOEnZb"><font color="#888888"><br>
Barry<br>
</font></span><div class="gmail-m_304611646397854281m_-638649454576570936m_2747826685420155052HOEnZb"><div class="gmail-m_304611646397854281m_-638649454576570936m_2747826685420155052h5"><br></div></div></blockquote></div></div></div>
</blockquote></span></div><span class="gmail-m_304611646397854281HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="gmail-m_304611646397854281m_-638649454576570936gmail_signature"><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.caam.rice.edu/~mk51/" target="_blank">https://www.cse.buffalo.edu/~k<wbr>nepley/</a><br></div></div></div></div></div>
</font></span></div></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><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.caam.rice.edu/~mk51/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div>
</div></div>