Newsgroups: comp.parallel.pvm
From: sond0079@horus.sara.nl (J.J.A. Koot)
Subject: Re: Rand number advise on PVM
Organization: SARA
Date: 18 Sep 1995 14:01:57 GMT
Message-ID: <43ju4l$g1d@mira.sara.nl>


|> Simple technique is to use your seed number along with some
|> derivation off of the unique tid of each process and if you want
|> to complicate somewhat - include the time at each process.

I am certainly not an expert on pseudo random numbers, but I can
contribute the following:

The above technique allows different processes having overlapping
sequences of random numbers. This may not be acceptable in some
computations. If the random number generator is a simple linear
congruential one (with a one word seed), then you can do the
following to avoid overlapping sequences:
Let m be the period of the generator. and n the number of parallel
processes requiring about equal numbers of random numbers. Give
the first process an initial seed as usual. It is not very difficult
to immediately compute the random number that would be returned
after m/n calls of the random number generator. Use this as the
initial seed for the second process and repeat the computation for 
all other processes. Each process may take m/n random numbers without
danger of overlapping sequences.

m/n should be checked not to be too small. 

This technique may be more complicated if the random number generator
is of a more sophisticated type (e.g. random pick from an array).

Met vriendelijke groet, Jos Koot
_____________________________________________________________
Jacob J. A. Koot,
Stichting Academisch Rekencentrum Amsterdam,
Postbus 94613, 1090 GP, Amsterdam, Netherlands.
Kruislaan 415, 1098 SJ, Amsterdam, Netherlands.
E-mail: koot@sara.nl         
Telefoon +31 20 5923019 or 5923000.                      
Fax      +31 20 6683167.                        __|__
___________________________________     _________(_)_________
                                              !   !   !

