- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I've written a test program to get familiar with the pardiso. However I find that comparing with the result from Eigen the pardiso spits out totally incorrect answer. I have totally no idea what went wrong and please help. Code is attached. The compile command I used is also listed as:
icpc -I ~/Lib/Eigen -std=c++11 -mkl=parallel -qopenmp -O3 -xCORE-AVX2 PTEST.cpp -o PardisoTest
Best,
Izzy
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I shall add a little bit more illustration on what I'm doing. I just generate a random nonsingular matrix(H) and a random column(C), then find the the solution x via H^(-1) * C. Then H matrix is transformed into CSR form and passed as parameter to pardiso. All the above embodied in the code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The problem probably caused by option for generating multi-thread code, if you remove -qopenmp option during compiling, the result would be same. When you use -qopenmp, all variables will be allocated on stack by default, if there's uninitialized array elements in your program, the result would be different. I noticed there are some problems of your code.
If you would like to use -qopenmp option, please modify your program:
... //double B[10]={0}; change to double B[10]; //double X[10]={0}; double X[10]; //int iparm[64]={0}; MKL_INT iparm[64]; //int pt[64]={0}; void *pt[64]; //int perm[10]={0}; MKL_INT perm[10]; ...
Best regards,
Fiona
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page