ubuntucudanvidiacudnn

libcublas.so.11 file missing after installing cuDNN successfully and libcublas.so.12 being present


I'm trying to install cuDNN on my Ubuntu 22.10 machine, I've followed the instructions here on how to install it using the package manager.

The installation has worked fine and I was able to compile the mnistCUDNN example like in step 1.4.

But unfortunately when I run the compiled mnistCUDNN binary I get the following error:

Could not load library libcudnn_ops_infer.so.8. Error: libcublas.so.11: cannot open shared object file: No such file or directory

My LD_LIBRARY_PATH env variable is set to the following path /usr/local/cuda-12.0/lib64

When I check that directory there is a file called libcudnn_ops_infer.so.8 as well as the following versions of libcublas.so:

libcublas.so
libcublas.so.12
libcublas.so.12.0.2.224

so there is a version 12 file but no libcublas.so.11 like in the error message.

No I'm wondering why that file is missing or why it can't work with the existing libcublas.so.12.

nvidia-smi works fine too and tells me that I have cuda version 12 running.


Solution

  • I don't know why but I had to manually copy the contents of the cuDNN tar file like described here in section 1.3.1 on top of the package manager installation. After doing this everything works.

    $ sudo cp cudnn-*-archive/include/cudnn*.h /usr/local/cuda-12.0/include 
    $ sudo cp -P cudnn-*-archive/lib/libcudnn* /usr/local/cuda-12.0/lib64 
    $ sudo chmod a+r /usr/local/cuda-12.0/include/cudnn*.h /usr/local/cuda-12.0/lib64/libcudnn*
    

    Make sure to check if the the directory of your cuda installation differs.

    The tar file is available for download here.