THUKEG / saedb

the SAE platform
http://thukeg.github.com/saedb/
11 stars 19 forks source link

is this a bug in sync engine? #38

Closed neozhangthe1 closed 11 years ago

neozhangthe1 commented 11 years ago
        for (lvid_type vid = 0; vid < graph_.num_local_vertices(); vid++) {
            if (!active_superstep_[vid]) {
                continue;
            }
            auto &vprog = vertex_programs_[vid];
            vertex_type vertex {graph_.vertex(vid)};
            auto scatter_dir = vprog.scatter_edges(context, vertex);

            if (scatter_dir == IN_EDGES || scatter_dir == ALL_EDGES){
                for (auto ep = vertex.in_edges(); ep->Alive(); ep->Next()) {
                    edge_type edge(ep->Clone());
                    vprog.scatter(context, vertex, edge);
                }
            }

            if (scatter_dir == OUT_EDGES || scatter_dir == ALL_EDGES){
                for (auto ep = vertex.out_edges(); ep->Alive(); ep->Next()) {
                    edge_type edge(ep->Clone());
                    vprog.scatter(context, vertex, edge);
                }
            }
            vid++;
        }

the vid has been accumlated twice in each loop, i deleted the last vid++ in my repo

wweic commented 11 years ago

Interesting..
It may be the problem arise when git merge executes, please submit your patch via pull request.

Wei Chen ipondering.me

On 2013年4月12日Friday at 上午1:29, Yutao wrote:

for (lvidtype vid = 0; vid < graph.num_local_vertices(); vid++) { if (!activesuperstep[vid]) { continue; } auto &vprog = vertexprograms[vid]; vertextype vertex {graph.vertex(vid)}; auto scatter_dir = vprog.scatter_edges(context, vertex); if (scatter_dir == IN_EDGES || scatter_dir == ALL_EDGES){ for (auto ep = vertex.in_edges(); ep->Alive(); ep->Next()) { edge_type edge(ep->Clone()); vprog.scatter(context, vertex, edge); } } if (scatter_dir == OUT_EDGES || scatter_dir == ALL_EDGES){ for (auto ep = vertex.out_edges(); ep->Alive(); ep->Next()) { edge_type edge(ep->Clone()); vprog.scatter(context, vertex, edge); } } vid++; }

the vid has been accumlated twice in each loop, i deleted the last vid++ in my repo

— Reply to this email directly or view it on GitHub (https://github.com/THUKEG/saedb/issues/38).

thinxer commented 11 years ago

Is this fixed? If so, please comment with the commit hash and close this issue.

neozhangthe1 commented 11 years ago

yes