Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error:55: Could not load dynamic library 'libcudnn.so.7 #36426

Closed
Lip651 opened this issue Feb 2, 2020 · 9 comments
Closed

Error:55: Could not load dynamic library 'libcudnn.so.7 #36426

Lip651 opened this issue Feb 2, 2020 · 9 comments
Assignees
Labels
stat:awaiting response Status - Awaiting response from author subtype: ubuntu/linux Ubuntu/Linux Build/Installation Issues TF 2.1 for tracking issues in 2.1 release type:build/install Build and install issues

Comments

@Lip651
Copy link

Lip651 commented Feb 2, 2020

System information

  • Operating System: 18.04.4 LTS
  • TensorFlow installed from: source
  • TensorFlow version: 2.1.0
  • Python version: 3.6.9
  • Installed using: virtualenv, and then pip in order to build the wheel as mentionned in the source installation
  • Bazel version: bazel-1.2.1 as mentionned in my configure.py file. No other version was possible
  • GCC/Compiler: 7.4.0
  • CUDA: 10.2.89
  • cuDNN: 7.6.5
  • GPU model and memory: GeForce RTX 2070, 8 Gb
  • NVIDIA-SMI: 440.33.01
  • Driver Version: NVIDIA-SMI 440.33.01

Describe the problem
I have followed carefully the installation guide of cuDNN, and tensorflow from source, didn't get any error during the installation, but when I call tf.test.is_gpu_available() I get one signle error which is:
Could not load dynamic library 'libcudnn.so.7'; dlerror: libcudnn.so.7: cannot open shared object file: No such file or directory
I have looked at the posts already dealing with this question, tried there answers, but nothing changes. I have tried:

  • export LD_LIBRARY_PATH=/usr/local/cuda/lib64/ from this post
  • sudo sh -c "echo '/usr/local/cuda/lib64\n/usr/local/cuda/lib >> /etc/ld.so.conf.d/nvidia.conf"
    sudo ldconfig from here
  • export LD_LIBRARY_PATH=/usr/local/cuda-10.2/lib64:$LD_LIBRARY_PATH
    export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH from here
    After rebooting each time, I still get the error mentioned above.
  • I have also verified where is the libcudnn.so.7 in the root file and it is in:
    /usr/local/cuda-10.2/targets/x86_64-linux/lib
    and important, also in /usr/local/cuda-10.2/targets/x86_64-linux/lib there is a file called:
    libcudnn.so.7.6.5

Please consider that I am not a very experienced Programmer.
Any help would be extremely appreciated. Thank you for your time.

Provide the exact sequence of commands / steps that you executed before running into the problem

Activating my virtual environment, in Python (I have checked that the interpreter is indeed the one in my virtualenv):

from __future__ import absolute_import, division, print_function, unicode_literals
import tensorflow as tf
tf.test.is_gpu_available()

Any other info / logs
The entire error I get calling tf.test.is_gpu_available() is

2020-02-02 20:22:17.488097: I tensorflow/core/platform/profile_utils/cpu_utils.cc:101] CPU Frequency: 3493375000 Hz
2020-02-02 20:22:17.489597: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7fbde003fa20 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-02-02 20:22:17.489647: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
2020-02-02 20:22:17.492686: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1
2020-02-02 20:22:17.598433: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x3d91ff0 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:
2020-02-02 20:22:17.598490: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): GeForce RTX 2070, Compute Capability 7.5
2020-02-02 20:22:17.599531: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1558] Found device 0 with properties: 
pciBusID: 0000:09:00.0 name: GeForce RTX 2070 computeCapability: 7.5
coreClock: 1.815GHz coreCount: 36 deviceMemorySize: 7.79GiB deviceMemoryBandwidth: 417.29GiB/s
2020-02-02 20:22:17.599953: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.2
2020-02-02 20:22:17.601575: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10
2020-02-02 20:22:17.603388: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10
2020-02-02 20:22:17.603663: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10
2020-02-02 20:22:17.605504: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10
2020-02-02 20:22:17.606545: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10
""ERROR IS HERE""
2020-02-02 20:22:17.606679: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcudnn.so.7'; dlerror: libcudnn.so.7: cannot open shared object file: No such file or directory
""DON'T KNOW IF THIS IS AN ERROR FROM THE PREVIOUS ONE""
2020-02-02 20:22:17.606693: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1595] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
Skipping registering GPU devices...
2020-02-02 20:22:17.606721: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1099] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-02-02 20:22:17.606729: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1105]      0 
2020-02-02 20:22:17.606736: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1118] 0:   N 
@ymodak
Copy link
Contributor

ymodak commented Feb 3, 2020

TF 2.1 supports cuda 10.1. Please roll back to cuda 10.1.
See https://www.tensorflow.org/install/gpu#software_requirements

@oanush oanush assigned oanush and unassigned amahendrakar Feb 3, 2020
@oanush oanush added subtype: ubuntu/linux Ubuntu/Linux Build/Installation Issues type:build/install Build and install issues TF 2.1 for tracking issues in 2.1 release stat:awaiting response Status - Awaiting response from author labels Feb 3, 2020
@s4sarath
Copy link

s4sarath commented Feb 4, 2020

@ymodak - I am using cuda 10.1 but no help

@Lip651
Copy link
Author

Lip651 commented Feb 5, 2020

It indeed worked for me, but it wasn't straight forward

@oanush
Copy link

oanush commented Feb 10, 2020

@Lip651 ,
Feel free to close the issue if it is resolved.

@Lip651 Lip651 closed this as completed Feb 10, 2020
@tensorflow-bot
Copy link

Are you satisfied with the resolution of your issue?
Yes
No

@NeighborhoodCoding
Copy link

how to roll back cuda 10.1.?

@pavlexander
Copy link

managed to fix it, my comment is here: #20271 (comment)

@EdisonLeeeee
Copy link

tensorflow 2.1 requires CUDA 10.1 from here, it is better to downgrade you cuda toolkit.

@alitokur
Copy link

alitokur commented Nov 10, 2020

Problem is:
Could not load dynamic library 'libcudnn.so.7'; dlerror: libcudnn.so.7: cannot open shared object file: No such file or directory

Solution :
1-) download related cudnn from here
2-) when you inside the extracted folder:

$ sudo cp include/cudnn.h /usr/local/cuda-10.2/include
$ sudo cp lib64/libcudnn* /usr/local/cuda-10.2/lib64
$ sudo chmod a+r /usr/local/cuda-10.2/lib64/libcudnn*

BE CAREFULL: Check your cuda installation. I mean im using cuda-10.0
So:

$ sudo cp include/cudnn.h /usr/local/cuda-10.0/include
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat:awaiting response Status - Awaiting response from author subtype: ubuntu/linux Ubuntu/Linux Build/Installation Issues TF 2.1 for tracking issues in 2.1 release type:build/install Build and install issues
Projects
None yet
Development

No branches or pull requests

9 participants