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.
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.
Turning off scaling (iparm
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!