Error while loading shared library cuFFT, cuda 9.1

I’m a beginner trying to learn cuda. After installation, I was trying to compile and run all the sample programs. All programs seem to compile fine, But some don’t execute. It seems like the cuFFT library hasn’t been linked/installed properly. So any program with that dependency doesn’t execute. I get the following error:

./convolutionFFT2D: error while loading shared libraries: libcufft.so.9.1: cannot open shared object file: No such file or directory

Can anyone help me with this issue? Since I would also like to install and run tensorflow, I would like to avoid any issue related to the cuda install.

My system is running on fedora 27. I have installed nvidia driver version 390.25. I am using the cuda-g++ compiler for compiling the programs.

You need to make sure you have updated the LD_LIBRARY_PATH environment variable correctly. Refer to the mandatory post-install actions in the linux install guide.

Thanks a lot for your help! It seems to be fine now. I had set the variable as :

export LD_LIBRARY_PATH=/usr/local/cuda/lib

All programs other than the ones using cuFFT were working fine with it. Setting the path as the following:

export LD_LIBRARY_PATH=/usr/local/cuda-9.1/lib64
${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

has solved the issue, but I get the following prompt whenever I login as root:

-bash: export: `:/usr/local/cuda-9.1/lib64’: not a valid identifier

Your export command was not correctly formed then. You should use lib64, not lib, usually.

Rather than use the complex syntax in the install guide, I usually use something simpler such as:

export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH

that usually works. The exact need here will depend on what else is going on in your system as well as possibly the distro you are using.

Thanks for the tip! I tried your syntax, and the prompt doesn’t show up anymore.

Hi Robert, I am facing the same issue, I get this error when trying to run relion:

relion: error while loading shared libraries: libcufft.so.9.1: cannot open shared object file: No such file or directory

In my ~/.bashrc file this is how I export it:

export LD_LIBRARY_PATH="/usr/local/cuda-10.1/lib64:/usr/local/cuda-10.1/extras/CUPTI/lib64:/usr/local/cuda-10.1/targets/x86_64-linux/lib:$LD_LIBRARY_PATH"

and when running nvcc --version in terminal I get this:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Apr_24_19:10:27_PDT_2019
Cuda compilation tools, release 10.1, V10.1.168

Could you please advise what might be the problem? Thank you very much.

Your relion is linked against CUDA 9.1. You cannot use CUDA 10.1 as a replacement for that. Install CUDA 9.1 (you don’t need to install the GPU driver, just the CUDA toolkit) and make sure your PATH and LD_LIBRARY_PATH variables point to your CUDA 9.1 installation.

Thanks for your reply, but how comes relion is linked to CUDA 9.1 when I don’t have it installed?

I have no idea, since I don’t know how your relion got built. But the answer is in the build process.

But what I don’t understand is that relion is installed on a nas storage connected to multiple machines, and on this machine it is the only machine that gives this error while on the other machines no error appears when running relion, how comes?

Maybe because those other machines have a proper install of CUDA 9.1? Or maybe there is an install of CUDA 9.1 on the NAS and you just haven’t set your machine up properly?

I really doubt I will be able to solve this for you. I’ve given you instructions how to fix already. Its what I would do if I were faced with this, and had no other information than what is in this thread.