|
Boost : |
Subject: Re: [boost] [BGL] Trying to get a correclty working Parallel BFS code
From: Nick Edmonds (ngedmond_at_[hidden])
Date: 2009-11-10 17:51:50
--snip-- (sorry, first reply was too big)
>>
>> Hi Nick,
>>
> Thanks for the explanation of the distributed BFS. This is indeed
> quite
> helpful. Especially at later stages. I haven't gotten to a point to
> comment
> on the data model but the current architecture is swell from what I
> can
> judge.
>
> I hesitate to ask explanation at every minor detail but I now confused
> about passing the same vertex descriptor. Specifically I didn't
> quite grasp
> the statement "source vertex just has to be
> graph_traits<Graph>::vertex_descriptor, which you can construct using
> vertex() call if you want to generate it from a global vertex index".
> The source vertex has to graph_traits<Graph>::vertex_descriptor
> which I
> takes two arguments the index and the graph --these two parameters
> can only
> identify local vertices. For global vertices we need global
> descriptors
> which also require the owner.
>
> Appreciate your help in clarifying this.
>
> Thanks
> Sandeep
The vertex() call takes a global index and constructs a
vertex_descriptor, which is basically a pair containing the local
index and the owning process. vertex(i, g) will construct the i'th
vertex descriptor in g on any process, regardless of where the vertex
is actually stored. The confusion is that there are two indices here,
global indices, and local indices. The graph distribution object maps
between the two. vertex() takes a global index, specifically for this
use case.
Hope that helps,
Nick
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk