473,326 Members | 2,102 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Naive parallel implementation of Mersenne Twister random numbergenerator

Hi there,

I have a question on a naive implementation of a parallel MT that I've
done using the fortran version of MT19937ar.f posted in Prof.
Matsumoto's website. (http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/
MT2002/emt19937ar.html)

First, I setup a KISS RNG (Marsaglia, 1999)
in the master node and seed it. I then use the first 4 outputs from
the master node to
seed the MT in the first worker node
using subroutine init_by_array. I continue in the
same manner for all subsequent worker nodes, taking the next 4
outputs from the master node and using them to seed the MT in all
worker nodes. Once this is done, I have a different MT ready for use
in all the worker nodes. Do you think this is a good approach? I know
that the seeds used to set up each worker node MTs
have some correlation (since they are produced by the
same KISS RNG), but given the gigantic
period of the MT algorithm and the fact that KISS and MT are so
different,
wouldn't these correlations be insignificant
for all practical purposes?

I know I can't expect perfectly uncorrelated streams of outputs in
each node as in serious parallel PRNGs (i.e. SPRNG), but I'm only
going to use the code for small workstations/clusters of 8-16 nodes
(using mpi). Any ideas on the max number of uncorrelated streams I can
expect?

Thanks

Manuel
Jun 27 '08 #1
1 2470
mj*****@columbia.edu wrote:
Hi there,

I have a question on a naive implementation of a parallel MT that I've
done using the fortran version of MT19937ar.f posted in Prof.
Matsumoto's website. (http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/
MT2002/emt19937ar.html)

First, I setup a KISS RNG (Marsaglia, 1999)
in the master node and seed it. I then use the first 4 outputs from
the master node to
seed the MT in the first worker node
using subroutine init_by_array. I continue in the
same manner for all subsequent worker nodes, taking the next 4
outputs from the master node and using them to seed the MT in all
worker nodes. Once this is done, I have a different MT ready for use
in all the worker nodes. Do you think this is a good approach? I know
that the seeds used to set up each worker node MTs
have some correlation (since they are produced by the
same KISS RNG), but given the gigantic
period of the MT algorithm and the fact that KISS and MT are so
different,
wouldn't these correlations be insignificant
for all practical purposes?

I know I can't expect perfectly uncorrelated streams of outputs in
each node as in serious parallel PRNGs (i.e. SPRNG), but I'm only
going to use the code for small workstations/clusters of 8-16 nodes
(using mpi). Any ideas on the max number of uncorrelated streams I can
expect?
news:comp.programming

--
pete
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

31
by: Scott Robert Ladd | last post by:
I've posted my revised C++ implementation of the Mersenne Twister at: http://www.coyotegulch.com/libcoyote/TwistedRoad/TwistedRoad.html This is "free-as-in-liberty" and "free-as-in-beer" code....
4
by: Skybuck Flying | last post by:
Hi, What is the implementation of rand() on say visual c/c++ 5 or 6 ? Another question... is this rand() implementation the same on any other platforms/compilers/libraries ? Where can I...
2
by: Martin Ho | last post by:
Hi Everyone, I have this code of Mersenne twister, which produces the random numbers, one of the fastest codes as far as I know to produce random numbers. Anyways, it's writen in c# and I need to...
11
by: Simon | last post by:
I have a quick question on the Mersenne Twister (hereinafter MT) I'm using the standard C code downloaded from the MT website (http://tinyurl.com/6d8t3). It's being used for a game to generate...
40
by: Spiros Bousbouras | last post by:
Do you have an example of an implementation where sizeof(short int) does not divide sizeof(int) or sizeof(int) does not divide sizeof(long int) or sizeof(long int) does not divide sizeof(long long...
0
by: bearophileHUGS | last post by:
This may be interesting for Python developers of the random module, "SIMD-oriented Fast Mersenne Twister (SFMT): twice faster than Mersenne Twister": ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.