【发布时间】:2017-07-13 22:05:34
【问题描述】:
我正在尝试在 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 库链接会出现以下错误
链接 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:目标“工具/upgrade_net_proto_binary”的配方失败 make[2]: * [tools/upgrade_net_proto_binary] 错误 1 CMakeFiles/Makefile2:403:目标“工具/CMakeFiles/upgrade_net_proto_binary.dir/all”的配方失败 make[1]: * [tools/CMakeFiles/upgrade_net_proto_binary.dir/all] 错误2
【问题讨论】:
-
安装 libatlas-base-dev 并使用它代替 BLAS 有助于克服上述问题;还是想知道为什么
标签: c++ caffe ubuntu-16.04 openblas