undefined reference when using cublas_device

Dear Mat and all,

I am trying to use cublas routines inside a device kernel, however, I get a few linking issues:

nvlink error   : Undefined reference to 'cublasCreate_v2

and when I looked at the /opt/packages/cuda/10.0/lib64 (or pgi library directory), I couldn’t find the cublas_device libraries. So I am not sure where to link for libcublas_device.

Reading https://devtalk.nvidia.com/default/topic/499852/undefined-reference-to-cublascreate_v2-/, it appears that cublas_device is deprecated? Is there any alternative?
Per CUDA Fortran documentation, you can still use cublas_device (with the compilation pgfortran -Mcuda=cc35 cublasdev.cuf -lcublas_device). Am I doing something wrong?


Hi asaadat,

it appears that cublas_device is deprecated?

Worse, they dropped it completely in CUDA 10.0.

Is there any alternative?

Only either go back to using CUDA 9.2 which wont be good for the future, write the routine yourself, or limit yourself to using the host side cuBLAS routines.

The latter is probably your best option.

Sorry about this, but unfortunately there wasn’t much we here at PGI could do about it.