Poor performance for calculating eigenvalues and eigenvector

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)
Post Reply
Posts: 1
Joined: Wed Oct 10, 2018 12:12 am

Poor performance for calculating eigenvalues and eigenvector

Post by Tonny91 » Fri Oct 12, 2018 3:21 am

down vote

In some code we need to get auto vectors and auto values for the generalized eigenvalue problem with symmetric real matrices (Ax=lamba Bx). This code uses DSPGVX from LACPACK. We wanted to speed it up on GPU using a MAGMA function. We asked on this forum and got the answer about this


The size of our matrices (N) goes from 100 to 50000 and even more, related to the number of atoms in a molecule. We observe:

a) for N bigger than 2500 (approx), MAGMA just does not work; segmentation fault b) MAGMA runs always slower than LAPACK sequential, around 10 times slower

Is this behavior normal and could we overcome it? Can anybody report any reference where anybody working on this similar problems gets a decent speedup?


Posts: 842
Joined: Fri Jan 06, 2012 2:13 pm

Re: Poor performance for calculating eigenvalues and eigenve

Post by mgates3 » Fri Oct 12, 2018 2:52 pm

First, for using LAPACK, I would suggest using dsygvx instead of dspgvx. sp is symmetric-packed format, which does save half the memory (0.5 n (n+1) entries), but is much less efficient to access, hence slower. sy is symmetric format, which stores the entire matrix (n^2 entries) even though (say) the upper half is not accessed (with uplo = lower).

MAGMA shouldn't crash. Does MAGMA's tester crash (magma/testing/testing_dsygvdx), or only in your application? If the tester doesn't crash, then the matrix may be setup incorrectly. Remember it is in symmetric (sy) format, not symmetric-packed (sp) format.

For large matrices (n > 46000 or so), you will need to use 64-bit integers. You need an ILP64 BLAS/LAPACK library and to compile MAGMA with ILP64 support. See magma/make.inc/make.inc.mkl-gcc-ilp64

As for performance, it highly depends on your system. What models are your CPU and GPU?


Post Reply