Background
Hello everybody,
I am trying to use Boost :: MPI, for now I am just trying to run a simple first example from tutorial . I am having trouble creating / launching it.
I installed boost using apt-get and set boost_mpi and boost_serialization (1.48.0) using the synaptic package manager. I installed MPICH2 using apt-get.
Although OpenMPI has never been explicitly installed, it seems to be on my system, I assume it is a dependency of Boost :: MPI, but it seems that MPICH2 and OpenMPI are attacking each other.
Information
If i use
g++ test.cpp -I/usr/include/mpich2 -L/usr/lib -lboost_mpi -lboost_serialization
then do with
mpiexec -n 2 ./a.out
It throws up a bunch of errors that appear to be coming from OpenMPI. If I try to build by contacting the OpenMPI library using
g++ test.cpp -L/usr/lib -lboost_mpi -lboost_serialization -lmpi -I/usr/include/openmpi
:
/usr/bin/ld: /tmp/ccJ5ezv7.o: undefined reference to symbol 'ompi_op_set_cxx_callback'
/usr/bin/ld: note: 'ompi_op_set_cxx_callback' is defined in DSO /usr/lib/libmpi.so.0 so try adding it to the linker command line
/usr/lib/libmpi.so.0: could not read symbols: Invalid operation
mpic++
mpic++ test.cpp -lboost_mpi -lboost_serialization
/usr/lib/libmpich.so: undefined reference to `MPL_trid'
libmpi i.e.
mpic++ test.cpp -lboost_mpi -lboost_serialization -lmpi
, mpiexec :
Fatal error in PMPI_Errhandler_set: Invalid communicator, error stack:
PMPI_Errhandler_set(118): MPI_Errhandler_set(comm=0x370500, errh=0x370be0) failed
PMPI_Errhandler_set(70).: Invalid communicator
, - OpenMPI MPICH2 , . - , OpenMPI MPICH2, mpiexec?