2017-02-23 480 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安装了它 –