Ubuntu14.04+cuda8.06+cudnn5.1+gtx1070的GPU环境配置中遇到的错误修改参考
2017-08-19 21:04
459 查看
电脑配置: 系统Ubuntu14.04 cuda——8.0.61 NVIDIA驱动375.65 cudnn5.1 gpu:NVIDIA1070
报错:ImportError:libcudart.so.8.0:无法打开共享对象文件:没有这样的文件或目录
一个非常好用的教程:http://blog.csdn.net/u011197534/article/details/52965413按照这个教程走下去不会有问题,笔者试了不下十次,这个教程亲测有效,请不要忽略细节哦!
一般基于NVIDIA的GPU版本安照教程装好后都会报错,很多朋友都遇到!我遇到过两次一次是libcudnn.so.5的链接问题,这次是ImportError:libcudart.so.8.0:无法打开共享对象文件:没有这样的文件或目录,其实这两次的问题都一样。
先讲讲第一次问题的解决方法是:
sudo cp libcudnn.so libcudnn_copy.so
sudo cp libcudnn.so.5 libcudnn_copy.so.5(这两条可以不要,但是在Ubuntu系统中做任何删除的事情,请注意备份哦!小心为了,笔者曾因为不小心重装过系统n次,血的教训,备份,备份,备份!)
sudo rm libcudnn.so
sudo rm libcudnn.so.5
sudo ln -s libcudnn.so.5.1.10 libcudnn.so.5
sudo ln -s libcudnn.so.5 libcudnn.so
建立软链接后,从新运行无问题:
2017-08-09 14:49:22.663563: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could
speed up CPU computations.
2017-08-09 14:49:22.663578: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could
speed up CPU computations.
2017-08-09 14:49:22.663581: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could
speed up CPU computations.
2017-08-09 14:49:22.663584: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could
speed up CPU computations.
2017-08-09 14:49:22.663586: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could
speed up CPU computations.
2017-08-09 14:49:22.995677: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:893] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so
returning NUMA node zero
2017-08-09 14:49:22.995955: I tensorflow/core/common_runtime/gpu/gpu_device.cc:940] Found device 0 with properties:
name: GeForce GTX 1070
major: 6 minor: 1 memoryClockRate (GHz) 1.7845
pciBusID 0000:01:00.0
Total memory: 7.92GiB
Free memory: 7.41GiB
2017-08-09 14:49:22.995965: I tensorflow/core/common_runtime/gpu/gpu_device.cc:961] DMA: 0
2017-08-09 14:49:22.995969: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] 0: Y
2017-08-09 14:49:22.995974: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1030] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 1070, pci bus id: 0000:01:00.0)
第二次问题的解决方法是:
其实他是配置问题,没有资源共享,因此运行如下指令:
sudo ldconfig /usr/local/cuda/lib(64) 需不需要加64根据自己安装的文件夹查看情况来确定!
但是运行这个命令后可能会报错,报错为:
/sbin/ldconfig.real: /usr/local/cuda/lib64/libcudnn.so.5不是符号连接
因此这样又回到了第一个问题,所以我们只要用第一个问题的解决办法输入命令运行即可消除这个报错。
然后在输入:sudo ldconfig /usr/local/cuda/lib(64)
就不会报错了!
在用你的tensorflow去测试你的GPU版本的程序即可得到:
2017-08-09 14:49:22.663563: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could
speed up CPU computations.
2017-08-09 14:49:22.663578: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could
speed up CPU computations.
2017-08-09 14:49:22.663581: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could
speed up CPU computations.
2017-08-09 14:49:22.663584: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could
speed up C
4000
PU computations.
2017-08-09 14:49:22.663586: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could
speed up CPU computations.
2017-08-09 14:49:22.995677: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:893] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so
returning NUMA node zero
2017-08-09 14:49:22.995955: I tensorflow/core/common_runtime/gpu/gpu_device.cc:940] Found device 0 with properties:
name: GeForce GTX 1070
major: 6 minor: 1 memoryClockRate (GHz) 1.7845
pciBusID 0000:01:00.0
Total memory: 7.92GiB
Free memory: 7.41GiB
2017-08-09 14:49:22.995965: I tensorflow/core/common_runtime/gpu/gpu_device.cc:961] DMA: 0
2017-08-09 14:49:22.995969: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] 0: Y
2017-08-09 14:49:22.995974: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1030] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 1070, pci bus id: 0000:01:00.0)
此刻,恭喜你成功啦!好好开启你的GPU加速之路吧!加油!到这一步不容易!
参考文档:https://github.com/NVIDIA/DIGITS/issues/8
报错:ImportError:libcudart.so.8.0:无法打开共享对象文件:没有这样的文件或目录
一个非常好用的教程:http://blog.csdn.net/u011197534/article/details/52965413按照这个教程走下去不会有问题,笔者试了不下十次,这个教程亲测有效,请不要忽略细节哦!
一般基于NVIDIA的GPU版本安照教程装好后都会报错,很多朋友都遇到!我遇到过两次一次是libcudnn.so.5的链接问题,这次是ImportError:libcudart.so.8.0:无法打开共享对象文件:没有这样的文件或目录,其实这两次的问题都一样。
先讲讲第一次问题的解决方法是:
sudo cp libcudnn.so libcudnn_copy.so
sudo cp libcudnn.so.5 libcudnn_copy.so.5(这两条可以不要,但是在Ubuntu系统中做任何删除的事情,请注意备份哦!小心为了,笔者曾因为不小心重装过系统n次,血的教训,备份,备份,备份!)
sudo rm libcudnn.so
sudo rm libcudnn.so.5
sudo ln -s libcudnn.so.5.1.10 libcudnn.so.5
sudo ln -s libcudnn.so.5 libcudnn.so
建立软链接后,从新运行无问题:
2017-08-09 14:49:22.663563: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could
speed up CPU computations.
2017-08-09 14:49:22.663578: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could
speed up CPU computations.
2017-08-09 14:49:22.663581: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could
speed up CPU computations.
2017-08-09 14:49:22.663584: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could
speed up CPU computations.
2017-08-09 14:49:22.663586: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could
speed up CPU computations.
2017-08-09 14:49:22.995677: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:893] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so
returning NUMA node zero
2017-08-09 14:49:22.995955: I tensorflow/core/common_runtime/gpu/gpu_device.cc:940] Found device 0 with properties:
name: GeForce GTX 1070
major: 6 minor: 1 memoryClockRate (GHz) 1.7845
pciBusID 0000:01:00.0
Total memory: 7.92GiB
Free memory: 7.41GiB
2017-08-09 14:49:22.995965: I tensorflow/core/common_runtime/gpu/gpu_device.cc:961] DMA: 0
2017-08-09 14:49:22.995969: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] 0: Y
2017-08-09 14:49:22.995974: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1030] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 1070, pci bus id: 0000:01:00.0)
第二次问题的解决方法是:
其实他是配置问题,没有资源共享,因此运行如下指令:
sudo ldconfig /usr/local/cuda/lib(64) 需不需要加64根据自己安装的文件夹查看情况来确定!
但是运行这个命令后可能会报错,报错为:
/sbin/ldconfig.real: /usr/local/cuda/lib64/libcudnn.so.5不是符号连接
因此这样又回到了第一个问题,所以我们只要用第一个问题的解决办法输入命令运行即可消除这个报错。
然后在输入:sudo ldconfig /usr/local/cuda/lib(64)
就不会报错了!
在用你的tensorflow去测试你的GPU版本的程序即可得到:
2017-08-09 14:49:22.663563: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could
speed up CPU computations.
2017-08-09 14:49:22.663578: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could
speed up CPU computations.
2017-08-09 14:49:22.663581: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could
speed up CPU computations.
2017-08-09 14:49:22.663584: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could
speed up C
4000
PU computations.
2017-08-09 14:49:22.663586: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could
speed up CPU computations.
2017-08-09 14:49:22.995677: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:893] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so
returning NUMA node zero
2017-08-09 14:49:22.995955: I tensorflow/core/common_runtime/gpu/gpu_device.cc:940] Found device 0 with properties:
name: GeForce GTX 1070
major: 6 minor: 1 memoryClockRate (GHz) 1.7845
pciBusID 0000:01:00.0
Total memory: 7.92GiB
Free memory: 7.41GiB
2017-08-09 14:49:22.995965: I tensorflow/core/common_runtime/gpu/gpu_device.cc:961] DMA: 0
2017-08-09 14:49:22.995969: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] 0: Y
2017-08-09 14:49:22.995974: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1030] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 1070, pci bus id: 0000:01:00.0)
此刻,恭喜你成功啦!好好开启你的GPU加速之路吧!加油!到这一步不容易!
参考文档:https://github.com/NVIDIA/DIGITS/issues/8
相关文章推荐
- Ubuntu16.04+GTX1070显卡驱动+cuda8.0+cudnn5.1+tensorflow-gpu环境配置
- Ubuntu14.04+CUDA6.5环境下神经网络工具包Deepnet配置
- caffe-ubuntu14.04+64bit环境配置说明(GPU下运行)
- linux(ubuntu14.04)+GPU+cuda6.5+caffe+openCV2.4.9+matlab2014a+python的新手配置
- 神舟z7-kp7s1-GTX1060+ubuntu16.04+cuda8.0+cudnn5.1+GPU配置教程
- ubuntu14.04下的caffe环境配置(ubuntu14.04+Opencv2.4.9+cuda7.0)
- Ubuntu16.04.3LTS+CUDA8.0+cudnn5.1+tensorflow-gpu(1.2)安装配置信息汇总
- ubuntu下配置lamp环境遇到 Unable to locate package错误解决办法
- ubuntu14.04+CUDA7.0+cuDNN-v2+OPENCV3.0 caffe环境配置
- Ubuntu16.04安装cuda8.0,cudnn6.0,并在conda里安tensorflow1.3(与cuda8.0匹配),pycharm的gpu加速环境变量配置
- Ubuntu 17.10 一步安装NVIDIA驱动 + CUDA8.0 在GTX1070笔记本上配置深度学习环境
- Ubuntu14.04 +GTX1070 Ti +cuda 8.0+cudnn5.1+tensorflow 1.2 的安装
- ubuntu14.04 faster-rcnn GPU环境配置(2)
- 基于Ubuntu 14.04和CUDA 7.0为基础的caffe环境配置
- Ubuntu14.04下支持GTX1070 GPU加速Tensorflow环境配置
- Ubuntu16.04 CUDA8.0+caffe+gpu运行环境配置
- ubuntu14.04+cuda7.0环境变量配置
- [置顶] Ubuntu14.04安装cuda8.0+cudnn5.1+Tensorflow1.0.0(GPU)教程
- ubuntu下配置rails环境遇到的错误
- 神经网络环境python2.7+tensorflow(gpu)+keras+cuda toolkit8.0+cudnn5.1+anaconda(ubuntu 16.04desktop64位)