Commit 401408f4 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Change OpenMP schedule directive to 'static' instead of 'dynamic'

Use schedule(static, 100), to reduce overhead with small graphs in the
majority of cases.
parent a00ca7fe
...@@ -45,7 +45,7 @@ void normalize_betweenness(const Graph& g, ...@@ -45,7 +45,7 @@ void normalize_betweenness(const Graph& g,
int i, N = num_vertices(g); int i, N = num_vertices(g);
#pragma omp parallel for default(shared) private(i) \ #pragma omp parallel for default(shared) private(i) \
schedule(dynamic) schedule(static, 100)
for (i = 0; i < N; ++i) for (i = 0; i < N; ++i)
{ {
typename graph_traits<Graph>::vertex_descriptor v = vertex(i, g); typename graph_traits<Graph>::vertex_descriptor v = vertex(i, g);
......
...@@ -68,7 +68,7 @@ struct get_closeness ...@@ -68,7 +68,7 @@ struct get_closeness
get_vertex_dists_t get_vertex_dists; get_vertex_dists_t get_vertex_dists;
size_t HN = HardNumVertices()(g); size_t HN = HardNumVertices()(g);
int i, N = num_vertices(g); int i, N = num_vertices(g);
#pragma omp parallel for default(shared) private(i) schedule(dynamic) #pragma omp parallel for default(shared) private(i) schedule(static, 100)
for (i = 0; i < N; ++i) for (i = 0; i < N; ++i)
{ {
vertex_t v = vertex(i, g); vertex_t v = vertex(i, g);
......
...@@ -48,7 +48,7 @@ struct get_eigentrust ...@@ -48,7 +48,7 @@ struct get_eigentrust
int i, N = num_vertices(g); int i, N = num_vertices(g);
#pragma omp parallel for default(shared) private(i) \ #pragma omp parallel for default(shared) private(i) \
schedule(dynamic) schedule(static, 100)
for (i = 0; i < N; ++i) for (i = 0; i < N; ++i)
{ {
typename graph_traits<Graph>::vertex_descriptor v = typename graph_traits<Graph>::vertex_descriptor v =
...@@ -72,7 +72,7 @@ struct get_eigentrust ...@@ -72,7 +72,7 @@ struct get_eigentrust
c_sum.reserve(num_vertices(g)); c_sum.reserve(num_vertices(g));
int i, N = num_vertices(g); int i, N = num_vertices(g);
#pragma omp parallel for default(shared) private(i) \ #pragma omp parallel for default(shared) private(i) \
schedule(dynamic) schedule(static, 100)
for (i = 0; i < N; ++i) for (i = 0; i < N; ++i)
{ {
typename graph_traits<Graph>::vertex_descriptor v = typename graph_traits<Graph>::vertex_descriptor v =
...@@ -90,7 +90,7 @@ struct get_eigentrust ...@@ -90,7 +90,7 @@ struct get_eigentrust
// init inferred trust t // init inferred trust t
int i, N = num_vertices(g), V = HardNumVertices()(g); int i, N = num_vertices(g), V = HardNumVertices()(g);
#pragma omp parallel for default(shared) private(i) \ #pragma omp parallel for default(shared) private(i) \
schedule(dynamic) schedule(static, 100)
for (i = 0; i < N; ++i) for (i = 0; i < N; ++i)
{ {
typename graph_traits<Graph>::vertex_descriptor v = vertex(i, g); typename graph_traits<Graph>::vertex_descriptor v = vertex(i, g);
...@@ -105,7 +105,7 @@ struct get_eigentrust ...@@ -105,7 +105,7 @@ struct get_eigentrust
{ {
delta = 0; delta = 0;
#pragma omp parallel for default(shared) private(i) \ #pragma omp parallel for default(shared) private(i) \
schedule(dynamic) reduction(+:delta) schedule(static, 100) reduction(+:delta)
for (i = 0; i < N; ++i) for (i = 0; i < N; ++i)
{ {
typename graph_traits<Graph>::vertex_descriptor v = typename graph_traits<Graph>::vertex_descriptor v =
...@@ -137,7 +137,7 @@ struct get_eigentrust ...@@ -137,7 +137,7 @@ struct get_eigentrust
if (iter % 2 != 0) if (iter % 2 != 0)
{ {
#pragma omp parallel for default(shared) private(i) \ #pragma omp parallel for default(shared) private(i) \
schedule(dynamic) schedule(static, 100)
for (i = 0; i < N; ++i) for (i = 0; i < N; ++i)
{ {
typename graph_traits<Graph>::vertex_descriptor v = typename graph_traits<Graph>::vertex_descriptor v =
......
...@@ -51,7 +51,7 @@ struct get_eigenvector ...@@ -51,7 +51,7 @@ struct get_eigenvector
{ {
norm = 0; norm = 0;
#pragma omp parallel for default(shared) private(i) \ #pragma omp parallel for default(shared) private(i) \
schedule(dynamic) reduction(+:norm) schedule(static, 100) reduction(+:norm)
for (i = 0; i < N; ++i) for (i = 0; i < N; ++i)
{ {
typename graph_traits<Graph>::vertex_descriptor v = typename graph_traits<Graph>::vertex_descriptor v =
...@@ -77,7 +77,7 @@ struct get_eigenvector ...@@ -77,7 +77,7 @@ struct get_eigenvector
delta = 0; delta = 0;
#pragma omp parallel for default(shared) private(i) \ #pragma omp parallel for default(shared) private(i) \
schedule(dynamic) reduction(+:delta) schedule(static, 100) reduction(+:delta)
for (i = 0; i < N; ++i) for (i = 0; i < N; ++i)
{ {
typename graph_traits<Graph>::vertex_descriptor v = typename graph_traits<Graph>::vertex_descriptor v =
...@@ -97,7 +97,7 @@ struct get_eigenvector ...@@ -97,7 +97,7 @@ struct get_eigenvector
if (iter % 2 != 0) if (iter % 2 != 0)
{ {
#pragma omp parallel for default(shared) private(i) \ #pragma omp parallel for default(shared) private(i) \
schedule(dynamic) schedule(static, 100)
for (i = 0; i < N; ++i) for (i = 0; i < N; ++i)
{ {
typename graph_traits<Graph>::vertex_descriptor v = typename graph_traits<Graph>::vertex_descriptor v =
......
...@@ -47,7 +47,7 @@ struct get_hits ...@@ -47,7 +47,7 @@ struct get_hits
// init centrality // init centrality
int i, N = num_vertices(g), V = HardNumVertices()(g); int i, N = num_vertices(g), V = HardNumVertices()(g);
#pragma omp parallel for default(shared) private(i) \ #pragma omp parallel for default(shared) private(i) \
schedule(dynamic) schedule(static, 100)
for (i = 0; i < N; ++i) for (i = 0; i < N; ++i)
{ {
typename graph_traits<Graph>::vertex_descriptor v = vertex(i, g); typename graph_traits<Graph>::vertex_descriptor v = vertex(i, g);
...@@ -65,7 +65,7 @@ struct get_hits ...@@ -65,7 +65,7 @@ struct get_hits
{ {
x_norm = 0; x_norm = 0;
#pragma omp parallel for default(shared) private(i) \ #pragma omp parallel for default(shared) private(i) \
schedule(dynamic) reduction(+:x_norm) schedule(static, 100) reduction(+:x_norm)
for (i = 0; i < N; ++i) for (i = 0; i < N; ++i)
{ {
typename graph_traits<Graph>::vertex_descriptor v = typename graph_traits<Graph>::vertex_descriptor v =
...@@ -100,7 +100,7 @@ struct get_hits ...@@ -100,7 +100,7 @@ struct get_hits
delta = 0; delta = 0;
#pragma omp parallel for default(shared) private(i) \ #pragma omp parallel for default(shared) private(i) \
schedule(dynamic) reduction(+:delta) schedule(static, 100) reduction(+:delta)
for (i = 0; i < N; ++i) for (i = 0; i < N; ++i)
{ {
typename graph_traits<Graph>::vertex_descriptor v = typename graph_traits<Graph>::vertex_descriptor v =
...@@ -122,7 +122,7 @@ struct get_hits ...@@ -122,7 +122,7 @@ struct get_hits
if (iter % 2 != 0) if (iter % 2 != 0)
{ {
#pragma omp parallel for default(shared) private(i) \ #pragma omp parallel for default(shared) private(i) \
schedule(dynamic) schedule(static, 100)
for (i = 0; i < N; ++i) for (i = 0; i < N; ++i)
{ {
typename graph_traits<Graph>::vertex_descriptor v = typename graph_traits<Graph>::vertex_descriptor v =
......
...@@ -51,7 +51,7 @@ struct get_katz ...@@ -51,7 +51,7 @@ struct get_katz
{ {
norm = 0; norm = 0;
#pragma omp parallel for default(shared) private(i) \ #pragma omp parallel for default(shared) private(i) \
schedule(dynamic) reduction(+:norm) schedule(static, 100) reduction(+:norm)
for (i = 0; i < N; ++i) for (i = 0; i < N; ++i)
{ {
typename graph_traits<Graph>::vertex_descriptor v = typename graph_traits<Graph>::vertex_descriptor v =
...@@ -77,7 +77,7 @@ struct get_katz ...@@ -77,7 +77,7 @@ struct get_katz
delta = 0; delta = 0;
#pragma omp parallel for default(shared) private(i) \ #pragma omp parallel for default(shared) private(i) \
schedule(dynamic) reduction(+:delta) schedule(static, 100) reduction(+:delta)
for (i = 0; i < N; ++i) for (i = 0; i < N; ++i)
{ {
typename graph_traits<Graph>::vertex_descriptor v = typename graph_traits<Graph>::vertex_descriptor v =
...@@ -97,7 +97,7 @@ struct get_katz ...@@ -97,7 +97,7 @@ struct get_katz
if (iter % 2 != 0) if (iter % 2 != 0)
{ {
#pragma omp parallel for default(shared) private(i) \ #pragma omp parallel for default(shared) private(i) \
schedule(dynamic) schedule(static, 100)
for (i = 0; i < N; ++i) for (i = 0; i < N; ++i)
{ {
typename graph_traits<Graph>::vertex_descriptor v = typename graph_traits<Graph>::vertex_descriptor v =
......
...@@ -43,7 +43,7 @@ struct get_pagerank ...@@ -43,7 +43,7 @@ struct get_pagerank
// init degs // init degs
int i, N = num_vertices(g); int i, N = num_vertices(g);
#pragma omp parallel for default(shared) private(i) \ #pragma omp parallel for default(shared) private(i) \
schedule(dynamic) schedule(static, 100)
for (i = 0; i < N; ++i) for (i = 0; i < N; ++i)
{ {
typename graph_traits<Graph>::vertex_descriptor v = vertex(i, g); typename graph_traits<Graph>::vertex_descriptor v = vertex(i, g);
...@@ -62,7 +62,7 @@ struct get_pagerank ...@@ -62,7 +62,7 @@ struct get_pagerank
{ {
delta = 0; delta = 0;
#pragma omp parallel for default(shared) private(i) \ #pragma omp parallel for default(shared) private(i) \
schedule(dynamic) reduction(+:delta) schedule(static, 100) reduction(+:delta)
for (i = 0; i < N; ++i) for (i = 0; i < N; ++i)
{ {
typename graph_traits<Graph>::vertex_descriptor v = typename graph_traits<Graph>::vertex_descriptor v =
...@@ -96,7 +96,7 @@ struct get_pagerank ...@@ -96,7 +96,7 @@ struct get_pagerank
if (iter % 2 != 0) if (iter % 2 != 0)
{ {
#pragma omp parallel for default(shared) private(i) \ #pragma omp parallel for default(shared) private(i) \
schedule(dynamic) schedule(static, 100)
for (i = 0; i < N; ++i) for (i = 0; i < N; ++i)
{ {
typename graph_traits<Graph>::vertex_descriptor v = typename graph_traits<Graph>::vertex_descriptor v =
......
...@@ -106,7 +106,7 @@ struct get_trust_transitivity ...@@ -106,7 +106,7 @@ struct get_trust_transitivity
property_traits<InferredTrustMap>::value_type::value_type t_type; property_traits<InferredTrustMap>::value_type::value_type t_type;
int i, N = num_vertices(g); int i, N = num_vertices(g);
#pragma omp parallel for default(shared) private(i) schedule(dynamic) #pragma omp parallel for default(shared) private(i) schedule(static, 100)
for (i = 0; i < N; ++i) for (i = 0; i < N; ++i)
{ {
vertex_t v = vertex(i, g); vertex_t v = vertex(i, g);
...@@ -116,7 +116,7 @@ struct get_trust_transitivity ...@@ -116,7 +116,7 @@ struct get_trust_transitivity
} }
N = (target == -1) ? num_vertices(g) : target + 1; N = (target == -1) ? num_vertices(g) : target + 1;
#pragma omp parallel for default(shared) private(i) schedule(dynamic) #pragma omp parallel for default(shared) private(i) schedule(static, 100)
for (i = (target == -1) ? 0 : target; i < N; ++i) for (i = (target == -1) ? 0 : target; i < N; ++i)
{ {
vertex_t tgt = vertex(i, g); vertex_t tgt = vertex(i, g);
...@@ -210,7 +210,7 @@ struct get_trust_transitivity ...@@ -210,7 +210,7 @@ struct get_trust_transitivity
distance_zero(t_type(1))); distance_zero(t_type(1)));
#pragma omp parallel for default(shared) private(j) \ #pragma omp parallel for default(shared) private(j) \
schedule(dynamic) schedule(static, 100)
for (j = 0; j < N2; ++j) for (j = 0; j < N2; ++j)
{ {
vertex_t src = vertex(j, g); vertex_t src = vertex(j, g);
...@@ -224,7 +224,7 @@ struct get_trust_transitivity ...@@ -224,7 +224,7 @@ struct get_trust_transitivity
} }
#pragma omp parallel for default(shared) private(j) \ #pragma omp parallel for default(shared) private(j) \
schedule(dynamic) schedule(static, 100)
for (j = 0; j < N2; ++j) for (j = 0; j < N2; ++j)
{ {
vertex_t src = vertex(j, g); vertex_t src = vertex(j, g);
......
...@@ -98,7 +98,7 @@ struct get_global_clustering ...@@ -98,7 +98,7 @@ struct get_global_clustering
int i, N = num_vertices(g); int i, N = num_vertices(g);
#pragma omp parallel for default(shared) private(i,temp) \ #pragma omp parallel for default(shared) private(i,temp) \
schedule(dynamic) reduction(+:triangles, n) schedule(static, 100) reduction(+:triangles, n)
for (i = 0; i < N; ++i) for (i = 0; i < N; ++i)
{ {
typename graph_traits<Graph>::vertex_descriptor v = vertex(i, g); typename graph_traits<Graph>::vertex_descriptor v = vertex(i, g);
...@@ -117,7 +117,7 @@ struct get_global_clustering ...@@ -117,7 +117,7 @@ struct get_global_clustering
double cerr = 0.0; double cerr = 0.0;
#pragma omp parallel for default(shared) private(i,temp) \ #pragma omp parallel for default(shared) private(i,temp) \
schedule(dynamic) reduction(+:cerr) schedule(static, 100) reduction(+:cerr)
for (i = 0; i < N; ++i) for (i = 0; i < N; ++i)
{ {
typename graph_traits<Graph>::vertex_descriptor v = vertex(i, g); typename graph_traits<Graph>::vertex_descriptor v = vertex(i, g);
...@@ -143,7 +143,7 @@ struct set_clustering_to_property ...@@ -143,7 +143,7 @@ struct set_clustering_to_property
typename get_undirected_graph<Graph>::type ug(g); typename get_undirected_graph<Graph>::type ug(g);
int i, N = num_vertices(g); int i, N = num_vertices(g);
#pragma omp parallel for default(shared) private(i) schedule(dynamic) #pragma omp parallel for default(shared) private(i) schedule(static, 100)
for (i = 0; i < N; ++i) for (i = 0; i < N; ++i)
{ {
typename graph_traits<Graph>::vertex_descriptor v = vertex(i, g); typename graph_traits<Graph>::vertex_descriptor v = vertex(i, g);
......
...@@ -122,7 +122,7 @@ struct get_extended_clustering ...@@ -122,7 +122,7 @@ struct get_extended_clustering
int i, N = num_vertices(g); int i, N = num_vertices(g);
#pragma omp parallel for default(shared) private(i) schedule(dynamic) #pragma omp parallel for default(shared) private(i) schedule(static, 100)
for (i = 0; i < N; ++i) for (i = 0; i < N; ++i)
{ {
vertex_t v = vertex(i, g); vertex_t v = vertex(i, g);
......
...@@ -357,7 +357,7 @@ struct get_all_motifs ...@@ -357,7 +357,7 @@ struct get_all_motifs
int i, N = (p < 1) ? V.size() : num_vertices(g); int i, N = (p < 1) ? V.size() : num_vertices(g);
#pragma omp parallel for default(shared) private(i, sig) \ #pragma omp parallel for default(shared) private(i, sig) \
schedule(dynamic) schedule(static, 100)
for (i = 0; i < N; ++i) for (i = 0; i < N; ++i)
{ {
vector<vector<typename graph_traits<Graph>::vertex_descriptor> > vector<vector<typename graph_traits<Graph>::vertex_descriptor> >
......
...@@ -109,7 +109,7 @@ struct get_communities ...@@ -109,7 +109,7 @@ struct get_communities
// sample a new spin for every vertex // sample a new spin for every vertex
int NV = num_vertices(g),i; int NV = num_vertices(g),i;
#pragma omp parallel for default(shared) private(i)\ #pragma omp parallel for default(shared) private(i)\
reduction(+:E) schedule(dynamic) reduction(+:E) schedule(static, 100)
for (i = 0; i < NV; ++i) for (i = 0; i < NV; ++i)
{ {
vertex_t v = vertex(i, g); vertex_t v = vertex(i, g);
...@@ -212,7 +212,7 @@ struct get_communities ...@@ -212,7 +212,7 @@ struct get_communities
{ {
int NV = num_vertices(g), i; int NV = num_vertices(g), i;
#pragma omp parallel for default(shared) private(i)\ #pragma omp parallel for default(shared) private(i)\
schedule(dynamic) schedule(static, 100)
for (i = 0; i < NV; ++i) for (i = 0; i < NV; ++i)
{ {
vertex_t v = vertex(i, g); vertex_t v = vertex(i, g);
...@@ -381,7 +381,7 @@ public: ...@@ -381,7 +381,7 @@ public:
void Update(size_t k, size_t old_s, size_t s) void Update(size_t k, size_t old_s, size_t s)
{ {
int i, NK = _degs.size(); int i, NK = _degs.size();
#pragma omp parallel for default(shared) private(i) schedule(dynamic) #pragma omp parallel for default(shared) private(i) schedule(static, 100)
for (i = 0; i < NK; ++i) for (i = 0; i < NK; ++i)
{ {
size_t k1 = _degs[i], k2 = k; size_t k1 = _degs[i], k2 = k;
...@@ -407,7 +407,7 @@ public: ...@@ -407,7 +407,7 @@ public:
_Nks[k].erase(old_s); _Nks[k].erase(old_s);
_Nks[k][s]++; _Nks[k][s]++;
#pragma omp parallel for default(shared) private(i) schedule(dynamic) #pragma omp parallel for default(shared) private(i) schedule(static, 100)
for (i = 0; i < NK; ++i) for (i = 0; i < NK; ++i)
{ {
size_t k1 = _degs[i], k2 = k; size_t k1 = _degs[i], k2 = k;
......
...@@ -48,7 +48,7 @@ struct get_assortativity_coefficient ...@@ -48,7 +48,7 @@ struct get_assortativity_coefficient
SharedMap<tr1::unordered_map<double,count_t> > sa(a), sb(b); SharedMap<tr1::unordered_map<double,count_t> > sa(a), sb(b);
int i, N = num_vertices(g); int i, N = num_vertices(g);
#pragma omp parallel for default(shared) private(i) firstprivate(sa,sb)\ #pragma omp parallel for default(shared) private(i) firstprivate(sa,sb)\
schedule(dynamic) reduction(+:e_kk, n_edges) schedule(static, 100) reduction(+:e_kk, n_edges)
for (i = 0; i < N; ++i) for (i = 0; i < N; ++i)
{ {
typename graph_traits<Graph>::vertex_descriptor v = vertex(i, g); typename graph_traits<Graph>::vertex_descriptor v = vertex(i, g);
...@@ -82,7 +82,7 @@ struct get_assortativity_coefficient ...@@ -82,7 +82,7 @@ struct get_assortativity_coefficient
// "jackknife" variance // "jackknife" variance
double err = 0.0; double err = 0.0;
#pragma omp parallel for default(shared) private(i) schedule(dynamic)\ #pragma omp parallel for default(shared) private(i) schedule(static, 100)\
reduction(+:err) reduction(+:err)
for (i = 0; i < N; ++i) for (i = 0; i < N; ++i)
{ {
...@@ -127,7 +127,7 @@ struct get_scalar_assortativity_coefficient ...@@ -127,7 +127,7 @@ struct get_scalar_assortativity_coefficient
double a = 0.0, b = 0.0, da = 0.0, db = 0.0; double a = 0.0, b = 0.0, da = 0.0, db = 0.0;
int i, N = num_vertices(g); int i, N = num_vertices(g);
#pragma omp parallel for default(shared) private(i) \ #pragma omp parallel for default(shared) private(i) \
schedule(dynamic) reduction(+:e_xy,n_edges,a,b,da,db) schedule(static, 100) reduction(+:e_xy,n_edges,a,b,da,db)
for (i = 0; i < N; ++i) for (i = 0; i < N; ++i)
{ {
typename graph_traits<Graph>::vertex_descriptor v = vertex(i, g); typename graph_traits<Graph>::vertex_descriptor v = vertex(i, g);
...@@ -163,7 +163,7 @@ struct get_scalar_assortativity_coefficient ...@@ -163,7 +163,7 @@ struct get_scalar_assortativity_coefficient
r_err = 0.0; r_err = 0.0;
double err = 0.0; double err = 0.0;
#pragma omp parallel for default(shared) private(i) schedule(dynamic)\ #pragma omp parallel for default(shared) private(i) schedule(static, 100)\
reduction(+:err) reduction(+:err)
for (i = 0; i < N; ++i) for (i = 0; i < N; ++i)
{ {
......
...@@ -67,7 +67,7 @@ struct get_avg_correlation ...@@ -67,7 +67,7 @@ struct get_avg_correlation
int i, N = num_vertices(g); int i, N = num_vertices(g);
#pragma omp parallel for default(shared) private(i) \ #pragma omp parallel for default(shared) private(i) \
firstprivate(s_sum, s_sum2, s_count) schedule(dynamic) firstprivate(s_sum, s_sum2, s_count) schedule(static, 100)
for (i = 0; i < N; ++i) for (i = 0; i < N; ++i)
{ {
typename graph_traits<Graph>::vertex_descriptor v = vertex(i, g); typename graph_traits<Graph>::vertex_descriptor v = vertex(i, g);
......
...@@ -60,7 +60,7 @@ struct get_correlation_histogram ...@@ -60,7 +60,7 @@ struct get_correlation_histogram
int i, N = num_vertices(g); int i, N = num_vertices(g);
#pragma omp parallel for default(shared) private(i) \ #pragma omp parallel for default(shared) private(i) \
firstprivate(s_hist) schedule(dynamic) firstprivate(s_hist) schedule(static, 100)
for (i = 0; i < N; ++i) for (i = 0; i < N; ++i)
{ {
typename graph_traits<Graph>::vertex_descriptor v = typename graph_traits<Graph>::vertex_descriptor v =
......
...@@ -127,7 +127,7 @@ struct get_geometric ...@@ -127,7 +127,7 @@ struct get_geometric
} }
#pragma omp parallel for default(shared) private(i, box) \ #pragma omp parallel for default(shared) private(i, box) \
schedule(dynamic) schedule(static, 100)
for (int i = 0; i < N; ++i) for (int i = 0; i < N; ++i)
{ {
typename graph_traits<Graph>::vertex_descriptor v = vertex(i, g); typename graph_traits<Graph>::vertex_descriptor v = vertex(i, g);
......
...@@ -71,7 +71,7 @@ struct get_lattice ...@@ -71,7 +71,7 @@ struct get_lattice
vector<int> pos(shape.size()); vector<int> pos(shape.size());
//#pragma omp parallel for default(shared) private(i) //#pragma omp parallel for default(shared) private(i)
// firstprivate(pos) schedule(dynamic) // firstprivate(pos) schedule(static, 100)
for (int i = 0; i < N; ++i) for (int i = 0; i < N; ++i)
{ {
get_pos(i, shape, pos); get_pos(i, shape, pos);
......
...@@ -244,7 +244,7 @@ struct get_degree_map ...@@ -244,7 +244,7 @@ struct get_degree_map
typename map_t::unchecked_t deg_map = cdeg_map.get_unchecked(num_vertices(g)); typename map_t::unchecked_t deg_map = cdeg_map.get_unchecked(num_vertices(g));
int i, N = num_vertices(g); int i, N = num_vertices(g);
#pragma omp parallel for default(shared) private(i) schedule(dynamic) #pragma omp parallel for default(shared) private(i) schedule(static, 100)
for (i = 0; i < N; ++i) for (i = 0; i < N; ++i)
{ {
typename graph_traits<Graph>::vertex_descriptor v = vertex(i, g); typename graph_traits<Graph>::vertex_descriptor v = vertex(i, g);
......
...@@ -77,7 +77,7 @@ struct get_average ...@@ -77,7 +77,7 @@ struct get_average
AverageTraverse traverse; AverageTraverse traverse;
int i, N = num_vertices(g); int i, N = num_vertices(g);
#pragma omp parallel for default(shared) private(i) \