From: unknown Date: Tue, 21 Feb 2012 15:37:06 +0000 (+0100) Subject: Protect variable surf_parmap. X-Git-Tag: exp_20120308~34^2~19 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/ecb32cd3b952528d41f0163b255c94dfae14f2fe?ds=sidebyside Protect variable surf_parmap. --- diff --git a/src/surf/surf.c b/src/surf/surf.c index 2b5121ab8a..e78088e9ee 100644 --- a/src/surf/surf.c +++ b/src/surf/surf.c @@ -465,9 +465,12 @@ double surf_solve(double max_date) } surf_min_index = 0; + if (surf_get_nthreads() > 1) { /* parallel version */ +#ifdef CONTEXT_THREADS xbt_parmap_apply(surf_parmap, (void_f_pvoid_t) surf_share_resources, model_list); +#endif } else { /* sequential version */ @@ -551,7 +554,9 @@ double surf_solve(double max_date) if (surf_get_nthreads() > 1) { /* parallel version */ +#ifdef CONTEXT_THREADS xbt_parmap_apply(surf_parmap, (void_f_pvoid_t) surf_update_actions_state, model_list); +#endif } else { /* sequential version */