Using magma_ssyevd_gpu in MAGMA 2.0.1

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)

Using magma_ssyevd_gpu in MAGMA 2.0.1

Postby jdillon2011 » Tue Apr 05, 2016 9:33 pm

Hello everyone!

I am trying to use magma_ssyevd_gpu to find eigenvalues of a symmetric NxN matrix. I have been reviewing the documentation but am still confused about the setup before calling the routine. Can anyone help me understand the setup and syntax in the documentation?

Thank you in advance!
jdillon2011
 
Posts: 2
Joined: Tue Apr 05, 2016 9:28 pm

Re: Using magma_ssyevd_gpu in MAGMA 2.0.1

Postby mgates3 » Wed Apr 06, 2016 7:50 am

What particular points are causing confusion?

A is a symmetric, N x N matrix embedded in an LDA x N array (with LDA >= N). LAPACK and MAGMA store all matrices column-wise.
Per UPLO, only the upper or lower portion needs to be set; the other side is known by symmetry and therefore ignored.
For magma_ssyevd, A is in CPU host memory. For magma_ssyevd_gpu, dA is already in GPU memory (LDA renamed LDDA).

Eigenvalues are returned in the w array, of size N.

There are several workspaces:
work, of size lwork, with formulas in documentation, or query for size by calling with lwork = -1.
iwork, of size liwork, with formulas in documentation, or query for size by calling with liwork = -1.

For magma_ssyevd_gpu takes an additional CPU workspace:
wA is LDWA x N, with LDWA >= N.

-mark
mgates3
 
Posts: 753
Joined: Fri Jan 06, 2012 2:13 pm

Re: Using magma_ssyevd_gpu in MAGMA 2.0.1

Postby haidar » Fri Apr 08, 2016 10:13 am

You can also use the ssyevdx_2stage which is a newer algorithm faster for large matrices.
haidar
 
Posts: 19
Joined: Fri Sep 19, 2014 3:43 pm

Re: Using magma_ssyevd_gpu in MAGMA 2.0.1

Postby jdillon2011 » Wed May 11, 2016 5:49 pm

Hey guys!

Thank you for the replies and sorry for the long delay. I understand the parameters for the function. I need help with the installation of the MAGMA library first. I am trying to install the library in Visual Studio 2013 with CUDA API installed already. Then I would like help understanding the code before calling the "magma_ssyevd_gpu" function. This includes mallocs, handle declarations, workspace declarations, etc. I hope this clarifies what I am asking for.
jdillon2011
 
Posts: 2
Joined: Tue Apr 05, 2016 9:28 pm

Re: Using magma_ssyevd_gpu in MAGMA 2.0.1

Postby mgates3 » Fri May 20, 2016 10:56 am

There are installation instructions in README-Windows, using CMake. If there are particular points of difficulty there, let us know.

A simple, complete example of using MAGMA (though not ssyevd specifically) is in example/example_v2.c

For ssyevd specifically, see testing/testing_ssyevd_gpu.cpp, though that is more complicated than you will need since it supports several versions of the routine and also checking the results. Also, setting up the queue is handled outside that file; see the above example.

-mark
mgates3
 
Posts: 753
Joined: Fri Jan 06, 2012 2:13 pm


Return to User discussion

Who is online

Users browsing this forum: No registered users and 4 guests