[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-gsl] RNG and parallel MC simulations
From: |
Torquil Macdonald Sørensen |
Subject: |
[Help-gsl] RNG and parallel MC simulations |
Date: |
Mon, 29 Sep 2008 23:22:08 +0200 |
User-agent: |
Mozilla-Thunderbird 2.0.0.16 (X11/20080724) |
Hi everyone,
I have a parallel (OpenMP) Monte Carlo simulation program that uses
independent streams of random numbers (using GSL) on each processor. The
parallelization of the program is trivial, there is no communication
between the threads.
Up to now I have simply declared the RNGs within each thread and seeded
them with the thread-number. It works fine, and I have tried ranlxs2,
taus2 and mt19937, using seed = threadnumber+1. The +1 is to avoid
seed=0 which would give the default seed in GSL in thread 0.
Is it problematic to do this, wrt. the quality of the "independent"
streams? Should I go through the trouble of changing to SPRNG? Does the
GSL development team have any special recomendations for choice of RNG
and/or seeds in the case of parallel streams?
Since I have no interaction between the threads, all I require is that
the streams I use are as independent as possible, so that would be
accomplished by not choosing an unfortunate set of seed values?
According to the SPRNG web page, they offer the following algorithms:
(i) Linear Congruential with Prime Addend
(ii) modified Additive Lagged Fibonacci
(iii) Multiplicative Lagged Fibonacci
(iv) Combined Multiple Recursive Generator
(v) Prime Modulus Linear Congruential Generator.
I'm not sure why these should be better suited than a good RNG in GSL.
Does anyone have an opinion on this?
Ref: http://sprng.cs.fsu.edu/Version4.0/generators.html
Best regards
Torquil Sørensen
- [Help-gsl] RNG and parallel MC simulations,
Torquil Macdonald Sørensen <=