Commit 0dcf00ff authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Fix race condition in betweenness() with openmp enabled

parent 90b1e76d
......@@ -342,6 +342,8 @@ namespace detail { namespace graph {
shortest_paths(g, s, ordered_vertices, incoming, distance,
path_count, vertex_index);
#pragma omp critical
{
while (!ordered_vertices.empty())
{
vertex_descriptor u = ordered_vertices.top();
......@@ -367,6 +369,7 @@ namespace detail { namespace graph {
update_centrality(centrality, u, get(dependency, u));
}
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment