Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
For the latest information on Intel’s response to the Log4j/Log4Shell vulnerability, please see Intel-SA-00646
6465 Discussions

Pardiso returns incorrect number of negative eigenvalues for some matrices

staffanb
Beginner
330 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
305 Views

Staffan, which version of MKL do you use?


staffanb
Beginner
297 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

Gennady_F_Intel
Moderator
288 Views

I have to confirm that MKL Pardiso returns 1309.

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

staffanb
Beginner
283 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.

staffanb
Beginner
278 Views

Or wait..

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

staffanb
Beginner
274 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

Gennady_F_Intel
Moderator
222 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


Reply