From ecb32cd3b952528d41f0163b255c94dfae14f2fe Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 21 Feb 2012 16:37:06 +0100 Subject: [PATCH] Protect variable surf_parmap. --- src/surf/surf.c | 5 +++++ 1 file changed, 5 insertions(+) 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 */ -- 2.20.1