[R-sig-hpc] parallel random numbers: set.seed(i), rsprng, rlecuyer, ??
Dirk Eddelbuettel
edd at debian.org
Thu Jun 17 15:57:30 CEST 2010
It is a genuine issue, but it is also taken care of automagically if you use
the snow package. See ?clusterSetupRNG:
snow-rand package:snow R Documentation
Uniform Random Number Generation in SNOW Clusters
Description:
Initialize independent uniform random number streams to be used in
a SNOW cluster. It uses either the L'Ecuyer's random number
generator (package rlecuyer required) or the SPRNG generator
(package rsprng required).
Usage:
clusterSetupRNG (cl, type = "RNGstream", ...)
clusterSetupRNGstream (cl, seed=rep(12345,6), ...)
clusterSetupSPRNG (cl, seed = round(2^32 * runif(1)),
prngkind = "default", para = 0, ...)
[...]
The "if in doubt, try standing on the shoulder of giants" approach ...
--
Regards, Dirk
More information about the R-sig-hpc
mailing list