Boost logo

Boost Users :

Subject: Re: [Boost-users] [graph][parallel] Problem distributed property map synchronization
From: Borja Miñano (bminyano_at_[hidden])
Date: 2013-03-11 04:20:34


Hello Nick,

Oops, I attach it again.
Anyway, I am using an bidirectional adjacency list, because I need to
know the in_edges.
typedef boost::adjacency_list<vecS, distributedS<mpi_process_group,
vecS>, bidirectionalS, property<vertex_index_t, int>, EdgeProperties> Graph;

I have been looking in more detail and it seems that before the first
synchronize call, when the ghost values are required they are filled
correctly, but after then they never synchronize their values again.
Reading the documentation I saw that the first time one do get for a
ghost cell it is automatically synchronized. But, unfortunately, the
following times I try to get the values they don't do the
synchronization again.

If using a bidirectional directed graph was a problem (as it seems for
undirected ones), is there another way to perform a manual synchronization?

El 08/03/13 19:18, Nick Edmonds escribió:
> 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&lt;&lt;&quot;:Time &quot;&lt;&lt;t&lt;&lt;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&lt;&lt;&quot;value &quot;&lt;&lt;d_index[source(*ei_i,
>> g)]&lt;&lt;&quot; -> "<<d_index[target(*ei_i, g)]&lt;&lt;&quot; valor
>> &quot;&lt;&lt;get(d_ecash, k)&lt;&lt;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.
>>
>> &lt;nabble_a href=&quot;sync.cpp&quot;>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 mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>

-- 
Un saludo,
Borja Miñano
IAC3 - Universitat de les Illes Balears
ParcBit - Edifici 17 (Disset); Local D7
Cra. Valldemossa km. 7,4
E-07121 Palma de Mallorca. Balears. Spain.
Phone: +34 871 967 434



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