BGL - parallel/distributed

Does anybody know how to use the functions in graph/parallel and graph/distributed? I couldn't find any references in documentation to parallel/distributed processing in graph lib, though there is obviously such functionality. Is it the same implementation as in Parallel BGL project (http://www.osl.iu.edu/research/pbgl/)? I must say that the documentation of graph library desperately needs an update.

For boost 1.40 you can find it here:
http://www.boost.org/doc/libs/1_40_0/libs/graph_parallel/doc/html/index.html
I am not sure what are the differences with 1.41.
On Fri, Nov 6, 2009 at 2:17 PM, Ondrej Sluciak
Does anybody know how to use the functions in graph/parallel and graph/distributed? I couldn't find any references in documentation to parallel/distributed processing in graph lib, though there is obviously such functionality. Is it the same implementation as in Parallel BGL project (http://www.osl.iu.edu/research/pbgl/)? I must say that the documentation of graph library desperately needs an update. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- Mathieu

Wow, is there a link on the web site to this subpage which I didn't see? Thank you. Mathieu Malaterre wrote:
For boost 1.40 you can find it here:
http://www.boost.org/doc/libs/1_40_0/libs/graph_parallel/doc/html/index.html
I am not sure what are the differences with 1.41.
On Fri, Nov 6, 2009 at 2:17 PM, Ondrej Sluciak
wrote: Does anybody know how to use the functions in graph/parallel and graph/distributed? I couldn't find any references in documentation to parallel/distributed processing in graph lib, though there is obviously such functionality. Is it the same implementation as in Parallel BGL project (http://www.osl.iu.edu/research/pbgl/)? I must say that the documentation of graph library desperately needs an update. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

Ok, I tried the simplest possible example, but just didn't figure out
where the problem is. I am on windows, mpich2 installed, all boost libs
correctly compiled with mpi, but if I do something like
#include
For boost 1.40 you can find it here:
http://www.boost.org/doc/libs/1_40_0/libs/graph_parallel/doc/html/index.html
I am not sure what are the differences with 1.41.
On Fri, Nov 6, 2009 at 2:17 PM, Ondrej Sluciak
wrote: Does anybody know how to use the functions in graph/parallel and graph/distributed? I couldn't find any references in documentation to parallel/distributed processing in graph lib, though there is obviously such functionality. Is it the same implementation as in Parallel BGL project (http://www.osl.iu.edu/research/pbgl/)? I must say that the documentation of graph library desperately needs an update. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- Dipl.-Ing. Ondrej Sluciak Room CG-04-06 Vienna University of Technology, Austria Institute of Communications and Radio-Frequency Engineering Gusshausstrasse 25-29/389 http://www.nt.tuwien.ac.at

On Mon, 9 Nov 2009, Ondrej Sluciak wrote:
Ok, I tried the simplest possible example, but just didn't figure out where the problem is. I am on windows, mpich2 installed, all boost libs correctly compiled with mpi, but if I do something like
#include
#include #include #include void main(){ using namespace boost; typedef adjacency_list
, directedS> Graph; Graph g(4);
};
I always get linking problems like: Error 7 error LNK2019: unresolved external symbol "void __cdecl boost::graph::distributed::synchronize(class boost::graph::distributed::mpi_process_group const &)" (?synchronize@distributed@graph@boost@@YAXABVmpi_process_group@123@@Z) referenced in function "public: __thiscall boost::adjacency_list
,struct boost::directedS,struct boost::no_property,struct boost::no_property,struct boost::no_property,struct boost::listS>::~adjacency_list ,struct boost::directedS,struct boost::no_property,struct boost::no_property,struct boost::no_property,struct boost::listS>(void)" (??1?$adjacency_list@UvecS@boost@@U?$distributedS@Vmpi_process_group@distributed@graph@boost@@UvecS@4@UdefaultS@4@@2@UdirectedS@2@Uno_property@2@U52@U52@UlistS@2@@boost@@QAE@XZ) boostTest2.obj I think I have included all the necessary libs (including mpi.lib from mpich directory), so I still don't understand where is the problem. Does anyone tried distributed graph class?
Are you also including the graph_parallel library? Boost.Graph.Parallel is not header-only, unlike almost all of the sequential Boost.Graph library. -- Jeremiah Willcock

