tensorflow: Installation Issue: Couldn't open CUDA library libcuda.so.1.
In the step where I have to run
bazel-bin/tensorflow/cc/tutorials_example_trainer --use_gpu
I get the following messages:
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcublas.so.7.0 locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcudnn.so locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcufft.so.7.0 locally
I tensorflow/stream_executor/dso_loader.cc:102] Couldn’t open CUDA library libcuda.so.1. LD_LIBRARY_PATH:…
…
…
…
failed to find libcuda.so on this system: Failed precondition: could not dlopen DSO: libcuda.so.1; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory
…
…
…
E tensorflow/stream_executor/cuda/cuda_driver.cc:491] failed call to cuInit: CUDA_ERROR_NO_DEVICE
…
…
…
I tensorflow/core/common_runtime/gpu/gpu_init.cc:81] No GPU devices available on machine.
Environment info
Operating System: Debian 8
Installed version of CUDA and cuDNN: CUDA 7.0, cuDNN 4.0.7
(please attach the output of ls -l /path/to/cuda/lib/libcud*):
/usr/local/cuda/lib/libcudadevrt.a
/usr/local/cuda/lib/libcudart.so -> libcudart.so.7.0
/usr/local/cuda/lib/libcudart.so.7.0 -> libcudart.so.7.0.28
/usr/local/cuda/lib/libcudart.so.7.0.28
/usr/local/cuda/lib/libcudart_static.a
- The commit hash (git rev-parse HEAD)554ddd9ad2d4abad5a9a31f2d245f0b1012f0d10
- The output of bazel versionBuild target: bazel-out/local-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar Build time: Thu Jan 01 00:00:00 1970 (0) Build timestamp: Thu Jan 01 00:00:00 1970 (0) Build timestamp as int: 0
P.S. I have two GPUs installed on my server. One is used for GUI (AMD) and the other is used for computation (NVIDIA). Should I do anything to make sure the second GPU is being used?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 22 (3 by maintainers)
Hi, I have solved it by these steps: 1.
$ sudo apt install nvidia-361-dev2.$ sudo find /usr/ -name 'libcuda.so.1'(then you will know path oflibcuda.so.1) 3. just copy thelibcuda.so.1to/usr/local/cuda/lib/actually thelibcuda.so.1you find is a link file, see:You could just ln -s libcuda.so.7.* libcuda.so.1 and see if it works.
it works for me
Did you check on your system if libcuda.so.* does exist ? On my system it is in /usr/local/nvidia/lib64 and another of my system it is in /usr/lib/.
If it does exist, then set the LD_LIBRARY_PATH env variable to point to the correct path. If it doesn’t you might’ve to install it on your system.
Cuda should not recognize the AMD device as a valid cuda target, so you should run on the right GPU.
@soichih Hi, my os is ubuntu 16.04 so this repo is provided by default. So I suggest you can try to install nvidia-3**-dev (I guess the version is 352 if you use ubuntu 14.04) and then try to find the
libcuda.so.1.@MahdiNazemi I solved this problem by comparing with other machines. In /use/lib64
libcuda.so -> /usr/lib64/libcuda.so.1 libcuda.so.1 -> /usr/lib64/nvidia/libcuda.so.1
libcuda.so.1 should be linked to /usr/lib64/nvidia/libcuda.so.1
Good luck!