Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

Pardiso Partial Solve

apocalx
Beginner
430 Views
Hi,
I have Intel MKL version 10.3
Here is my problem :
I have a 1 000 000 x 1 000 000 matrice with 7 non zeros values per row. I want to calculate Ax=b 1 000 000 times.
For the first solve, my b is : [ 1 0 0 0 ... 0 ] and I only want X1 (first element of solution vector).
For the second solve, my b is : [ 0 1 0 0 ... 0 ] and I only want X2.
For the third solve, my b is : [ 0 0 1 0 ... 0 ] and I only want X3.
...
For the 1 000 000th solve, my b is : [ 0 0 0 0 ... 1 ] and I only want X1000000.
In resuming, in the solution vector, I always want only non zero element of my b vector and my b vector only have 1 non zero element.
For that, the partial solve could be a good solution but the problem was I need to recalculate ordering and factorisation for each solve because my b vector change and that take a lot of time (4 seconds each time).
So, it take more time with 1 000 000 partial solve than 1 000 000 complete solve without recalculate ordering and factorisation.
Do you have a idea how I can do that (with or without parital solve) in less time because right now it take me about 20 hours for all Ax=b (without parital solve and more time with partial solve)
I'm work on a single computer with 4 cores.
Thanks a lot
0 Kudos
3 Replies
Alexander_K_Intel2
430 Views

Hi,

I can suggest only one way to improve your solver: call reordering and factorization once and after call to solving step with several rhs several times (combine several solving step for each call, for example 100 rhs in each call then you need to call solving step 10000 times)

With best regards,

Alexander Kalinkin


0 Kudos
apocalx
Beginner
430 Views
Thanks for your fast reply.
The only bad thing about multiple right hand side is that it take a lot a memory. In my case, I need to declare a B and a X of size 1 000 000 x 100.
It could be fine if the rhs andsolution vectorcould be sparse.
Marc
0 Kudos
Alexander_K_Intel2
430 Views

Hi Marc,

It's true that you need to allocate huge array for using pardiso with many rhs but you can vary its size by number of rhs, for example use 10 rhs instead of 100.

With best regards,

Alexander Kalinkin


0 Kudos
Reply