2018-05-09 Errors in setup & build

Errors

  • nvcc fatal : Unsupported gpu architecture 'compute_20'
仔细查看了一下 Makefile.config 中 CUDA_ARCH 设置未按规定设置:
# CUDA architecture setting: going with all of them.
# For CUDA < 6.0, comment the *_50 through *_61 lines for compatibility.
# For CUDA < 8.0, comment the *_60 and *_61 lines for compatibility.
# For CUDA >= 9.0, comment the *_20 and *_21 lines for compatibility.
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

Solution: 因为我装的是CUDA9.0所以把下面这两行删除就可以了
-gencode arch=compute_20,code=sm_20
-gencode arch=compute_20,code=sm_21 \


  • /usr/bin/ld: warning: libcudart.so.7.5, needed by /usr/local/lib/libopencv_core.so, not found (try using -rpath or -rpath-link)
[HAlmawi](https://github.com/HAlmawi) 
Problem fixed.
Solution: I downloaded OpenCV again, did the cmake (where it recognized cuda 6.5), and then create a soft link between the /usr/local/lib/libopencv_core.so with the newly installed OpenCV's /lib/libopencv_core.so

Solution: sudo ln -s /usr/local/cuda/lib64/libcudart.so.9.1.85 /usr/local/cuda/lib64/libcudart.so.7.5


  • Check failed: error == cudaSuccess (35 vs. 0) CUDA driver version is insufficient for CUDA runtime version
[catmonkeylee](https://github.com/catmonkeylee) commented
When try the deviceQuery sample, I got the same error:
./deviceQuery Starting...
CUDA Device Query (Runtime API) version (CUDART static linking)

cudaGetDeviceCount returned 35
-> CUDA driver version is insufficient for CUDA runtime version
Result = FAIL

[AminBW](https://github.com/AminBW) commented
Hi
I had the same problem in Ubuntu:
cudaSuccess (35 vs. 0) CUDA driver version is insufficient for CUDA runtime version

I solved it easily by installing nvidia-modprobe and cuda-driver using apt-get:
sudo apt-get install nvidia-modprobe
sudo apt-get install cuda-driver

hope it will work for you ;)

Solution: Upgrade CUDA 8.0 to 9.1


  • BatchReindexLayerTest/3.TestGradient, where TypeParam = caffe::GPUDevice<double>
https://blog.csdn.net/balixiaxuetian/article/details/79154013
google了一下,貌似使用CUDA 9.1加双显卡的都有这个错误,暂且不管它,目前不影响使用。使用mnist测试程序是可以运行的。CUDA 9.0则测试全部通过。

Solution: modify caffe/Makefile
https://blog.csdn.net/m0_38082419/article/details/79379066

319 # Debugging
320 ifeq ($(DEBUG), 1)
321         COMMON_FLAGS += -DDEBUG -g -O0
322         NVCCFLAGS += -G
323 else
324         COMMON_FLAGS += -DNDEBUG -O2
325         NVCCFLAGS += -G
326 endif
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • 本文旨在Ubuntu16.04下的caffe环境搭建。 显卡:TESLA K80 一、系统安装 这里与大多系统安装...
    半夏白树阅读 1,782评论 0 0
  • 我从订阅许岑在得到的精品课如何成为有效学习的高手课程到今天听了3遍了,我今天才有了写一点学习笔记的想法,才有了一些...
    小西伯利亚狼阅读 320评论 0 1
  • 小狗钱钱估计是最入门级的理财的书了吧,以小孩的视角,童话般的用简单易懂的方式讲述了看起来十分复杂的理财知识。不可能...
    懒惰的小肚阅读 496评论 2 0
  • 会不会有那么一个时刻,突然很厌倦固定的生活,想要去认识新的朋友,想要去新的地方,想要四处奔奔跑跑,想和...
    屋塔阅读 162评论 0 0
  • 我记得小时候村里有那么几口井,那些井对我来说总是一种很神秘的存在,所有人几乎在一个固定的时间,去一个固定的...
    风向北鸿阅读 354评论 0 0

友情链接更多精彩内容