[petsc-users] MKL Pardiso Solver Execution Step control

Smith, Barry F. bsmith at mcs.anl.gov
Tue Jun 5 12:48:17 CDT 2018



> On Jun 5, 2018, at 4:08 PM, Matthew Overholt <overholt at capesim.com> wrote:
> 
> Yes to Matthew - not repeating Phase 1: Fill-reduction analysis and symbolic factorization .  Numerical factoring is required because the matrix values have changed (although only slightly) as well as the RHS.
> 
> We are using KSPPREONLY with Picard iterations.  Thank you, Barry, for the KSP*Preconditioner calls I wasn't aware of.
> 
> 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.

   I'm confused. Yes PETSc will do a new analysis if the nonzero structure changes otherwise it will never do a new analysis. 

   Is your nonzero structure changing? 

   If you nonzero structure is not changing you have to do nothing. 

   If the nonzero structure does change than the code needs to do a new analysis because the old factors (for the numerical part) cannot work with the new nonzero locations of the matrix.

    I really don't see why you have to do anything?

    Barry

> 
> Matt...
> 
> Matt Overholt
> CapeSym, Inc.
> (508) 653-7100 x204
> overholt at capesim.com
> 
> On Tue, Jun 5, 2018 at 10:40 AM, Matthew Knepley <knepley at gmail.com> wrote:
> On Tue, Jun 5, 2018 at 10:04 AM, Matthew Overholt <overholt at capesim.com> wrote:
> Barry,
> 
> What I should have said was that I wanted to control when it does the "Analysis" (phase 11), not Factoring (phase 22). 
> 
> If you only change values in the matrix, but not the structure of the matrix, PETSc will only repeat the numerical factorization,
> not the symbolic factorization, which I think is what you want.
> 
>   Matt
>  
> 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.
> 
> Matt...
> 
> On Tue, Jun 5, 2018 at 5:03 AM, Smith, Barry F. <bsmith at mcs.anl.gov> wrote:
> 
> 
> > On Jun 4, 2018, at 10:32 PM, Matthew Overholt <overholt at capesim.com> wrote:
> > 
> > Hello,
> > 
> > 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.
> 
>    Matt,
> 
>      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?
> 
>     Barry
> 
> 
> 
> 
> -- 
> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
> -- Norbert Wiener
> 
> https://www.cse.buffalo.edu/~knepley/
> 



More information about the petsc-users mailing list