undefined reference to 'ompi_mpi_cxx_op_intercept'
I am compiling caffe on HPC without root. I believe the problem is due to mkl somehow.
The make all error:
[xxw345@gpu002t caffe]$ make all
CXX/LD -o .build_release/tools/caffe.bin
.build_release/lib/libcaffe.so: undefined reference to ompi_mpi_cxx_op_intercept' .build_release/lib/libcaffe.so: undefined reference toMPI::Datatype::Free()'
.build_release/lib/libcaffe.so: undefined reference to MPI::Comm::Comm()' .build_release/lib/libcaffe.so: undefined reference toMPI::Win::Free()'
collect2: error: ld returned 1 exit status
Detailed linking step:
[xxw345@gpu002t caffe]$ g++ .build_release/tools/caffe.o -o .build_release/tools/caffe.bin -pthread -fPIC -DCAFFE_VERSION=1.0.0-rc3 -DNDEBUG -O2 -DUSE_CUDNN -DUSE_OPENCV -DUSE_LEVELDB -DUSE_LMDB -DUSE_MKL -I/usr/local/python/2.7.5/include/python2.7 -I/usr/local/python/2.7.5/lib/python2.7/site-packages/numpy/core/include -I/usr/local/include -I/usr/include -I/home/xxw345/cuda/include -I.build_release/src -I./src -I./include -I/usr/include -I/usr/local/cuda-7.0/include -I/usr/local/intel/2015/mkl/include -Wall -Wno-sign-compare -lcaffe -I/home/xxw345/.usr/local/lib/ -L/usr/lib -L/usr/local/lib -L/usr/lib -L/home/xxw345/cuda/lib64 -L/usr/local/cuda-7.0/lib64 -L/usr/local/cuda-7.0/lib -L/usr/local/intel/2015/mkl/lib/intel64 -L.build_release/lib -lcudart -lcublas -lcurand -lglog -lgflags -lprotobuf -lboost_system -lboost_filesystem -lm -lhdf5_hl -lhdf5 -lleveldb -lsnappy -llmdb -lopencv_core -lopencv_highgui -lopencv_imgproc -lboost_thread -lstdc++ -lcudnn -lmkl_rt -Wl,-rpath,$ORIGIN/../lib
.build_release/lib/libcaffe.so: undefined reference to ompi_mpi_cxx_op_intercept' .build_release/lib/libcaffe.so: undefined reference toMPI::Datatype::Free()'
.build_release/lib/libcaffe.so: undefined reference to MPI::Comm::Comm()' .build_release/lib/libcaffe.so: undefined reference toMPI::Win::Free()'
collect2: error: ld returned 1 exit status
To my knowledge, caffe doesn't rely on mpi itself. But MKL will probably use mpi, Could anyone explain the relationship of these three: caffe, mkl, mpi. How they are tied together and where caffe used mpi?
Please ask installation questions on the mailing list. If you're having trouble, you might want to try the Caffe Dockerfile to take care of installation for you. (Caffe does not rely on MPI, so this error is odd.)
From https://github.com/BVLC/caffe/blob/master/CONTRIBUTING.md:
Please do not post usage, installation, or modeling questions, or other requests for help to Issues. Use the caffe-users list instead. This helps developers maintain a clear, uncluttered, and efficient view of the state of Caffe.