1

I'm compiling the source code by using pgf95 (Fortran compiler).

If I use cuda 10.0, it successfully compiles the source code.

However, If I use cuda 10.1, it fails showing that 'cannot find libcublasLt.so'.

When I scan the directory cuda-10.0/lib64, cuda-10.1/lib64, both do not have the file starting with 'libcublasLt'.

How can I solve this issue?

sungjun cho
  • 809
  • 7
  • 18

1 Answers1

6

libcublasLt.so is the library that provides the implementation for the cublasLt API which is defined here. It just happens to be a separate shared object from libcublas.so

In the past (e.g. CUDA 10.0 and prior), most CUDA libraries were installed in /usr/local/cuda/lib64 (or similar) by default (on linux). At about the CUDA 10.1 timeframe, it was decided that some libraries would be installed in different places. CUDA 10.1 is also where the cublasLt API and library were introduced. This affected some cublas libraries and is discussed in the CUDA 10.1 release notes here (both the introduction of the cublasLt library, as well as the change in library locations).

So there are 2 possibilities here (for CUDA 10.1, CUDA 10.2):

  1. libcublasLt.so is on your machine, but it is simply not where you were expecting to find it.

  2. libcublasLt.so is not on your machine. This means you are working with CUDA version prior to the introduction of the cublasLt API (i.e. 10.0 or prior), or you have a broken install.

So, assuming you are working with CUDA 10.1 or CUDA 10.2, the first step is to locate/determine whether libcublasLt.so is on your machine or not. You can use a linux utility like find or locate to accomplish that. They should have man pages available for you.

If you can find it, then you need to provide the path to it, via a linker spec (e.g. -L/path/to/libcublasLt.so/

If you can't find it, then either you are working with an older version of CUDA (10.0 or prior), or you need to reinstall CUDA.

I believe by the time you get to CUDA 11.0, the CUDA packages put the cublas libraries back in /usr/local/cuda/lib64 with the other libraries. YMMV.

Robert Crovella
  • 143,785
  • 11
  • 213
  • 257
  • 1
    This means that 10.0 does not have libcublasLt.so _at all_? – clemisch Nov 05 '20 at 07:55
  • Hmm... I understand your second point "_libcublasLt.so is not on your machine. This means you are working with CUDA version prior to the introduction of the cublasLt API (i.e. 10.0 or prior)_" as 10.0 does not have it. Thing is, I need it for compiling a library, but can't find the file for 10.0. – clemisch Nov 05 '20 at 17:23
  • 2
    Yes, you're correct, my mistake. the cublasLt API was introduced with CUDA 10.1 (see [here](https://docs.nvidia.com/cuda/archive/10.1/cublas/index.html) and is not available with CUDA 10.0 (see [here](https://docs.nvidia.com/cuda/archive/10.0/cublas/index.html)). (I deleted my previous comment since it's incorrect/misleading). – Robert Crovella Nov 05 '20 at 18:18