/usr/bin/ld: cannot find -lcublasLt

Hi, I am trying to run my code and using the pgf90 compiler and getting the following error:

/usr/bin/ld: cannot find -lcublasLt
pgacclnk: child process exit status 1: /usr/bin/ld

I use the following flags:

pgf90 file1.f95 file2.f95 -Mcuda -Mcuda=lineinfo -mcmodel=medium -Mlarge_arrays -fast -O4 -o fileout.out

I tried to ensure that the LD_LIBRARY_PATH was set using:\

export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/nvidia/hpc_sdk/Linux_x86_64/21.3/math_libs/11.2/lib64 "

Hi laurjj,

What CUDA driver version do you have installed? (you can find this info by running ‘nvaccelinfo’).

I suspect what’s going on is that you’ve installed the HPC SDK that only includes the latest CUDA 11.2. We also have a ‘multi’ package that also includes the most current plus two previous CUDA releases.

By default, the compiler will use the CUDA libraries that match the CUDA driver version. So if you had for example a CUDA 11.0 driver, the compiler will include the library path of “/opt/nvidia/hpc_sdk/Linux_x86_64/21.3/math_libs/11.0/lib64”. But if 11.0 is not available, you’d get this error.

You can use the option “-Mcuda=cuda11.2” to have the compiler use the CUDA 11.2 toolset, but this may cause runtime issues if your CUDA driver can’t run CUDA 11.2 binaries.

If this is indeed the issue, then your best option is to update your CUDA driver or install the HPC SDK ‘multi’ package to get the older CUDA toolset.

Note that “LD_LIBRARY_PATH” sets the path for the dynamic loader to find shared libraries at runtime. It’s not used by the static linker. For this, you need to use the “-L”

-Mat