编译Caffe时出错

Error while compiling Caffe

本文关键字:出错 Caffe 编译      更新时间:2023-10-16

我正在尝试用ubuntu 16.04中的openblas编译caffe。我已经下载并使用 no_affinity = 1 USE_OPENMP = 1 编译了OpenBlasOpenBlas汇编很好,所有测试均已运行

OpenBLAS build complete. (BLAS CBLAS LAPACK LAPACKE)
  OS               ... Linux             
  Architecture     ... x86_64               
  BINARY           ... 64bit                 
  C compiler       ... GCC  (command line : gcc)
  Fortran compiler ... GFORTRAN  (command line : gfortran)
  Library Name     ... libopenblas_sandybridgep-r0.2.20.dev.a (Multi threaded; Max num-threads is 4)
 Use OpenMP in the multithreading. Because of ignoring OPENBLAS_NUM_THREADS and GOTO_NUM_THREADS flags, 
 you should use OMP_NUM_THREADS environment variable to control the number of threads.

但是,在Caffe安装中与OpenBlas Libs链接给了以下错误

链接cxx可执行文件upgrade_net_proto_binary /Opt/openblas/lib/libopenblas.so:'gomp_parallel@gomp_4.0'的不确定引用 Collect2:错误:LD返回1个退出状态 工具/cmakefiles/ustgrade_net_proto_binary.dir/build.make:129:目标食谱'工具/ustgrade_net_net_proto_binary'失败 制作[2]:* [工具/ustgrade_net_proto_binary]错误1 cmakefiles/makefile2:403:目标'工具/cmakefiles/ustgrade_net_proto_binary.dir/all'失败的配方 制作[1]: * [工具/cmakefiles/ustgrade_net_proto_binary.dir/all]错误2

很可能是因为您要链接到编译的OpenBlas,而不是安装它并链接到安装。运行make后,您应该运行make install PREFIX=/path/to/install/OpenBLAS,然后应链接到已安装的版本。