Thanks for your reply.
I am using nvfortran 20.11-0 LLVM 64-bit target on x86-64 Linux -tp skylake
.
Should I upgrade to a newer version?
BTW, here is the my call to the function, I wonder if I used the right argumentsā¦
subroutine foo
use parameter
use cusparse
implicit none
!A is a num x dgridsize sparse matrix
!B is the transpose of A
!C is the result of A*B
!num*25 is the number of nonzeros in A
type(cusparseHandle) :: handle
type(cusparseMatDescr) :: csrA,cscB,csrC
integer,device::num,dgridsize
real,device::csrAval(num*25),cscBval(num*25)
real,device::csrrowptr(num+1),csrcolind(num*25)
real,device::csccolptr(num+1),cscrowind(num*25)
real,device,dimension(:),allocatable::buffer
integer::buffersize
ierr= cusparsecreate(handle)
ierr= cusparsecreatematdescr(csrA)
ierr= cusparsecreatematdescr(cscB)
ierr= cusparsecreatematdescr(csrC)
ierr= cusparsesetmatindexbase(csrA,CUSPARSE_INDEX_BASE_ONE)
ierr= cusparsesetmatindexbase(cscB,CUSPARSE_INDEX_BASE_ONE)
ierr= cusparsesetmatindexbase(csrC,CUSPARSE_INDEX_BASE_ONE)
ierr= cusparsesetmattype(csrA,CUSPARSE_MATRIX_TYPE_GENERAL)
ierr= cusparsesetmattype(cscB,CUSPARSE_MATRIX_TYPE_GENERAL)
ierr= cusparsesetmattype(csrC,CUSPARSE_MATRIX_TYPE_GENERAL)
ierr= cusparseCsr2cscEx2_bufferSize(handle,num,dgridsize,num*25,csrAval,&
csrrowptr,csrcolind,cscBval,csccolptr,cscrowind,CUDA_R_32F,CUSPARSE_ACTION_NUMERIC,&
CUSPARSE_INDEX_BASE_ONE,CUSPARSE_CSR2CSC_ALG2,buffersize)
allocate(buffer(buffersize))
ierr= cusparsecsr2cscEx2(handle,num,dgridsize,num*25,csrAval,csrrowptr,&
csrcolind,cscBval,csccolptr,cscrowind,CUDA_R_32F,CUSPARSE_ACTION_NUMERIC,&
CUSPARSE_INDEX_BASE_ONE,CUSPARSE_CSR2CSC_ALG2,buffer)
ierr= cusparseScsrgemm2(...)
end subroutine foo
Unfortunately still got the same compiling errorā¦