Monte-Carlo PI on cluster

132 views Asked by At

So, I'm designing a Monte-Carlo PI simulation on a GPU cluster.

Currently, I choose one random number generator algorithm, say XorShift7. And due to the algorithm limitation, for one seed, it can generates only 2^32 numbers, since it is a 32bit algorithm, and the sequence will repeat after 2^32 numbers. I let each cluster worker calculate a part of the whole sequence, and then reduce them.

The question is, I want to enlarge the random numbers. My idea is, I want to use multiple random number sequences, with different algorithm and different seed, for example:

cluster worker1: calc XorShift7(seed=0) from number0 to number2^31
cluster worker2: calc XorShift7(seed=0) from number2^31 to number2^32
cluster worker3: calc XorShift7(seed=1) from number0 to number2^31
cluster worker4: calc XorShift7(seed=1) from number2^31 to number2^32
cluster worker5: calc Mrg32k3a(seed=0) from number0 to number2^31
cluster worker6: calc Mrg32k3a(seed=0) from number2^31 to number2^32
cluster worker7: calc Mrg32k3a(seed=1) from number0 to number2^31
cluster worker8: calc Mrg32k3a(seed=1) from number2^31 to number2^32

Then I average the value of the 8 results from the 8 workers.

My question is, will this break the random number properties from a statistic perspective?

0

There are 0 answers