cusolver document

Hi, all:

I’m new to cuda fortran. I’m trying to port my Fortran program to cuda platform. Since my code heavily depends on blas and lapack libraries, I need use cublas and cusolver libraries to ease the porting process. I downloaded and installed the free community version of PGI compilers on windows (version 19.1). I found cublas.mod and cusolverdn.mod in the include directory. But on the Fortran Cuda interface document page of PGI website (https://www.pgroup.com/resources/docs/20.4/x86/pgi-cuda-interfaces/index.htm), there is no introduction of the cusolver library. Can anyone tell me where I can find the fortran Cuda interface document on the cusolver library?

Thanks,

Jianhua

Sorry, the doc for the cusolver Fortran interfaces is not available yet. Suffice it to say, there are no surprises in the interfaces, they correspond 1-1 with the documented cusolver arguments. Here’s an example:

USE cusolverDn, only : cusolverDnHandle, cusolverDnCreate, cusolverDnDestroy
USE cusolverDn, only : CUSOLVER_EIG_TYPE_1, CUSOLVER_EIG_MODE_VECTOR
USE cusolverDn, only : cusolverDnZhegvd_bufferSize, cusolverDnZhegvd
. . .

type(cusolverDnHandle) :: cusolverDnH
istat = cusolverDnCreate(cusolverDnH)
. . .

istat = cusolverDnZhegvd_buffersize(cusolverDnH, CUSOLVER_EIG_TYPE_1, &
CUSOLVER_EIG_MODE_VECTOR, CUBLAS_FILL_MODE_UPPER, &
n, h_d, ldh, s_d, ldh, e_d, lwork)
. . .

istat = cusolverDnZhegvd(cusolverDnH, CUSOLVER_EIG_TYPE_1, &
CUSOLVER_EIG_MODE_VECTOR, CUBLAS_FILL_MODE_UPPER, &
n, h_d, ldh, s_d, ldh, e_d, work_d, lwork, devInfo_d)
. . .

istat = cusolverDnDestroy(cusolverDnH)

Hi, Brentl:

Thanks for your reply and the example. I can figure it out now.

John

Hi, Brentl:

I need the Fortran interface for ZGETRF and ZGETRI in cusolver library. Could you please provide me an example of these two functions/subrotines?

Thanks in advance.

John