[英]Error while compiling Caffe
我正在嘗試在Ubuntu 16.04中使用OpenBLAS編譯Caffe。 我已經下載並編譯了帶有make NO_AFFINITY = 1 USE_OPENMP = 1的 OpenBLAS,OpenBLAS編譯很好,它的所有測試也都在運行
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/upgrade_net_proto_binary.dir/build.make:129:配方目標'tools / upgrade_net_proto_binary'失敗make [2]: * [tools / upgrade_net_proto_binary]錯誤1 CMakeFiles / Makefile2:403:目標'tools / CMakeFiles / upgrade_net_proto_binary.dir / all'的配方失敗make [1]:* [tools / CMakeFiles / upgrade_net_proto_binary.dir / all]錯誤2
原因很可能是您要鏈接到已編譯的OpenBLAS,而不是安裝它並鏈接到安裝。 運行make
,應運行make install PREFIX=/path/to/install/OpenBLAS
,然后應鏈接到已安裝的版本。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.