[petsc-users] MKL Pardiso Solver Execution Step control

Smith, Barry F. bsmith at mcs.anl.gov
Tue Jun 5 09:37:42 CDT 2018


   Are you saying that you want to use Newton's method (or a Picard iteration) but don't want to refactor the matrix every time the matrices numerical values change? 

    Are you using SNES or using KSP?

    If you are using KSP then you can call KSPSetReusePreconditioner() to prevent KSP from performing a new numerical factorization even when the matrix changes. This allows you to control exactly when the new numerical factorizations are done (or not done).

    If you are using SNES then you can call SNESSetLagPreconditioner() to control when new factorizations are done.

    You never need to monkey directly with calls to MKL Pardiso

     Is this what you need or do you need something else?

   Barry


> On Jun 5, 2018, at 3:04 PM, 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).  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
> 



More information about the petsc-users mailing list