[PBGL] compilation of example/dijkstra_shortest_paths.cpp failed

Dear all, I tried to compile http://www.boost.org/doc/libs/1_60_0/libs/graph_parallel/example/dijkstra_sh ortest_paths.cpp, an example code of Parallel Boost Graph, resulting in faulure; example/breadth_first_search.cpp has no problem. My environment is: * GCC 4.9.2 * OpenMPI 1.10.2 * boost 1.60.0 * OS: Debian jessie The error, related to template, is long; the summary is: $ mpicxx -std=c++11 -lboost_mpi -lboost_serialization -lboost_system - lboost_graph_parallel dijkstra_shortest_paths.cpp In file included from boost/graph/dijkstra_shortest_paths.hpp:25:0, from dijkstra_shortest_paths.cpp:19: boost/pending/relaxed_heap.hpp: In instantiation of ‘bool boost::relaxed_heap... boost/graph/distributed/crauser_et_al_shortest_paths.hpp:377:54: required from ... boost/graph/distributed/detail/remote_update_set.hpp:148:7: required from ... boost/graph/distributed/crauser_et_al_shortest_paths.hpp:264:37: required from ... boost/graph/breadth_first_search.hpp:76:7: required from ... boost/graph/breadth_first_search.hpp:124:69: required from ... boost/graph/breadth_first_search.hpp:135:64: [ skipping 4 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ] boost/graph/distributed/dijkstra_shortest_paths.hpp:146:50: required from ... boost/graph/distributed/dijkstra_shortest_paths.hpp:200:45: required from ... boost/graph/dijkstra_shortest_paths.hpp:573:16: required from ... boost/graph/dijkstra_shortest_paths.hpp:595:35: required from ... boost/graph/dijkstra_shortest_paths.hpp:614:14: required from ... dijkstra_shortest_paths.cpp:74:64: required from here boost/pending/relaxed_heap.hpp:194:70: error: cannot convert ‘const value_type {aka const boost::optional<boost::detail::parallel::global_descriptor<long unsigned int> >}’ to ‘bool’ in return bool contains(const value_type& x) const { return groups[get(id, x)]; } ^ "-ftemplate-backtrace-limit=0" flag did not work. How to fix this? -- Eisuke Kawashima

On Apr 24, 2016, at 2:57 AM, Eisuke Kawashima <e.kawaschima@gmail.com> wrote:
I tried to compile http://www.boost.org/doc/libs/1_60_0/libs/graph_parallel/example/dijkstra_sh ortest_paths.cpp,
This works for me with the head of the develop branch. gcc.compile.c++ ../bin.v2/libs/graph_parallel/example/gcc-4.9.1/debug/threading-multi/dijkstra_shortest_paths.o "g++" -ftemplate-depth-128 -std=c++11 -O0 -fno-inline -Wall -g -fPIC -m64 -DBOOST_ALL_NO_LIB=1 -DBOOST_SYSTEM_DYN_LINK=1 -I".." -I"mpi/openmpi/1.6.4-gcc-4.9.1-RHEL6/include" -c -o "../bin.v2/libs/graph_parallel/example/gcc-4.9.1/debug/threading-multi/dijkstra_shortest_paths.o" "../libs/graph_parallel/example/dijkstra_shortest_paths.cpp” Can you send just the compile line, rather than the link line, for this one target? — Noel
My environment is: * GCC 4.9.2 * OpenMPI 1.10.2 * boost 1.60.0 * OS: Debian jessie
The error, related to template, is long; the summary is: $ mpicxx -std=c++11 -lboost_mpi -lboost_serialization -lboost_system - lboost_graph_parallel dijkstra_shortest_paths.cpp In file included from boost/graph/dijkstra_shortest_paths.hpp:25:0, from dijkstra_shortest_paths.cpp:19: boost/pending/relaxed_heap.hpp: In instantiation of ‘bool boost::relaxed_heap... boost/graph/distributed/crauser_et_al_shortest_paths.hpp:377:54: required from ... boost/graph/distributed/detail/remote_update_set.hpp:148:7: required from ... boost/graph/distributed/crauser_et_al_shortest_paths.hpp:264:37: required from ... boost/graph/breadth_first_search.hpp:76:7: required from ... boost/graph/breadth_first_search.hpp:124:69: required from ... boost/graph/breadth_first_search.hpp:135:64: [ skipping 4 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ] boost/graph/distributed/dijkstra_shortest_paths.hpp:146:50: required from ... boost/graph/distributed/dijkstra_shortest_paths.hpp:200:45: required from ... boost/graph/dijkstra_shortest_paths.hpp:573:16: required from ... boost/graph/dijkstra_shortest_paths.hpp:595:35: required from ... boost/graph/dijkstra_shortest_paths.hpp:614:14: required from ... dijkstra_shortest_paths.cpp:74:64: required from here boost/pending/relaxed_heap.hpp:194:70: error: cannot convert ‘const value_type {aka const boost::optional<boost::detail::parallel::global_descriptor<long unsigned int> >}’ to ‘bool’ in return bool contains(const value_type& x) const { return groups[get(id, x)]; } ^

