编译gpu版caffe遇到的问题
2017-07-09 22:43
573 查看
1、.build_release/lib/libcaffe.so:对‘gflags::ParseCommandLineFlags(int*, char***, bool)’未定义的引用
解决:
这里继续安装gflags: https://github.com/schuhschuh/gflags/archive/master.zip下载。解压
解决:原因是,Makefile中采用了CUDA的compute capability 2.0和2.1,这是两种计算能力。安装的CUDA版本是8.0,但 从CUDA 8.0开始compute capability 2.0和2.1被弃用了,所以可以将Makefile.config中的-gencode arch=compute_20,code=sm_20 和-gencode arch=compute_20,code=sm_21这两行删除即可。
3、/usr/bin/ld: 找不到 -lopenblas
解决:
首先查看是否安装libopenblas-base 和libopenblas-dev,如果未安装,则命令sudo apt-get install libopenblas-base libopenblas-dev后再次编译,仍有错误查看以下解决方式。
I faced the same problem. Even adding library directory "/opt/OpenBLAS/lib/" to ldconfig cache didn't help (as my libopenblas.so is at "/opt/OpenBLAS/lib/libopenblas.so").
Using cmake helped me. Try this from caffe root directory:
If you need to use make, add the symlink of libopenblas.so to /usr/lib. I did the following:
解决:
这里继续安装gflags: https://github.com/schuhschuh/gflags/archive/master.zip下载。解压
cd gflags-master mkdir build && cd build export CXXFLAGS="-fPIC" && cmake .. && make VERBOSE=1 make sudo make install2、nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
解决:原因是,Makefile中采用了CUDA的compute capability 2.0和2.1,这是两种计算能力。安装的CUDA版本是8.0,但 从CUDA 8.0开始compute capability 2.0和2.1被弃用了,所以可以将Makefile.config中的-gencode arch=compute_20,code=sm_20 和-gencode arch=compute_20,code=sm_21这两行删除即可。
3、/usr/bin/ld: 找不到 -lopenblas
解决:
首先查看是否安装libopenblas-base 和libopenblas-dev,如果未安装,则命令sudo apt-get install libopenblas-base libopenblas-dev后再次编译,仍有错误查看以下解决方式。
I faced the same problem. Even adding library directory "/opt/OpenBLAS/lib/" to ldconfig cache didn't help (as my libopenblas.so is at "/opt/OpenBLAS/lib/libopenblas.so").
Using cmake helped me. Try this from caffe root directory:
mkdir buildcd buildcmake -DBLAS=open ..make allmake runtest
If you need to use make, add the symlink of libopenblas.so to /usr/lib. I did the following:
ln -s /opt/OpenBLAS/lib/libopenblas.so /usr/lib/libopenblas.so
解决网址:https://stackoverflow.com/questions/32353509/usr-bin-ld-cannot-find-lopenblas-error-in-caffe-compilation
4、test_data_transformer.cpp(.text._ZN5caffe11MakeTempDirEPSs[_ZN5caffe11MakeTempDirEPSs]+0x4a):‘boost::filesystem::detail::temp_directory_path(boost::system::error_code*)’未定义的引用。
解决:按照赵永科《21天实战caffe》第38页安装Boost,如果安装完成后还是出现此类信息,查看caffe目录下Makefile文件里LIBRARIES内容的正确与否,楼主在调试前面的bug时错误把这里改动了,不能缺少boost-system和boost-filesystem。如下:
原来的:#LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_hl hdf5 现在的:LIBRARIES += glog gflags protobuf leveldb snappy lmdb boost_system boost_filesystem hdf5_hl hdf5 m opencv_core opencv_highgui opencv_imgproc opencv_imgcodecs openblas
5、.build_release/tools/caffe: error while loading shared libraries: libopenblas.so.0: cannot open shared object file: No such file or directory make: *** [runtest] 错误 127
解决:sudo apt-get install libopenblas-dev
相关文章推荐
- 在编译caffe中遇到问题集锦
- [链接] Linux下常见的~/.bashrc、/etc/profile、/etc/ld.so.config小科普以及caffe编译遇到的相关问题解决
- caffe编译中遇到问题,推荐访问的链接
- Caffe编译遇到protocbuf的问题
- Caffe-GPU编译问题:nvcc fatal : Unsupported gpu architecture 'compute_20'
- ubuntu 16.04 安装caffe GPU版本时遇到的问题
- Ubuntu16.04编译Caffe遇到的问题及解决办法
- qt编译caffe遇到的opencv版本问题
- caffe 问题集锦之使用cmake编译多GPU时,更改USE_NCCL=1无效
- caffe编译遇到“libunwind.so.8: undefined reference”问题
- Linux下常见的~/.bashrc、/etc/profile、/etc/ld.so.config小科普以及caffe编译遇到的相关问题解决
- caffe 问题集锦之使用cmake编译多GPU时,更改USE_NCCL=1无效
- 多GPU环境下使用caffe遇到的问题
- 集群上编译caffe时遇到的一些问题
- Caffe训练mnist数据遇到的问题(GPU版)
- 安装、编译、运行caffe遇到的一些问题
- CPU配置Caffe训练SSD遇到Cannot use GPU in CPU-only Caffe: check mode问题解决办法
- [置顶] caffe编译遇到的问题(持续更新)
- 手把手教~Windows10+Anaconda2(64 bit)+VS2013+无GPU+Caffe配置与遇到的问题及解决
- 编译caffe遇到的问题汇总