Generalized eigenvalue-eigenvector in GPU using magma

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)
Post Reply
maiconpl01
Posts: 2
Joined: Tue Sep 29, 2015 5:01 pm

Generalized eigenvalue-eigenvector in GPU using magma

Post by maiconpl01 » Tue Sep 29, 2015 5:40 pm

Dear all,
I'm looking forward for a help in the problem I'm having while trying to use the code present in https://www.google.com.br/url?sa=t&rct= ... 7116,d.Y2I

more specifically, on page 222. Below it follows attached the source code that I have worked with.

After compiling the code by:

gcc -c magma_forum.c -o magma_forum.o -I/usr/local/cuda-5.0/include -I/home/maicon/programs/magma-1.7.0/include
gcc magma_forum.o -L/usr/local/cuda-5.0/lib64 -L/home/maicon/programs/magma-1.7.0/lib -lcuda -lcudart -lmagma

I have the following answer:

On entry to magma_dsyevd_gpu, parameter 1 had an illegal value (info = -1)
upper left corner of a:
[
1.0000 0. 0. 0. 0.
0. 2.0000 0. 0. 0.
0. 0. 3.0000 0. 0.
0. 0. 0. 4.0000 0.
0. 0. 0. 0. 5.0000
];
On entry to magma_dsyevd_gpu, parameter 10 had an illegal value (info = -10)
first 5 eigenvalues of a:
0.000000
0.000000
0.000000
0.000000
0.000000
left upper corner of the matrix of eigenvectors :
[
1.0000 0. 0. 0. 0.
0. 2.0000 0. 0. 0.
0. 0. 3.0000 0. 0.
0. 0. 0. 4.0000 0.
0. 0. 0. 0. 5.0000
];


This is not the correct based on the result described in end of page 222 of the material 'mygpu.pdf'.

Please, could someone help me?

Thank you very much in advance!!!

Maicon P. L.
Attachments
magma_forum.c
(2.25 KiB) Downloaded 132 times

mgates3
Posts: 918
Joined: Fri Jan 06, 2012 2:13 pm

Re: Generalized eigenvalue-eigenvector in GPU using magma

Post by mgates3 » Wed Sep 30, 2015 3:57 pm

Two error messages are printed. The first is for parameter 1, jobz, due to using old character constants instead of named constants, when querying for workspace. This was already fixed in the 2nd call to magma_dsyevd_gpu.

Code: Select all

magma_dsyevd_gpu( 'V', 'L', ... );
instead of

Code: Select all

magma_dsyevd_gpu( MagmaVec, MagmaLower, ... );
The second is for parameter 10, lwork, because the workspace size is not large enough, which is a result of the workspace query failing from the above bug. Fix the above and everything works:

Code: Select all

mint magma-trunk/bug-forum> make
gcc -Wall \
		-I ../include     -I /usr/local/cuda-6.5/include \
		-L ../lib -lmagma -L /usr/local/cuda-6.5/lib -lcublas -lcudart \
		-o magma_forum magma_forum.c \

mint magma-trunk/bug-forum> ./magma_forum
 upper left corner of a:
[
   1.0000   0.       0.       0.       0.    
   0.       2.0000   0.       0.       0.    
   0.       0.       3.0000   0.       0.    
   0.       0.       0.       4.0000   0.    
   0.       0.       0.       0.       5.0000
];
 first 5 eigenvalues of a:
1.000000
2.000000
3.000000
4.000000
5.000000
 left upper corner of the matrix of eigenvectors :
[
   1.0000   0.       0.       0.       0.    
   0.       1.0000   0.       0.       0.    
   0.       0.       1.0000   0.       0.    
   0.       0.       0.       1.0000   0.    
   0.       0.       0.       0.       1.0000
];
NB: the subject line was "generalized eigenvalue" (dsygvd), but the code called the standard symmetric eigenvalue routine (dsyevd).
-mark

maiconpl01
Posts: 2
Joined: Tue Sep 29, 2015 5:01 pm

Re: Generalized eigenvalue-eigenvector in GPU using magma

Post by maiconpl01 » Thu Oct 01, 2015 7:24 pm

Hi Marks, thank you for the answer! I'm trying to respond you since yesterday but I could not since I'm getting the message: "This message was flagged as spam and has been denied." I'm looking forward to be able to contact you again.

Post Reply