Boost logo

Boost Users :

Subject: Re: [Boost-users] [PBGL] Betweenness centrality and named vertexes
From: Cedric Laczny (cedric.laczny_at_[hidden])
Date: 2010-11-27 08:11:17


I read a little about PBGL and even though I still don't know any solution to
you problem, it might help to bring in some ideas?

If I understood the documentation correctly, the vertices are distributed over
the available processes by some distribution.
Except for using the named vertices solution, it is only possible to access
the vertices local to the process (simply via indices). Digging a little into
the headers, I found that the function local(), that the compiler is
complaining about, must be implemented by the "templated" BaseDistribution
(boost/graph/distributed/shuffled_distribution.hpp). So I could think of that
the object of the class BaseDistribution does not implement this local()-
function.
When looking at the example adjacency_list<>-definition of the documentation on
PBGL, I see they are using mpi::bsp_process_group whereas you are using
mpi_process_group. I don't know if that makes a difference, but when I look at
http://www.osl.iu.edu/research/pbgl/documentation/mpi_bsp_process_group.html,
I can see no definition of local() there...
And it seems that this local() function performs the access of the vertex
local to the process via indices.

My thoughts on this are that either there is a bug and that the local()
function needs to be implemented accordingly or that there is something going
wrong with using named-vertices here. It might be worth a try to leave that
aside and compile your example without that code. Or you could test if your
code compiles when using a different algorithm than
brandes_betwenness_centrality, e.g. breadth_first_search() or such (if they
have distributed specializations for them)

Other possibilites might very well exist and might be more appropriate so I am
looking forward to hear those. For the moment these were the ideas that came
to my mind.

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