Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
7234 Discussions

How improve efficiency using Pardiso in an iterative problem?

S__MPay
Beginner
710 Views

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
Honored Contributor III
710 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

0 Kudos
2 Replies
MariaZh
Employee
710 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-feature-of-intel-pardiso-nonlinear.

Best regards,
Maria

0 Kudos
mecej4
Honored Contributor III
711 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".

0 Kudos
Reply