2017-02-23 474 views
0

我想在Ubuntu 16.04中用OpenBLAS編譯Caffe。我已經下載並編譯化妝NO_AFFINITY = 1個USE_OPENMP OpenBLAS = 1個 OpenBLAS編譯罰款和它的所有測試也運行編譯Caffe時出錯

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. 

與OpenBLAS庫但連接在來自Caffe安裝是給下面的錯誤

Linking CXX executable upgrade_net_proto_binary /opt/OpenBLAS/lib/libopenblas.so: undefined reference to `[email protected]_4.0' collect2: error: ld returned 1 exit status tools/CMakeFiles/upgrade_net_proto_binary.dir/build.make:129: recipe for target 'tools/upgrade_net_proto_binary' failed make[2]: * [tools/upgrade_net_proto_binary] Error 1 CMakeFiles/Makefile2:403: recipe for target 'tools/CMakeFiles/upgrade_net_proto_binary.dir/all' failed make[1]: * [tools/CMakeFiles/upgrade_net_proto_binary.dir/all] Error 2

+0

安裝libatlas-base-dev並使用此代替BLAS幫助獲得以上;仍然想知道爲什麼 –

回答

0

最有可能的原因是你鏈接到編譯的OpenBLAS而不是安裝它並鏈接到安裝。運行make後,您應該運行make install PREFIX=/path/to/install/OpenBLAS,然後您應該鏈接到已安裝的版本。

+0

我通過make install安裝了它 –