I'm running a simulation on R and a cluster of computers and have the following problem. On each of X computers I run:
fxT2 <- function(i) runif(10)
nessay <- 100
c(mclapply(1:nessay, fxT2), recursive=TRUE)
There are 32 computers, each with 16 cores. However, around 2% of the random numbers are identical. What strategies would you adopt to avoid this?
I've been able to avoid this problem for fxT2 by setting a latency (i.e. delaying by a sec the time at which each job is send to each of the X computers). But it's seems very ad-hoc to fxt2.
The problem is that in reality fxT2 is a long task involving pseudo random numbers. At the end of the process, I expect to get X*nessay reproduction of the same statistical experiment, not nessay reproductions. How to make sure that this is indeed the case and is there a way to check this?.