Community
cancel
Showing results for 
Search instead for 
Did you mean: 
S__MPay
Beginner
41 Views

How improve efficiency using Pardiso in an iterative problem?

Jump to solution

I am trying to improve the efficiency of my code but I am new to Pardiso and there are many things left as a mystery to me.

I have to solve many simultaneous equations that change a little bit in every iteration (by iteration I mean steps of my problem not the matrix solver).

Is it possible to some how improve the solution time? (e.g. passing the initial values of x from previous step to Pardiso to find the new solutions faster?)

By the way should I have pt released at the end of each step or use the same pt value in every step?

0 Kudos
1 Solution
mecej4
Black Belt
41 Views

I assume that you are solving simultaneous linear equations using the direct solver in Pardiso. If not, the following comments do not apply.

If you are solving A.x = b, and A is not changing from one of your iterations to the next, but the vector/matrix b is, then you can do Phases 1 and 2 just once, and repeatedly do Phase 3 with different values for b. Alternatively, if you know or can compute all the different b vectors in advance, assemble the b vectors into a matrix B, and solve A X = B with a single Phase 3 call to Pardiso.

If the structure of A is fixed but the values of the entries of A may change, you have to perform Phases 2 and 3 in each of your iterations.

The PT array should not be touched until your calculations are completed or you wish to restart calculations with a different matrix (new problem).

Unlike in the nonlinear case, there is no possibility for using a previous solution x as a starting guess. That feature is what distinguishes direct and iterative methods. The 'D' in 'Pardiso' stands for "direct".

View solution in original post

2 Replies
MariaZh
Employee
41 Views

Hello,

If I understand you problem correctly, then you may find useful some of the ideas described at https://software.intel.com/en-us/articles/how-can-your-application-benefit-from-schur-complement-fea....

Best regards,
Maria

mecej4
Black Belt
42 Views

I assume that you are solving simultaneous linear equations using the direct solver in Pardiso. If not, the following comments do not apply.

If you are solving A.x = b, and A is not changing from one of your iterations to the next, but the vector/matrix b is, then you can do Phases 1 and 2 just once, and repeatedly do Phase 3 with different values for b. Alternatively, if you know or can compute all the different b vectors in advance, assemble the b vectors into a matrix B, and solve A X = B with a single Phase 3 call to Pardiso.

If the structure of A is fixed but the values of the entries of A may change, you have to perform Phases 2 and 3 in each of your iterations.

The PT array should not be touched until your calculations are completed or you wish to restart calculations with a different matrix (new problem).

Unlike in the nonlinear case, there is no possibility for using a previous solution x as a starting guess. That feature is what distinguishes direct and iterative methods. The 'D' in 'Pardiso' stands for "direct".

View solution in original post

Reply