You are right, that was what I was missing. Thank you. Anyway, no I can compile it and run it, but the program always exits at the line Graph g(4) with exit code 0x1. It quits in the inizialization of mpi_process_group::impl::impl(std::size_t num_headers, std::size_t buffer_sz, communicator_type parent_comm) : comm(parent_comm, boost::mpi::comm_duplicate), oob_reply_comm(parent_comm, boost::mpi::comm_duplicate), allocated_tags(boost::mpi::environment::max_tag()) exactly in libs/mpi/src/communicator.cpp communicator::communicator(const ...) on the line BOOST_MPI_CHECK_RESULT(MPI_Comm_dup, (comm, &newcomm)); It doesn't crash or anything, just exits the code "normally" with exit code 1. Do you have any idea what is wrong? Jeremiah Willcock wrote:
On Mon, 9 Nov 2009, Ondrej Sluciak wrote:
Ok, I tried the simplest possible example, but just didn't figure out where the problem is. I am on windows, mpich2 installed, all boost libs correctly compiled with mpi, but if I do something like
#include
#include #include #include void main(){ using namespace boost; typedef adjacency_list
, directedS> Graph; Graph g(4);
};
I always get linking problems like: Error 7 error LNK2019: unresolved external symbol "void __cdecl boost::graph::distributed::synchronize(class boost::graph::distributed::mpi_process_group const &)" (?synchronize@distributed@graph@boost@@YAXABVmpi_process_group@123@@Z) referenced in function "public: __thiscall boost::adjacency_list
,struct boost::directedS,struct boost::no_property,struct boost::no_property,struct boost::no_property,struct boost::listS>::~adjacency_list ,struct boost::directedS,struct boost::no_property,struct boost::no_property,struct boost::no_property,struct boost::listS>(void)" (??1?$adjacency_list@UvecS@boost@@U?$distributedS@Vmpi_process_group@distributed@graph@boost@@UvecS@4@UdefaultS@4@@2@UdirectedS@2@Uno_property@2@U52@U52@UlistS@2@@boost@@QAE@XZ) boostTest2.obj I think I have included all the necessary libs (including mpi.lib from mpich directory), so I still don't understand where is the problem. Does anyone tried distributed graph class?
Are you also including the graph_parallel library? Boost.Graph.Parallel is not header-only, unlike almost all of the sequential Boost.Graph library.
-- Jeremiah Willcock _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- Dipl.-Ing. Ondrej Sluciak Room CG-04-06 Vienna University of Technology, Austria Institute of Communications and Radio-Frequency Engineering Gusshausstrasse 25-29/389 http://www.nt.tuwien.ac.at

To be even more precise, it exits the code in function MPI_Comm_dup of mpi library. On linux I guess you have to have the mpi running, but I don't know how it is on windows with mpich2. Jeremiah Willcock wrote:
On Mon, 9 Nov 2009, Ondrej Sluciak wrote:
Ok, I tried the simplest possible example, but just didn't figure out where the problem is. I am on windows, mpich2 installed, all boost libs correctly compiled with mpi, but if I do something like
#include
#include #include #include void main(){ using namespace boost; typedef adjacency_list
, directedS> Graph; Graph g(4);
};
I always get linking problems like: Error 7 error LNK2019: unresolved external symbol "void __cdecl boost::graph::distributed::synchronize(class boost::graph::distributed::mpi_process_group const &)" (?synchronize@distributed@graph@boost@@YAXABVmpi_process_group@123@@Z) referenced in function "public: __thiscall boost::adjacency_list
,struct boost::directedS,struct boost::no_property,struct boost::no_property,struct boost::no_property,struct boost::listS>::~adjacency_list ,struct boost::directedS,struct boost::no_property,struct boost::no_property,struct boost::no_property,struct boost::listS>(void)" (??1?$adjacency_list@UvecS@boost@@U?$distributedS@Vmpi_process_group@distributed@graph@boost@@UvecS@4@UdefaultS@4@@2@UdirectedS@2@Uno_property@2@U52@U52@UlistS@2@@boost@@QAE@XZ) boostTest2.obj I think I have included all the necessary libs (including mpi.lib from mpich directory), so I still don't understand where is the problem. Does anyone tried distributed graph class?
Are you also including the graph_parallel library? Boost.Graph.Parallel is not header-only, unlike almost all of the sequential Boost.Graph library.
-- Jeremiah Willcock _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- Dipl.-Ing. Ondrej Sluciak Room CG-04-06 Vienna University of Technology, Austria Institute of Communications and Radio-Frequency Engineering Gusshausstrasse 25-29/389 http://www.nt.tuwien.ac.at

To be even more precise, it exits the code in function MPI_Comm_dup of mpi library. On linux I guess you have to have the mpi running, but I don't know how it is on windows with mpich2.
You never initialized the Boost.MPI environment. See the tests, but you're looking for something like: mpi::environment env(argc, argv); This basically functions like MPI_Init() plus some Boost.MPI initialization. Comm_dup fails because the communicator you're trying to dup doesn't exist. -Nick

Thank you very much. I thought that the constructor of graph would also take care about initializing the mpi (if it has distributedS selector). Some working example in the documentation of graph_parallel would help a lot for sure. Now it seems that everything works for me. Thank you once more. Nick Edmonds wrote:
To be even more precise, it exits the code in function MPI_Comm_dup of mpi library. On linux I guess you have to have the mpi running, but I don't know how it is on windows with mpich2.
You never initialized the Boost.MPI environment. See the tests, but you're looking for something like:
mpi::environment env(argc, argv);
This basically functions like MPI_Init() plus some Boost.MPI initialization. Comm_dup fails because the communicator you're trying to dup doesn't exist.
-Nick
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- Dipl.-Ing. Ondrej Sluciak Room CG-04-06 Vienna University of Technology, Austria Institute of Communications and Radio-Frequency Engineering Gusshausstrasse 25-29/389 http://www.nt.tuwien.ac.at
participants (4)
-
Jeremiah Willcock
-
Mathieu Malaterre
-
Nick Edmonds
-
Ondrej Sluciak