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

Calculating all Eigenvalues and Eigenvectors of a real symmetric sparse matrix by MKL

shitij90
Beginner
402 Views
Hi !!

I have stated what I want to do in the thread title.

Problems/Doubts:

1. (a)
I know there is a function to convert a sparse matrix to a sparse representation like CSR/CSC/BSR, etc.
But is there a function to convert a symmetric sparse matrix to a sparse matrix representation.
I understand that I could do this by feeding to the function a sparse matrix by first putting all elements
above/below the diagonal zero by myself, but is there a function that would handle symmetric sparse
matrices specially ? (I suppose this would be faster when I am dealing with huge matrices ?)

(b)
If there isnt any such function that handles symmetric sparse matrices specially, what representation
would be best considering the fact that the matrices will be symmetric ? (or equivalently, if upper/lower
triangle is all zeroes)

2. After I get the representation, what mkl function can compute all eigenvalues and eigenvectors ? I want
something like dsyev, but for the sparse matrix representation.

I cannot find any such function in the reference manual, and searching on google returns results like "you cannot do this in mkl, you have to use some other library for it, like SLEPc". Is that really the case ? If yes, could you suggest a library ?

Thank you for your help in advance !!
0 Kudos
3 Replies
mecej4
Honored Contributor III
402 Views
One point that I wish to bring to your attention is the distinction between solving simultaneous equations and solving the eigenvalue problem.

In solving A.x = b, if A and b are real so is x. Many physical problems are described by PDEs which, when discretized, lead to such equations with A quite sparse. Therefore, the construction of special sparse versions of algorithms for solving equations is attractive.

The eigenvalue problem is much more difficult. If A is symmetric but indefinite, some of the eigenvalues can be complex pairs, in which case so are the eigenvectors. If sparse techniques are to be used, all possible combinations of real and complex matrices and vectors need to be provided for. There can be repeated eigenvalues, in which case special treatment is needed.
0 Kudos
shitij90
Beginner
402 Views
Thank you for your reply.

I understand that I may be asking for way too much, but I just wanted to make sure. Actually my guide asked me to do this and didnt tell me to read about any other library (except intel mkl), so I was apprehensive.

But still, I can convert from symmetric rectangular sparse matrix to CSR by the function mkl_?dnscsr.

Again, as you pointed out, it might be too much to ask, but it is essential to confirm that there is no such function that finds eigenvalues and eigenvectors of a sparse matrix matrix in CSR format in intel mkl, because if that is the case I would have to install and learn another library and use it with intel mkl (which might not be that easy for a beginner like me)

If that is the case, please suggest a library that can solve for all eigenvalues and eigenvectors of a symmetric sparse matrix in the CSR format produced by the intel mkl function (I suppose it is a standard representation ?)

Thank you for your help in advance !!
0 Kudos
mecej4
Honored Contributor III
402 Views
A compact matrix representation (such as CSR) developed expressly for solving linear equations may not have any relevance for a different problem such as the eigenvalue problem. The mere ability to convert to a compact storage scheme is going to be useless unless you can find an algorithm for the eigenvalue problem the steps of which can be naturally expressed in terms of solving a sequence of linear equations, multiplying a matrix by a vector as in the power method, etc.

I have not found anything in MKL to do what you ask, but that does not imply that it is impossible.

You may find this review article helpful.
0 Kudos
Reply