Consider the following scenario: I want to perform a large Monte Carlo simulation across a compute cluster with several nodes. To avoid excessive transmission of data, I am going to generate random data for my simulation on the individual nodes. Using Python, I would like to do this using numpy.random
functions.
I need to ensure that the individual nodes generate different random data (if they generate the same they will just be replicating each other's work). I can do this by selecting different seeds for the RNGs on the individual nodes. But how do I select these seeds to ensure that the resulting random number sequences do not accidentally intersect somewhat across different nodes?
If I simply generate random seed numbers for my compute nodes on one node submitting the workloads to the compute nodes, I could theoretically end up in the situation where the compute nodes generate random number sequences that intersect somewhat in the RNGs' space of possible random number sequences, attempted illustrated here:
node 1 |-------************----------------------------------------------|
node 2 |----------------------------------************-------------------|
node 3 |---************--------------------------------------------------|
The ***
s illustrate the sequence of random numbers generated by each node and their starting point is given by the (randomly generated) seed given to each of them at the beginning of their work. I realise that the space of possible random number sequences is probably enormous and the probability of this happening is probably quite low, but how do I ensure that it cannot happen (assuming that the nodes' collective demand for random numbers does not exhaust the space fo possible random sequences)?