Belcourt, Kenneth <kbelco <at> sandia.gov> writes:
On Apr 24, 2016, at 2:57 AM, Eisuke Kawashima <e.kawaschima <at>
gmail.com> wrote:
I tried to compile
http://www.boost.org/doc/libs/1_60_0/libs/graph_parallel/example/dijkstra_sh
ortest_paths.cpp,
This works for me with the head of the develop branch.
gcc.compile.c++ ../bin.v2/libs/graph_parallel/example/gcc- 4.9.1/debug/threading-multi/dijkstra_shortest_paths.o
"g++" -ftemplate-depth-128 -std=c++11 -O0 -fno-inline -Wall -g -fPIC -m64 -DBOOST_ALL_NO_LIB=1 -DBOOST_SYSTEM_DYN_LINK=1 -I".." -I"mpi/openmpi/1.6.4-gcc-4.9.1- RHEL6/include" -c -o "../bin.v2/libs/graph_parallel/example/gcc-4.9.1/debug/threading- multi/dijkstra_shortest_paths.o" "../libs/graph_parallel/example/dijkstra_shortest_paths.cpp”
Can you send just the compile line, rather than the link line, for this one target?
— Noel
Thank you for your reply, but mpicxx -std=c++11 -Ipath/to/boost_1.60.0 -c dijkstra_shortest_paths.cpp emits the same error. Regards, -- Eisuke Kawashima

On Apr 25, 2016, at 4:52 AM, Eisuke Kawashima <e.kawaschima@gmail.com> wrote:
Belcourt, Kenneth <kbelco <at> sandia.gov> writes:
On Apr 24, 2016, at 2:57 AM, Eisuke Kawashima <e.kawaschima <at> gmail.com> wrote:
I tried to compile
http://www.boost.org/doc/libs/1_60_0/libs/graph_parallel/example/dijkstra_sh
ortest_paths.cpp,
This works for me with the head of the develop branch.
gcc.compile.c++ ../bin.v2/libs/graph_parallel/example/gcc- 4.9.1/debug/threading-multi/dijkstra_shortest_paths.o
"g++" -ftemplate-depth-128 -std=c++11 -O0 -fno-inline -Wall -g -fPIC -m64 -DBOOST_ALL_NO_LIB=1 -DBOOST_SYSTEM_DYN_LINK=1 -I".." -I"mpi/openmpi/1.6.4-gcc-4.9.1- RHEL6/include" -c -o "../bin.v2/libs/graph_parallel/example/gcc-4.9.1/debug/threading- multi/dijkstra_shortest_paths.o" "../libs/graph_parallel/example/dijkstra_shortest_paths.cpp”
Can you send just the compile line, rather than the link line, for this one target?
— Noel
Thank you for your reply, but mpicxx -std=c++11 -Ipath/to/boost_1.60.0 -c dijkstra_shortest_paths.cpp emits the same error.
I can reproduce your failure with release 1.60 so there’s probably an issue in master that we need to address. Thanks for the report. Noel

On Apr 25, 2016, at 2:53 PM, Belcourt, Kenneth <kbelco@sandia.gov> wrote:
On Apr 25, 2016, at 4:52 AM, Eisuke Kawashima <e.kawaschima@gmail.com> wrote:
Belcourt, Kenneth <kbelco <at> sandia.gov> writes:
On Apr 24, 2016, at 2:57 AM, Eisuke Kawashima <e.kawaschima <at> gmail.com> wrote:
I tried to compile
libs/1_60_0/libs/graph_parallel/example/dijkstra_shortest_paths.cpp
I can reproduce your failure with release 1.60 so there’s probably an issue in master that we need to address. Thanks for the report.
The graph_parallel example code should compile okay with the forthcoming 1.61 release, but it won’t link due to a missing dependency on Boost MPI. When 1.61 is released, apply this patch to the libs/graph_parallel/example/Jamfile.v2 to fix the linker error. diff --git a/example/Jamfile.v2 b/example/Jamfile.v2 index 276951e..e887775 100644 --- a/example/Jamfile.v2 +++ b/example/Jamfile.v2 @@ -7,6 +7,7 @@ project : requirements <library>../build//boost_graph_parallel <library>../../system/build//boost_system + <library>../../mpi/build//boost_mpi ; -— Noel
participants (2)
-
Belcourt, Kenneth
-
Eisuke Kawashima