Hello all,
I'm working on an HPC. And on that HPC an old version of Boost was installed and that boost library doesn't have Boost.MPI. I requested from Admins to install it on the HPC. But they requested from me to install it on my home directory. So i installed both boost and boost.mpi on my home directory. Boost library seems to work correctly. But when I try to run the following code with the command below I got errors.
Test code:
#include <boost/mpi/environment.hpp>
#include <boost/mpi/communicator.hpp>
#include <iostream>
namespace mpi = boost::mpi;
int main(int argc, char* argv[])
{
mpi::environment env(argc, argv);
mpi::communicator world;
std::cout << "I am process " << world.rank() << " of " << world.size()
<< "." << std::endl;
return 0;
}
Build command:
mpiCC -I/home1/username/boost/include
-I/usr/mpi/gcc/openmpi-1.2.8/include/
-L/home1/username/boost/lib
-L/usr/mpi/gcc/openmpi-1.2.8/lib64/openmpi
-lboost_mpi-gcc-mt-1_35 testboostmpi2.cpp
I got the following errors screaming:
testboostmpi2.o: In function `main':
testboostmpi2.cpp:(.text+0x59): undefined reference to
`boost::mpi::environment::environment(int&, char**&, bool)'
testboostmpi2.cpp:(.text+0x63): undefined reference to
`boost::mpi::communicator::communicator()'
testboostmpi2.cpp:(.text+0x86): undefined reference to
`boost::mpi::environment::~environment()'
testboostmpi2.cpp:(.text+0xb9): undefined reference to
`boost::mpi::environment::~environment()'
I'd be very grateful, if any of you can help.