Philipp Kraus
2009-06-09 23:17:23 UTC
Hi,
I'm new at MPI. I try to link my C++ programm against the MPI libs, but
I get this errors:
--------
/tmp/ccHs86fy.o: In function `main':
mpi-test.cpp:(.text+0x76): undefined reference to
`boost::mpi::environment::environment(int&, char**&, bool)'
mpi-test.cpp:(.text+0x7f): undefined reference to
`boost::mpi::communicator::communicator()'
mpi-test.cpp:(.text+0x88): undefined reference to
`boost::mpi::communicator::size() const'
mpi-test.cpp:(.text+0x94): undefined reference to
`boost::mpi::communicator::rank() const'
mpi-test.cpp:(.text+0x124): undefined reference to
`boost::mpi::environment::~environment()'
mpi-test.cpp:(.text+0x149): undefined reference to
`boost::mpi::environment::~environment()'
collect2: ld returned 1 exit status
--------
I run "mpic++ -o mpi-test mpi-test.cpp" with the first Boost example on
http://www.boost.org/doc/libs/1_39_0/doc/html/mpi/tutorial.html#mpi.c_mapping
The
C example on
http://www.boost.org/doc/libs/1_39_0/doc/html/mpi/getting_started.html#mpi.installation
runs perfectly. I taken the installation tutorial on this page with
changing the boost prefix to /opt/library/boost/1.39.0 on my Gentoo.
I added in my /etc/profile this lines to set the dirs (for Boost and GSL):
--------
GSL="/opt/library/gsl/1.9.0"
BOOST="/opt/library/boost/1.39.0"
BOOSTINCLUDE="boost-1_39"
export LD_LIBRARY_PATH=$BOOST/lib:$GSL/lib:$LD_LIBRARY_PATH
export CPATH=$BOOST/include/$BOOSTINCLUDE:$GSL/include:$CPATH
--------
I can compile the Boost example on
http://www.boost.org/doc/libs/1_39_0/more/getting_started/unix-variants.html#link-your-program-to-a-boost-library
to an executable without errors. But only the MPI code runs into
errors. I have tested the same config on another cluster with ubuntu
and I have ran into these problems also.
Can anyone help me to correct my config?
Thanks
Phil
I'm new at MPI. I try to link my C++ programm against the MPI libs, but
I get this errors:
--------
/tmp/ccHs86fy.o: In function `main':
mpi-test.cpp:(.text+0x76): undefined reference to
`boost::mpi::environment::environment(int&, char**&, bool)'
mpi-test.cpp:(.text+0x7f): undefined reference to
`boost::mpi::communicator::communicator()'
mpi-test.cpp:(.text+0x88): undefined reference to
`boost::mpi::communicator::size() const'
mpi-test.cpp:(.text+0x94): undefined reference to
`boost::mpi::communicator::rank() const'
mpi-test.cpp:(.text+0x124): undefined reference to
`boost::mpi::environment::~environment()'
mpi-test.cpp:(.text+0x149): undefined reference to
`boost::mpi::environment::~environment()'
collect2: ld returned 1 exit status
--------
I run "mpic++ -o mpi-test mpi-test.cpp" with the first Boost example on
http://www.boost.org/doc/libs/1_39_0/doc/html/mpi/tutorial.html#mpi.c_mapping
The
C example on
http://www.boost.org/doc/libs/1_39_0/doc/html/mpi/getting_started.html#mpi.installation
runs perfectly. I taken the installation tutorial on this page with
changing the boost prefix to /opt/library/boost/1.39.0 on my Gentoo.
I added in my /etc/profile this lines to set the dirs (for Boost and GSL):
--------
GSL="/opt/library/gsl/1.9.0"
BOOST="/opt/library/boost/1.39.0"
BOOSTINCLUDE="boost-1_39"
export LD_LIBRARY_PATH=$BOOST/lib:$GSL/lib:$LD_LIBRARY_PATH
export CPATH=$BOOST/include/$BOOSTINCLUDE:$GSL/include:$CPATH
--------
I can compile the Boost example on
http://www.boost.org/doc/libs/1_39_0/more/getting_started/unix-variants.html#link-your-program-to-a-boost-library
to an executable without errors. But only the MPI code runs into
errors. I have tested the same config on another cluster with ubuntu
and I have ran into these problems also.
Can anyone help me to correct my config?
Thanks
Phil