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

## MKL eigensolvers problems Beginner
450 Views

Hello Intel Team,

I've a question regarding the eigensolver routines in the MKL. I want to solve a generalized eigenvalue problem [A-lambda B]X = 0. The Intel MKL provide a few alternatives for solving the eigenvalue problem. According to the documentation, all of them can handle a positive definite matrix B. So here is my first question: How is positive definite defined? Does it include zero eigenvalues?

My second question refers to the eigensolver routines: In my case, I implemented the dfeast_scsrgv() and the mkl_sparse_d_gv() routine. The second function (mkl_sparse_d_gv()) is able to process matrices B with positive and negative eigenvalues, but not with eigenvalues equal to zero. The first function (dfeast_scsrgv()) got an option to check if the Matrix B if it's positive definite (extended eigensolver input parameter -> fpm). When I enable this check and provide a Matrix B with zero Eigenvalues it returns an error, but when I turn the check off, the function calculates the right results. How can that be? Is the internal check wrong, or am I misunderstanding something?

Apart from that, is there an eigensolver which can solve a generalized eigenvalue problem with a Matrix B with zero eigenvalues?

Thank you very much.

Kind regards

4 Replies Moderator
424 Views

Hi Julian,

Thanks for reaching out to us.

>>How is positive definite defined? Does it include zero eigenvalues?

If a matrix is positive definite then all eigenvalues are positive.

https://www.intel.com/content/www/us/en/develop/documentation/onemkl-developer-reference-c/top/lapac...

>>When I enable this check and provide a Matrix B with zero Eigenvalues it returns an error, but when I turn the check off, the function calculates the right results. How can that be? Is the internal check wrong, or am I misunderstanding something?

Could you please let us know the error code that you are getting while enabling the check?

Also, It would be a great help if you provide us with a sample reproducer code and steps to reproduce it so that we can test it from our end as well.

Please do let us know your OS environment details and the MKL version being used.

Regards,

Vidya. Beginner
405 Views

I get the error code -4 (matrix B isn’t positive definite).

I added a minimal code example with 4 cases.  For each case I compared the results to the results of the MATLAB eigen solver.

1. Positive definite matrix – everything works fine
2. Positive semi-definite matrix (with one zero eigenvalue) – the function (dfeast_scsrgv) don’t calculate any eigenvalues; When I set fpm to 1 the function don’t detect that the matrix isn’t positive definite
3. Positive semi-definite matrix (with one numeric zero eigenvalue) - the function calculates the same results as MATLAB; When I set fpm to 1 the function don’t detect that the matrix isn’t positive definite
4. Indefinite matrix (with one negative eigenvalue) - the function calculates the same results as MATLAB; When I set fpm to 1 the function throws the error code -4 (matrix B isn’t positive definite).

Why does the function react like this?

I use the OneAPI Mkl Version 2022.0.2. Furthermore, I work on windows 10 with Visual Studio 2022 LTSC 17.0.

Thank you very much.

Kind regards. Moderator
388 Views

Hi Julian,

The issue is reproducible from our end as well and could the behavior of the function dfeast_scsrgv() with respect to fpm settings which is mentioned in your post.

We are working on your issue. we will get back to you soon.

Regards,

Vidya. Moderator
362 Views

it looks like an incorrect behavior and we will escalate and fix the problem. The thread would be updated. 