|
Boost Users : |
Subject: Re: [Boost-users] [PBGL] Betweenness centrality and named vertexes
From: Cedric Laczny (cedric.laczny_at_[hidden])
Date: 2010-11-27 09:34:30
Hi,
sorry, to split the whole communication into such "small" pieces. Your problem
really puzzles me and I can hardly quit trying to understand what is causing
it.
I would really be interested in the result when leaving the named vertices
aside.
AFAIK this should not be necessary to see if your distributed code will
compile, even with brandes_betweenness_centrality().
You might ask why this plays a role. Actually, when I look at your error logs,
I see "
/usr/local/include/boost/graph/distributed/shuffled_distribution.hpp: In member
function âsize_t
boost::graph::distributed::shuffled_distribution<BaseDistribution>::operator()
(const T&) const [with T = size_t, BaseDistribution =
boost::graph::distributed::hashed_distribution<std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >]â:
The problem here is the collision between size_t and char*
(std::basic_string).
The argument should be of type size_t (index of a vertex for the local
process) but the underlying distribution is based on std::basic_string,
probably due to the named vertices (specialization in named_graph.hpp). This
causes an error at line 40 of boost/graph/distributed/named_graph.hpp which is
called by line 68 in boost/graph/distributed/shuffled_distribution.hpp.
So the specialization to named vertices could be the cause.
While this might not resolve the issue with local(), it could actually track
down one error and might reveal a bug.
Looking forward to your answer.
Best,
Cedric
On Saturday, 27. November 2010 11:07:05 Carmine Paolino wrote:
> Hello,
>
> I'm trying to use `brandes_betweenness_centrality` with named vertexes but
> so far I haven't managed to get it working.
>
> These are the two approaches I tried:
>
> 1. passing an iterator_property_map on the vertex_index:
> https://gist.github.com/f02f18f30f0eef146a58#file_betweenness_named_graph.
> cpp
>
> 2. passing a property_map on a float inside the vertex:
> https://gist.github.com/f02f18f30f0eef146a58#file_betweenness_named_graph2
> .cpp
>
> And these are the compile logs for the first file:
> clang: https://gist.github.com/f02f18f30f0eef146a58#file_compile_clang.log
> gcc:https://gist.github.com/f02f18f30f0eef146a58#file_compile_gcc.log
>
> and the second file:
> clang: https://gist.github.com/f02f18f30f0eef146a58#file_compile_clang2.log
> gcc: https://gist.github.com/f02f18f30f0eef146a58#file_compile_gcc2.log
>
> What I'm doing wrong?
>
> Thanks in advance
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
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