star-mc

Parallel estimation of Monte Carlo integrators
git clone git://git.meso-star.fr/star-mc.git
Log | Files | Refs | README | LICENSE

commit b80ec43a7d9edcadf5b3a22a7d2e2a3176cb3933
parent 4e5c10ed6a84867a69389ac759aa1e63dbbcf429
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Tue,  1 Sep 2015 14:04:11 +0200

Change the thread scheduling policy of the smc_solve_N function

The N integrations were statically distributed on K threads by uniformly
splitting them in K buckets. This might be quite inefficient if their
computation cost were not uniform (i.e. poor load balancing). To avoid
this, the iterations are now interleaved, i.e. the thread i processes
the itegration i, i + K, i + 2K, ...

Diffstat:
Msrc/smc_estimator.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/smc_estimator.c b/src/smc_estimator.c @@ -275,7 +275,7 @@ smc_solve_N } /* Parallel estimation of N simulations */ - #pragma omp parallel for schedule(static) + #pragma omp parallel for schedule(static, 1) for(i = 0; i < (int64_t)count; ++i) { size_t istep; const int ithread = omp_get_thread_num();