6
down vote
favorite
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
http://icl.cs.utk.edu/magma/docs/zhegvx_8cpp.html
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?
Thanks
Poor performance for calculating eigenvalues and eigenvector
Re: Poor performance for calculating eigenvalues and eigenve
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?
-mark
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?
-mark