help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gsl] RNG and threads


From: Torquil Macdonald Sørensen
Subject: [Help-gsl] RNG and threads
Date: Fri, 05 Sep 2008 00:15:37 +0200
User-agent: Mozilla-Thunderbird 2.0.0.16 (X11/20080724)

Hello, are all the RNGs supposed to generate independent streams of numbers when they are declared in separate threads? I'm seeing some strange results with the ranlxs0, but mt19937 seems to behave as expected. In the manual it says

"Each instance of a generator keeps track of its own state, allowing the generators to be used in multi-threaded programs."

But when I run my OpenMP-parallelized program with ranlxs0, both threads produce the exact same results! With mt19937 I get different results for each thread (which is expected since I always seed with the thread identification number 0, 1, 2, ...).

Best regards,
Torquil Sørensen




reply via email to

[Prev in Thread] Current Thread [Next in Thread]