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

pardiso produces strange result

Manuel_T_
Beginner
354 Views

Hi all,

MKL-pardiso gives back a totally wrong solution vector for one of my smaller test cases in C with a sparse unsymmetric 96x96 matrix. The solution clearly satisfies A*x != b.

Attached is the example file pardiso_unsym_c.c from the MKL example collection in which I replaced the data for ia[], ja[] and a[] with my matrix data. There are no other changes in the program, except that I print the solution vector at the end. For me this program gives a wrong result.

For comparison I also attach a matlab script solving the linear system based on the identical matrix data (copy-pasted from the C-code). The matrix has a decent condition number and matlab gives the correct result.

I tested the C-code with MKL-pardiso using different number of threads, different platforms (Mac OSX and Linux), as well as using the original pardiso version of pardiso-project.org, but the error persisted (different numbers, though). An increased value of iparm[7] for iterative refinement also shows no improvement. 

On the other hand, trying the matrix data with other libraries, like 'eigen' or 'SuperLU' gives correct results. 

I would be more than happy if anybody would have any suggestions on this problem or point out some mistake on my side...

Best regards & thanks,
Manuel

 

0 Kudos
3 Replies
Manuel_T_
Beginner
354 Views

 iparm[12]=0 does it right - advised by the pardiso developers. It remains surprising that the default setting does not work at all for this not-so-complicated matrix.

0 Kudos
Alexander_K_Intel2
354 Views

Hi,

You are correct, it's strange... I've reproduced your issue, will post here results of investigation of this problem.

With best regards,

Alexander Kalinkin 

0 Kudos
Alexander_K_Intel2
354 Views

HI,

The problem is discovered J Thanks a lot for such testcase, we know that such situation can arranged but have not seen it before. Your matrix full of equal elements and when one turn on matching they permute to diagonal value. As result first minors become singular even initial matrix is well-defined. Moreover that rang of this singularity is quite big so resulted factorized matrix is far from initial in term of spectral and, as result, iterative refinement can’t improve solution. If matching turned off the problem with minors doesn’t appeared. Again, thanks a lot for such testcase!

With best regards,

Alexander Kalinkin

0 Kudos
Reply