|
Boost Users : |
Subject: Re: [Boost-users] [graph][parallel] Problem distributed property map synchronization
From: Nick Edmonds (ngedmond_at_[hidden])
Date: 2013-03-08 13:18:46
On Mar 8, 2013, at 10:27 AM, bminano wrote:
> Hello,
>
> I need help. I have a distributed graph with a distributed property map for
> an edge value.
> The problem is that the synchronize procedure does not synchronize my ghost
> edges values.
>
> I have a loop that reads from the property, synchronizes, modifies its value
> and synchronizes it.
> What I see is that the value is not being synchronized for the ghost edges.
>
> for (int t = 0; t < 2; t++) {
> myfile<<rank<<":Time "<<t<<endl;
>
> BGL_FORALL_VERTICES(v, g, Graph) {
> for (boost::tie(ei_i,edge_end_i) = in_edges(v, g); ei_i != edge_end_i;
> ++ei_i) {
> remote_key_e k(rank, *ei_i);
> myfile<<"value "<<d_index[source(*ei_i,
> g)]<<" -> "<<d_index[target(*ei_i, g)]<<" valor
> "<<get(d_ecash, k)<<endl;
> }
> }
>
> synchronize(d_ecash);
> BGL_FORALL_VERTICES(v, g, Graph) {
> for (boost::tie(ei,edge_end) = out_edges(v, g); ei != edge_end; ++ei)
> {
> remote_key_e k(rank, *ei);
> put(d_ecash, k, t + 1);
> }
> }
> synchronize(d_ecash);
> }
>
> Could anyone tell me what I am doing wrong?
> I attach the full code if someone want to look at them.
>
> <nabble_a href="sync.cpp">sync.cpp
Your mail client seems to have mangled your code pretty badly and I don't see an attachment, but the first question would be what graph type are you using? If you're using the undirected graph then there's no support in the PBGL for automatically synchronizing the values between the two local copies of the edge stored at the owner of the source and target vertex respectively. It could be added but would require O(E) additional storage to map from an edge to it's corresponding anti-edge as well as some additional communication to update both copies (the complexity of which would vary depending on the consistency model you wanted to support).
Cheers,
Nick
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