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

Pardiso returns incorrect number of negative eigenvalues for some matrices

staffanb
Beginner
978 Views

Hi,
I work with constrained optimization where I want to use Pardiso to solve symmetric indefinite systems. Moreover, in order to assure convexity of the problem I need to know the number of positive/negative eigenvalues of the system. However, for some matrices, Pardiso returns the wrong number of negative eigenvalues after the factorization. I have compared the result from Pardiso to that of the solver MUMPS which always gives the correct number, and also by computing the eigenvalues from the dense representation.

Is this a known issue? Or am I maybe using wrong options for the solver?

Attached is a test program to reproduce the error.

Excerpt from output of the test program:
>> Number of negative eigenvalues according to Pardiso is 1311. However, the correct number for this matrix should be 1309.
>> Eigenvalues computed by Eigen (dense):
>> [-243.214,..., -1.23553e-05, 0.00443743,..., 223.752]
>> number of negative eigenvalues is 1309

Note that the condition number of the matrix is not terrible.

Regards,
Staffan

0 Kudos
7 Replies
Gennady_F_Intel
Moderator
953 Views

Staffan, which version of MKL do you use?


0 Kudos
staffanb
Beginner
945 Views

#define __INTEL_MKL_BUILD_DATE 20210904


#define __INTEL_MKL__ 2021

#define __INTEL_MKL_MINOR__ 0
#define __INTEL_MKL_UPDATE__ 4


#define INTEL_MKL_VERSION 20210004

0 Kudos
Gennady_F_Intel
Moderator
936 Views

I have to confirm that MKL Pardiso returns 1309.

How do you know that 1311 is the correct number of negative eigenvalues?

0 Kudos
staffanb
Beginner
931 Views

 According to MUMPS, and also computing the eigenvalues (of the dense matrix) using both Eigen and Matlab (code for computing the eigenvalues using Eigen is in the test program). The eigenvalues are not that close to zero so I do believe 1309 is correct.

0 Kudos
staffanb
Beginner
926 Views

Or wait..

Did you get 1309 from Pardiso? That is the correct number.

0 Kudos
staffanb
Beginner
920 Views

Turning off scaling (iparm(11)=0) also gives me the correct number of negative eigenvalues (1309) for that example. However, going back to my original problem I soon run in to another matrix.

For this case the negative eigenvalues are closer to zero. Could it be the pivot perturbation strategy that causes Pardiso to get the wrong value?

> Number of negative eigenvalues according to Pardiso is 1309.
> Eigenvalues computed by Eigen (dense):
> [-203.012,..., -8.81333e-08, 1,..., 204.012]
> number of negative eigenvalues is 1306

 

Attached are new files with the new matrix, and now running Pardiso with default options.

Thanks for the help!

Regards,

Staffan

0 Kudos
Gennady_F_Intel
Moderator
868 Views

Staffan,

At a very preliminary glance, here we have some problems with MKL Pardiso. We will investigate these cases and keep this thread informed.

Gennady


0 Kudos
Reply