1

I am trying to compile Caffe with OpenBLAS in Ubuntu 16.04. I had downloaded and compile OpenBLAS with make NO_AFFINITY=1 USE_OPENMP=1 OpenBLAS compilation is fine and all its tests are also run

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.

However linking with OpenBLAS libs in Caffe install is giving the following error

Linking CXX executable upgrade_net_proto_binary /opt/OpenBLAS/lib/libopenblas.so: undefined reference to `GOMP_parallel@GOMP_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

asked Feb 23, 2017 at 12:15
1
  • installing libatlas-base-dev and using this instead of BLAS helped in getting over above; still like to know why Commented Feb 23, 2017 at 12:26

1 Answer 1

0

Most likely the reason is that you're linking to the compiled OpenBLAS instead of installing it and linking to the installation. After you run make, you should run make install PREFIX=/path/to/install/OpenBLAS, and then you should link to the installed version.

answered Feb 23, 2017 at 12:39
Sign up to request clarification or add additional context in comments.

1 Comment

I had installed it via make install

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.