# Pardiso produce result nan

## 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

AnexoTamanho
1.28 MB
100.41 KB
8 posts / novo 0
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.

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.

Quote:

mecej4 wrote:

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.

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.

## Anexos:

AnexoTamanho
223.45 KB

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,
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,

Quote:

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.

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 1035, from which one may suspect that the matrix is likely to cause problems.

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

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.