next up previous
Next: Parallel Algorithm using Up: Parallel Random Number Previous: Requirements for a

Parallel Algorithm using Leapfrog

A simple way of generating a sequence of random numbers in parallel is for processor P of an N processor machine to generate the sub-sequence , ..., so that the sequence is spread across processors. This is known as the leapfrog technique.

Multiplicative LCGs are mathematically simple enough that we can calculate analytically an arbitrary element in the sequence, by recursively applying equation gif:

 

Thus moving through the sequence with stride N, rather than 1, is simply accomplished by specifying a different multiplier and additive constant for the generator on each processor. Note this will give the same results for any number of processors.



Paul Coddington, Northeast Parallel Architectures Center at Syracuse University, paulc@npac.syr.edu