ubuntu 16.04 安装caffe GPU版本时遇到的问题
2017-12-21 21:07
806 查看
1 gcc版本过高
安装cuda
[/code]
需要强制取消cuda的gcc版本检查
注释掉host_config.h中关于gcc版本的检查,版本大于5则返回错误
通过nvidia-cuda-toolkit安装的,host_config.h在 /usr/include/下,如果通过cuda的run文件安装,也会因为gcc版本检查提示错误,也要修改对应位置的host_config.h
2 usr/local/下没有cuda文件夹
3 Error
when Building GPU docker image for caffe: Unsupported gpu architecture 'compute_60'
In the Makefile.example, try commenting out the *_60 and *_61 lines (for compatibility with CUDA < 8.0).
4 error /usr/include/string.h:652:42: error: ‘memcpy’
vim the Makefile and changing the line
into
For me this was on line
安装cuda
sudo apt-get install nvidia-cuda-toolkit
cuda是7.5.18版,安装完后重启,在终端输入nivdia-smi,有结果则驱动和cuda安装成功。 但是cuda只支持gcc5.0以下,即使后续用cmake编译opencv成功,gpu还是无法调用
[/code]
需要强制取消cuda的gcc版本检查
注释掉host_config.h中关于gcc版本的检查,版本大于5则返回错误
//#if __GNUC__ > 5 //#error -- unsupported GNU version! gcc versions later than 5 are not supported! //#endif /* __GNUC__ > 5 */
通过nvidia-cuda-toolkit安装的,host_config.h在 /usr/include/下,如果通过cuda的run文件安装,也会因为gcc版本检查提示错误,也要修改对应位置的host_config.h
2 usr/local/下没有cuda文件夹
ln -sf /usr/lib/nvidia-cuda-toolkit /usr/local/cuda
3 Error
when Building GPU docker image for caffe: Unsupported gpu architecture 'compute_60'
In the Makefile.example, try commenting out the *_60 and *_61 lines (for compatibility with CUDA < 8.0).
CUDA_ARCH := -gencode arch=compute_20,code=sm_20 \ -gencode arch=compute_20,code=sm_21 \ -gencode arch=compute_30,code=sm_30 \ -gencode arch=compute_35,code=sm_35 \ -gencode arch=compute_50,code=sm_50 \ -gencode arch=compute_52,code=sm_52 \ #-gencode arch=compute_60,code=sm_60 \ #-gencode arch=compute_61,code=sm_61 \ #-gencode arch=compute_61,code=compute_61
4 error /usr/include/string.h:652:42: error: ‘memcpy’
was not declared in this scope while building caffe
vim the Makefile and changing the lineNVCCFLAGS += -ccbin=$(CXX) -Xcompiler -fPIC $(COMMON_FLAGS)[/code]
into
NVCCFLAGS += -D_FORCE_INLINES -ccbin=$(CXX) -Xcompiler -fPIC $(COMMON_FLAGS)[/code]
For me this was on line
415
相关文章推荐
- [置顶] Ubuntu16.04下安装Caffe-GPU版本的相关软件
- Ubuntu16.04 安装配置GPU版本Caffe
- Ubuntu 16.04安装使用--Ubuntu16.04下基于Docker的Caffe-GPU版本环境搭建总结
- ubuntu16.04 安装CUDA 8.0 和 cuDNN 5.1 /cudnn6.0,可适用于gpu版本的(tensorflow,caffe,mxnet)
- ubuntu16.04下安装CUDA cuDNN及tensorflow-gpu版本及caffe-gpu过程
- ubuntu16.04 下安装加入opencv_contribute包的GPU版本的OpenCV3.2(CUDA支持)步骤与问题解决
- Ubuntu16.04安装caffe中遇到的问题总结
- Ubuntu16.04 安装server版本遇到的一些问题
- ubuntu 16.04 安装Caffe GPU版本
- ubuntu16.04 CAFFE 安装遇到的问题
- ubuntu 16.04 cuda 8.0 caffe 安装 及遇到的问题。
- Ubuntu16.04安装配置GPU版本Caffe经验总结
- ubuntu16.04安装caffe遇到一些问题
- Ubuntu 16.04安装配置TensorFlow GPU版本
- ubuntu-16.04安装gcc-linux-gcc,交叉编译会遇到的问题心得
- ubuntu16.04下安装MySQL-pthon,遇到:EnvironmentError: mysql_config not found问题
- Ubuntu16.04安装Caffe步骤CPU(无GPU无Cuda)
- 在Ubuntu16.04下安装theano和keras遇到的一些问题
- caffe安装吐血总结 opencv的问题,ubuntu版本问题