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!
Using magma_ssyevd_gpu in MAGMA 2.0.1
Re: Using magma_ssyevd_gpu in MAGMA 2.0.1
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
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
Re: Using magma_ssyevd_gpu in MAGMA 2.0.1
You can also use the ssyevdx_2stage which is a newer algorithm faster for large matrices.
-
jdillon2011
- Posts: 2
- Joined: Tue Apr 05, 2016 9:28 pm
Re: Using magma_ssyevd_gpu in MAGMA 2.0.1
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.
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.
Re: Using magma_ssyevd_gpu in MAGMA 2.0.1
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
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