Discussion:
[OMPI users] Strange OpenMPI errors on building Caffe 1.0
Lane, William
2017-05-04 21:35:58 UTC
Permalink
I know this could possibly be off-topic, but the errors are OpenMPI errors and if anyone could shed light on the nature of these errors I figure it would be this group:

CXX/LD -o .build_release/tools/upgrade_solver_proto_text.bin
g++ .build_release/tools/upgrade_solver_proto_text.o -o .build_release/tools/upgrade_solver_proto_text.bin -pthread -fPIC -DCAFFE_VERSION=1.0.0-rc5 -DNDEBUG -O2 -DUSE_OPENCV -DUSE_LEVELDB -DUSE_LMDB -DCPU_ONLY -DWITH_PYTHON_LAYER -I/hpc/apps/python27/include/python2.7 -I/hpc/apps/python27/externals/numpy/1.9.2/lib/python2.7/site-packages/numpy/core/include -I/usr/local/include -I/hpc/apps/hdf5/1.8.17/include -I.build_release/src -I./src -I./include -I/hpc/apps/atlas/3.10.2/include -Wall -Wno-sign-compare -lcaffe -L/hpc/apps/gflags/lib -L/hpc/apps/python27/lib -L/hpc/apps/python27/lib/python2.7 -L/hpc/apps/atlas/3.10.2/lib -L.build_release/lib -lglog -lgflags -lprotobuf -lboost_system -lboost_filesystem -lm -lhdf5_hl -lhdf5 -lleveldb -lsnappy -llmdb -lopencv_core -lopencv_highgui -lopencv_imgproc -lboost_thread -lstdc++ -lboost_python -lpython2.7 -lcblas -latlas \
-Wl,-rpath,\$ORIGIN/../lib
.build_release/lib/libcaffe.so: undefined reference to `ompi_mpi_cxx_op_intercept'
.build_release/lib/libcaffe.so: undefined reference to `MPI::Datatype::Free()'
.build_release/lib/libcaffe.so: undefined reference to `MPI::Comm::Comm()'
.build_release/lib/libcaffe.so: undefined reference to `MPI::Win::Free()'
collect2: error: ld returned 1 exit status

I've read this may be due to a dependency of Caffe that uses OpenMPI (since I've been told Caffe itself doesn't use OpenMPI).

Would adding -l directives to LIBRARIES line in the Makefile for Caffe that reference all OpenMPI libraries fix this problem?
For example, -l mpi.

Thank you in advance. Hopefully this isn't entirely OT.

William L.


IMPORTANT WARNING: This message is intended for the use of the person or entity to which it is addressed and may contain information that is privileged and confidential, the disclosure of which is governed by applicable law. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this information is strictly prohibited. Thank you for your cooperation.
Prentice Bisbal
2017-05-05 14:40:52 UTC
Permalink
This error should really be posted to the caffe mailing list. This is an
error with caffe. Most likely, you are not specifying the location to
your Open MPI installation properly. And Caffe definitely depends on
OpenMPI you errors:


.build_release/lib/libcaffe.so: undefined reference to
`ompi_mpi_cxx_op_intercept'
.build_release/lib/libcaffe.so: undefined reference to
`MPI::Datatype::Free()'
.build_release/lib/libcaffe.so: undefined reference to `MPI::Comm::Comm()'
.build_release/lib/libcaffe.so: undefined reference to `MPI::Win::Free()'


Are basically saying that the libcaffe shared library (libcaffe.so) was
compiled making references to MPI functions, but now can't find the
libraries that actually provide those functions. This means that when
libcaffe.so was compiled, it could find the OpenMPI headers containing
the function prototypes, but can't the actual libraries.


To fix, your command needs a -L argument specifying the path to where
the OpenMPI libaries are located, followed by -l (lower case L)
arguments for each of the MPI libraries you need. -lmpi is probably one
of them, but most MPI implementations require additional libraries, such
as -lopen-rte, -lopen-pal, etc., for Open MPI


While I think I've answered your questions, it's best you ask this on a
Caffe mailing list, because if the build process could find your MPI
headers but not your MPI libraries, you either configured your build
incorrectly, or something about the Caffe configure/build process is
broken, so you either need to find out how to configure your build
correctly, or report a bug in the Caffe build process.


Prentice
Post by Lane, William
I know this could possibly be off-topic, but the errors are OpenMPI
errors and if anyone could shed light on the nature of these errors I
CXX/LD -o .build_release/tools/upgrade_solver_proto_text.bin
g++ .build_release/tools/upgrade_solver_proto_text.o -o
.build_release/tools/upgrade_solver_proto_text.bin -pthread -fPIC
-DCAFFE_VERSION=1.0.0-rc5 -DNDEBUG -O2 -DUSE_OPENCV -DUSE_LEVELDB
-DUSE_LMDB -DCPU_ONLY -DWITH_PYTHON_LAYER
-I/hpc/apps/python27/include/python2.7
-I/hpc/apps/python27/externals/numpy/1.9.2/lib/python2.7/site-packages/numpy/core/include
-I/usr/local/include -I/hpc/apps/hdf5/1.8.17/include
-I.build_release/src -I./src -I./include
-I/hpc/apps/atlas/3.10.2/include -Wall -Wno-sign-compare -lcaffe
-L/hpc/apps/gflags/lib -L/hpc/apps/python27/lib
-L/hpc/apps/python27/lib/python2.7 -L/hpc/apps/atlas/3.10.2/lib
-L.build_release/lib -lglog -lgflags -lprotobuf -lboost_system
-lboost_filesystem -lm -lhdf5_hl -lhdf5 -lleveldb -lsnappy -llmdb
-lopencv_core -lopencv_highgui -lopencv_imgproc -lboost_thread
-lstdc++ -lboost_python -lpython2.7 -lcblas -latlas \
-Wl,-rpath,\$ORIGIN/../lib
.build_release/lib/libcaffe.so: undefined reference to
`ompi_mpi_cxx_op_intercept'
.build_release/lib/libcaffe.so: undefined reference to
`MPI::Datatype::Free()'
.build_release/lib/libcaffe.so: undefined reference to `MPI::Comm::Comm()'
.build_release/lib/libcaffe.so: undefined reference to `MPI::Win::Free()'
collect2: error: ld returned 1 exit status
I've read this may be due to a dependency of Caffe that uses OpenMPI
(since I've been told Caffe itself doesn't use OpenMPI).
Would adding -l directives to LIBRARIES line in the Makefile for Caffe
that reference all OpenMPI libraries fix this problem?
For example, -l mpi.
Thank you in advance. Hopefully this isn't entirely OT.
William L.
IMPORTANT WARNING: This message is intended for the use of the person
or entity to which it is addressed and may contain information that is
privileged and confidential, the disclosure of which is governed by
applicable law. If the reader of this message is not the intended
recipient, or the employee or agent responsible for delivering it to
the intended recipient, you are hereby notified that any
dissemination, distribution or copying of this information is strictly
prohibited. Thank you for your cooperation.
_______________________________________________
users mailing list
https://rfd.newmexicoconsortium.org/mailman/listinfo/users
Loading...