470,591 Members | 1,571 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,591 developers. It's quick & easy.

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 2282
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

31 posts views Thread by Scott Robert Ladd | last post: by
4 posts views Thread by Skybuck Flying | last post: by
2 posts views Thread by Martin Ho | last post: by
11 posts views Thread by Simon | last post: by
reply views Thread by bearophileHUGS | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.