PGF90-S-0155-Could not resolve generic procedure

Hello everyone!

I am trying to use cusparse library with OpenACC. I keep sparse matrix arrays inside derived type:

type :: csr
  integer ( kind = 4 )                                :: N          !Number of equations
  integer ( kind = 4 )                                :: NonZero    !Number of nonzero elements
  real    ( kind = 8 ), allocatable, dimension(:)     :: A          !Nonzero elements
  integer ( kind = 4 ), allocatable, dimension(:)     :: ia         !Row Pointer
  integer ( kind = 4 ), allocatable, dimension(:)     :: ja         !Columns
  real    ( kind = 8 ), allocatable, dimension(:)     :: b          !Ax = b
  real    ( kind = 8 ), allocatable, dimension(:)     :: X          !Solution
end type csr

Then I allocate all arrays and copy them to GPU. But when I try to use cusparseDcsrsv_analysis I get an error.

type :: cudaBLAS
  type(cusparseHandle)              :: cusparse_H
  type(cublasHandle)                :: cublas_H
  type(cusparseMatDescr)            :: descrA
  type(cusparseMatDescr)            :: descrL
  type(cusparseMatDescr)            :: descrU
  type(cusparseSolveAnalysisInfo)   :: infoA, infoL, infoU
  integer(kind = 4)                 :: status
end type cudaBLAS

type(cudaBLAS) :: TEMcuda
type(csr) :: TEMmatr

!$acc host_data use_device(TEMmatr%A, TEMmatr%ia, TEMmatr%ja)
TEMcuda%status = cusparseDcsrsv_analysis(TEMcuda%cusparse_H, CUSPARSE_OPERATION_NON_TRANSPOSE, TEMmatr%N, TEMmatr%NonZero, TEMcuda%descrU, TEMmatr%A, TEMmatr%ia, TEMmatr%ja, TEMcuda%infoU)
!$acc end host_data

If I use arrays that are not in the derived type compilation goes well.
pgf90 --version
pgf90 18.10-1 64-bit target on x86-64 Linux -tp p7
PGI Compilers and Tools
Copyright © 2018, NVIDIA CORPORATION. All rights reserved.

Is there anything I can do instead of using separate array names, since I need several systems to be solved?


Can you try using PGI 19.4 or 19.5?

We did have some issues with using derived types in “host_data” that have been resolved in the 2019 compilers which may fix your issue as well.


Hi Mat,

Unfortunately compiling with 19.4 did not solve the problem. I still get an error with cusparsedcsrsv_analysis and other subroutines like cublasdcopy, cusparsedcsrmv, cublasdnrm2, etc.

Ok. Can you send to PGI Customer Service ( a reproducing example?

It’s most likely related but somehow different to the other issues we were having with using derived types in host_data constructs. Though, having a full example known to fail will help us diagnose the issue.