Showing results for

- Intel Community
- Software Development SDKs and Libraries
- Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
- Pardiso produce result nan

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Highlighted
##

danielsue

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-13-2012
12:20 PM

13 Views

Pardiso produce result nan

Dear All,

I am trying to use Pardiso to solve sparse linear equations. As a new user of Pardiso, i just do some simple modification of the example. The program read in the matrix and right hand values (ia, ja, a, b) from files, solve the equations and then output x to files. It is strange to find out that for the first two tests with small matrix size (5*5 and 552*552), the result is correct. But for the last two tests with large matrix size (7728*7728), all the results is nan, but the pardiso doesn't give any error.

The system is win7 x64, intel parallel studio xe2013, build win32 release.

Can anybody give me some advice or help me to check?

Thanks and regards,

Daniel

7 Replies

Highlighted
##

Regarding your second test-case for the problem A x = b: Your r.h.s. vector b is zero. Unless A is singular, the solution is x = 0. Therefore, this is not much of a test.
In effect, then, you have only verified that the 5 X 5 test-case worked correctly. You may consider creating some medium-size test cases with b not equal to zero.

mecej4

Black Belt

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-13-2012
04:59 PM

13 Views

Highlighted
##

danielsue

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-14-2012
12:47 AM

13 Views

mecej4 wrote:Hi, I choose another ten matrix of size 246*246 with non-zero elements of 4356. This time, pardiso "can" solve but produce "error" results. The matrix is from our previous work, and I attached the correct results in the folder Release/correct_result that was solved by the other solver. Maybe the configuration is not correct in Pardiso, but I just don't know why. Thanks for you help.Regarding your second test-case for the problem A x = b: Your r.h.s. vector b is zero. Unless A is singular, the solution is x = 0. Therefore, this is not much of a test.

In effect, then, you have only verified that the 5 X 5 test-case worked correctly. You may consider creating some medium-size test cases with b not equal to zero.

Highlighted
##

For the problem described by your files ia_1.txt, ja_1.txt,a_1.txt,b_1.txt the MKL DSS solver estimates the determinant to be about -10^{-1204}. This means that your matrix may be almost singular; if you agree with this surmise, you need to investigate the impact of this finding on your work. If you do not find it reasonable for the matrix to be nearly singular, you will have to probe into possible errors in the matrix coefficients.
I suggest that you post a few smaller examples with, say, 50,100 and 200 unknowns.

mecej4

Black Belt

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-14-2012
07:18 AM

13 Views

Highlighted
##

Mecej4,
The determinant of matrix A=10^{-1}*(identity matrix) with size of 10000x10000 is equal to 10^{-10000} but it doesn't singular and can't be solved by any direct method without any problem.
Daniel,
Thanks for reproducer, I will check it
With best regards,
Alexander Kalinkin

Alexander_K_Intel2

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-14-2012
09:40 AM

13 Views

Highlighted
##

^{35}, from which one may suspect that the matrix is likely to cause problems.

mecej4

Black Belt

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-14-2012
11:01 AM

13 Views

Alexander Kalinkin (Intel) wrote:Alexander, I agree that the mere fact that the determinant is small need not let one conclude that the matrix is singular. However, the estimate of the condition number of the matrix in the case under question is (from Matlab) 7 x 10Mecej4,

The determinant of matrix A=10^{-1}*(identity matrix) with size of 10000x10000 is equal to 10^{-10000} but it doesn't singular and can't be solved by any direct method without any problem.

Highlighted
##

Hi all,
Thanks so much. I will look into the matrix to see how it works in the previous work. I will update this if finding the problem.
Daniel

danielsue

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-14-2012
11:06 AM

13 Views

Highlighted
##

danielsue

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-17-2013
12:33 AM

13 Views

Hi All,

The problem is solved. I made a stupid mistake as the sparse matrix structure is different from the conventional format. Now it works fine.

Thanks to you all.

For more complete information about compiler optimizations, see our Optimization Notice.