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

Using Pardiso to solve linear system with the same pattern

Hwang__Carpenter
Beginner
868 Views

Suppose that I need to solve a linear system in this form, Ax=b, in many iterations. In each iteration, I get a new matrix A. However, the pattern of the matrix is the same. That is, the indices of the nonzeros in A are the same throughout the iterations, but the values of the nonzeros change throughout the iterations. 

I don't want to go from phase 1 to phase 3 every time. Since LU factorization doesn't depend entirely on the values of the nonzeros, can I just run phases 1 and 2 just once and in the iterations run phase 3 for different IA, JA, and A vectors, so that I don't have to factorize every time?

0 Kudos
2 Replies
Irina_S_Intel
Employee
868 Views

Hello,

I think what you need is a low rank update - it allows to use factorization for matrix A1 when factorizing A2 if both matrices have the same pattern of nonzeroes.  

To use the low rank update feature, set iparm(39) = 1 and iparm(24) = 10. And additionally supply an array that lists the values in A2 that are different from A1 using the perm parameter.

More information here.

Best regards,

Irina

0 Kudos
Hwang__Carpenter
Beginner
868 Views

Thank you Irina.

Should I release memory each time (i.e. using Phase = -1)? As you know, I'm solving a linear system in many iterations. If I don't release memory, will my code accumulate memory usage unnecessarily?

0 Kudos
Reply