Eigenvalue decomposition with CSR sparse matrix

Eigenvalue decomposition with CSR sparse matrix

Hi,

at the moment I use dsyevd to compute the eigenvalues and eigenvectors of a large matrix A (n = 22000). This takes about half an hour. I know that they are a lot of zeros in matrix A (90% are zeros). Matrix A is stored as CSR sparse matrix.

- Is there a function to compute the eigenvalues and eigenvectors of a CSR sparse matrix?

- Is there a function to convert a CSR sparse matrix to a band matrix? Then I could use dsbevd.

Regards Michael

6 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

yes, since the version 11.0 mkl contains the Extended Eigensolver Routines -- please see reference manual for more details. These routines support CSR format too.

there are no routines convert CSR->Band format, ut there are a number of routines conversion csr<->dense

Quote:

Michael W. wrote:

... I use dsyevd to compute the eigenvalues and eigenvectors of a large matrix A (n = 22000). Matrix A is stored as CSR sparse matrix.

There is something amiss here.

  1. The ?syevd routines operate on a matrix kept in dense-storage form.
  2. You cannot pass a matrix stored in CSR form to such a routine.
  3. A banded matrix is sparse, but not vice versa. If you know that the matrix is banded, look for an eigenvalue/vector routine that is tailored to such matrices, rather than to the more general sparse matrix type.

Hi, thank you for your answers.

1. and 2. I know that the ?syevd routines operates with a dense-storage matrix. At the moment I convert my CSR sparse matrix A to dense matrix and then I use the ?syevd.

3. I don't know that my matrix A is banded. I only know that the matrix A is stored a CSR matrix.

A little bit more information:

A = B x B'

B is a CSR matrix with more colums than rows. A is as well a CSR matrix computed using dcsrmultcsr. An know I want to compute the eigenvalue decomposition of matrix A.

 

By the way I was not aware that mkl version 11 contains the Extended Eigensolver Routines. Thanks for that

Regards Michael

Quote:

Michael W. wrote:
A = B x B'

That is very useful information. The eigenvalues of A = B.B' are obtainable from the non-zero singular values of B. There are several routines available to compute the SVD (Singular Value Decomposition) of a dense matrix; see, for example, ?gesvd() in Lapack/MKL. You are probably in need of only the singular values and may look for a routine that allows you to specify that the singular vectors are unwanted.

Hi,

1. What I have as Input is CSR sparse Matrix B (number of rows: 20000, number of columns 100000)

2. Intermediate result A = B x B'

3. Intermediate result V, D = dsyevd(A) where V are the eigenvectors and D are the eigenvalues

4. Intermediate result E: diagonal Matrix. The elements on the diagonal are the inverse values of D.

5. Final Result W = V x E

So if you know a faster to compute W from B, please let me know.

Regards

Michael

Leave a Comment

Please sign in to add a comment. Not a member? Join today