Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Christopher_M_3
Beginner
49 Views

How do you use PARDISO in a loop

I am using PARDISO to solve a system Ax=b in a simulation where A is a sparse unsymmetric matrix and constant, but b changes over time. How can I call PARDISO so that I only factorize A once but can then call the solve phase in a loop.

I am currently calling the solver in a function in which the four phases are performed, from initialising the solver to deleting memory, in each iteration which is very inefficient and would like to have the factorization in one initialize function which also factorises other matrices which are symmetric (and I use other MKL routines to solve them) and then call the PARDISO solver which just calls the solve phase.

0 Kudos
1 Reply
mecej4
Black Belt
49 Views

  1. Set up all the desired values in the ipar() and pt() arrays and fixed options such as msglvl. Populate the CSR arrays for the matrix, and call Pardiso with phase = 12.
  2. Populate the r.h.s.vector b(t), call Pardiso with phase = 33.
  3. Postprocess/output results as needed. Go back to 2. as many times as needed. 
Reply