Community
cancel
Showing results for 
Search instead for 
Did you mean: 
gitsnedbutzi
Beginner
60 Views

using pardiso with multiple right hand sides

Jump to solution
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

Accepted Solutions
60 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

5 Replies
61 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

gitsnedbutzi
Beginner
60 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

60 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
gitsnedbutzi
Beginner
60 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
60 Views
I'm glad to hear it, fill free to ask question if you will have any troubles.
With best regards,
Alexander Kalinkin