libcusparse_static not found

Hi,

I am trying to compile my code with PGI-19.4 (community version). For the code I need the cublas, cusolver, and cusparse library. Therefore I provide the flag -Mcudalib=cublas,… Unfortunately, I got the error message “… could not find libcusparse_static …”. In principle it makes sense because the libcusparse_static does not exist in the cuda/10.1/lib64 folder (on the other hand the libcublas_static and libcusolver_static exists). Why does PGI even try to link against a library which does not exist?


Thanks,
Reto

Hi Reto,

I’m assuming you’re also adding either “-Bstatic” or -Bstatic_pgi"?

Why does PGI even try to link against a library which does not exist?

Most likely an oversight. cuSparse, as well as cuRand, do have a static versions, but it looks like we failed to include them with our CUDA packages.

I added a problem report, TPR #27451, and we’ll see what can be done to fix the issue.

The work around would be to not use “-Bstatic” or “-Bstatic_pgi” when setting “-Mcudalib=cusparse” or “-Mcudalib=curand”.

Alternatively, you should be able to set the environment variable “CUDA_HOME” to a local CUDA installation and we’ll pick-up the libraries from there.

Thanks for the report,
Mat

Hi Mat,

many thanks for your reply. Yes, at some point it seems the flag -Bstatic is added.
Just another question related to missing files. Under cuda/10.0/lib64 I can find the lib libcusolver but in the include directory, there is not cusolver related header. Are the cusolver headers missing in cuda/10.0?

Thanks,
Regards,
Reto

Hi Reto,

At least in my CUDA 10.0 install, I see the cuSolver headers in the include directory. Not sure why they would be missing from your install.

% ls -1 /opt/cuda-10.0/include/cusolver*
/opt/cuda-10.0/include/cusolverDn.h
/opt/cuda-10.0/include/cusolverRf.h
/opt/cuda-10.0/include/cusolverSp.h
/opt/cuda-10.0/include/cusolverSp_LOWLEVEL_PREVIEW.h
/opt/cuda-10.0/include/cusolver_common.h

-Mat

Hi Mat,

That is strange. I just downloaded the 19.4 community version myself and installed it locally. However, if I check the “linux86-64-llvm/2019/cuda/10.0/include” I cannot find the cusolver headers, on the other hand, I can see the cusolver library in “linux86-64-llvm/2019/cuda/10.0/lib64”?

Thanks,
Regards,
Reto

TPR #27451 should be resolved with release 19.9