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

using pardiso with multiple right hand sides

gitsnedbutzi
Beginner
528 Views
Hello,

I need to set up pardiso for multiple right hand sides. However I failed to do so, because I'm not really a great programmer. For me, it's not quiet clear, in which form x and b have to be.

I tried a two-dimensional dynamic array but it didn't work.

double **x = new double * ;

for( int j = 0 ; j < n ; j++ )

{

x = new double[nrhs];

}



Is it supposed to bea vector ina row major format?

Thanks for your help!!
0 Kudos
1 Solution
Alexander_K_Intel2
528 Views
Hi,
Similar with one right hand side x and b are one dimension double * arrays but therelength become in nrhs (number of rhs) time larger (length of x and b nrhs*n, where n - dimension of problem). For more details please read
IntelMKLibrary ReferenceManual Chapter 8Sparse Solver Routines.
With best regards,
Alexander Kalinkin

View solution in original post

0 Kudos
5 Replies
Alexander_K_Intel2
529 Views
Hi,
Similar with one right hand side x and b are one dimension double * arrays but therelength become in nrhs (number of rhs) time larger (length of x and b nrhs*n, where n - dimension of problem). For more details please read
IntelMKLibrary ReferenceManual Chapter 8Sparse Solver Routines.
With best regards,
Alexander Kalinkin
0 Kudos
gitsnedbutzi
Beginner
528 Views
Thanks, that did the trick. I thought the reference manual was a bit confusing because it said that b is an array with dimension (n, nrhs) which made me think that it's a two-dimensional array.

Now I have another problem:
My solver works fine for all test examples. However when I try a larger matrix from my FE code, it can get through everything (analysis, factorization)up to the solution phase. At the solution phase (phase 33)pardiso crashes with an access violation when reading.

Any ideas on what might be wrong, or how to check what the problem is?

Other solves work fine on the matrix...

Thanks

0 Kudos
Alexander_K_Intel2
528 Views
Hi again!
Such situation appears only with many right hand side or with 1 rhs too? Could you describe problem deeply or attach small testcase? :)
With best regards,
Alexander Kalinkin
0 Kudos
gitsnedbutzi
Beginner
528 Views
sorry, the error was mine. i forgot that in my code i use sparse right hand side. after converting it to a full right hand side, it worked perfectly.

best regards
0 Kudos
Alexander_K_Intel2
528 Views
I'm glad to hear it, fill free to ask question if you will have any troubles.
With best regards,
Alexander Kalinkin
0 Kudos
Reply