Problems with MPI and PBGL
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 websitehttp://www.boost.org/doc/libs/1_43_0/doc/html/mpi/getting_started.html#mpi.i...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.
Thanking you, Siva teja.
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
Hi,
Thanks for your reply, it worked.
I have to run distributed_delta_stepping with graphs in CSR fromat. So I
tried with "distributed_shortest_path_test.cpp" located at "<top of boost
source tree>/libs/graph_parallel/test/ ". It reads a random graph in
adjacency list format. But I have to run DIMACS_USA graph in CSR format.
So, I edited the code but it resulted in following errors. I guess I am
facing problems while representing a graph in CSR format..
CODE :
void test_distributed_shortest_paths(int n, double p, int c, int seed)
{
char *graf = "./dimacs_USA_sort_wdup" ; // line no :169
typedef compressed_sparse_row_graph
Graph;
typedef graph_traits<Graph>::vertex_descriptor vertex_descriptor;
typedef graph_traits<Graph>::edge_descriptor edge_descriptor;
typedef graph_traits<Graph>::vertex_iterator vertex_iterator;
typedef graph_traits<Graph>::vertices_size_type vertices_size_type;
typedef property_map
Hi jeremiah, It compiled without errors when I edited line number 267 as, Graph g(edge_array, edge_array + num_arcs, weights, num_nodes); But when I run the command " mpirun -np 2 ./a.out" Following errors occured, **** Testing aborted. **** 1 error detected -------------------------------------------------------------------------- mpirun has exited due to process rank 0 with PID 19096 on node rise-02 exiting without calling "finalize". This may have caused other processes in the application to be terminated by signals sent by mpirun (as reported here). -------------------------------------------------------------------------- What does that mean ??
participants (2)
-
Jeremiah Willcock
-
siva teja