Boost logo

Boost Users :

Subject: Re: [Boost-users] Problems with MPI and PBGL
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2013-05-10 11:18:15


On Fri, 10 May 2013, siva teja wrote:

>
> Hi friends,
>
>
>  
>   I am working on delta stepping algorithm. Recently I came across "Parallel Boost Library"  but when I tried to call distributed
> delta-stepping, from /libs/graph_parallel/test as, "mpiCC -I/usr/lib/openmpi/include/ distributed_shortest_paths_test.cpp ", it is reporting,
>
> distributed_shortest_paths_test.cpp:(.text+0x5892): undefined reference to `boost::mpi::communicator::communicator()'
> distributed_shortest_paths_test.cpp:(.text+0x58a8): undefined reference to
> `boost::graph::distributed::mpi_process_group::mpi_process_group(boost::mpi::communicator)'
> distributed_shortest_paths_test.cpp:(.text+0x5a00): undefined reference to
> `boost::graph::distributed::mpi_process_group::~mpi_process_group()'
> distributed_shortest_paths_test.cpp:(.text+0x5a17): undefined reference to
> `boost::graph::distributed::mpi_process_group::~mpi_process_group()'
> /tmp/ccP7trmD.o: In function `test_main(int, char**)':
> distributed_shortest_paths_test.cpp:(.text+0x5ca7): undefined reference to `boost::mpi::environment::environment(int&, char**&, bool)'
> distributed_shortest_paths_test.cpp:(.text+0x5d60): undefined reference to `boost::mpi::environment::~environment()'
> distributed_shortest_paths_test.cpp:(.text+0x5d7c): undefined reference to `boost::mpi::environment::~environment()'
> /tmp/ccP7trmD.o: In function `__static_initialization_and_destruction_0(int, int)':
> distributed_shortest_paths_test.cpp:(.text+0x5e84): undefined reference to `boost::system::generic_category()'
> distributed_shortest_paths_test.cpp:(.text+0x5e90): undefined reference to `boost::system::generic_category()'
> distributed_shortest_paths_test.cpp:(.text+0x5e9c): undefined reference to `boost::system::system_category()
> ...
> ...
> ..
> ..
>
> I am not able to compile any of the parallel graph examples. I tested MPI with some mpi examples from boost website and they worked fine. I
> guess the problem is with linking MPI. I would be grateful if you could help me out of this situation.

You need to add -lboost_graph_parallel -lboost_mpi -lboost_system to your
link command, plus a -L option for wherever your Boost libraries are (<top
of Boost source tree>/stage/lib is one location if you haven't installed
the files).

-- Jeremiah Willcock


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net