Dear All, Is the following expected behaviour?
set.seed(1) library(parallel) cl = makeCluster(5) clusterSetRNGStream(cl, iseed = NULL) parSapply(cl, 1:5, function(i) sample(1:10, 1)) # 7 4 2 10 10 clusterSetRNGStream(cl, iseed = NULL) # 7 4 2 10 10 parSapply(cl, 1:5, function(i) sample(1:10, 1)) stopCluster(cl) The documentation could be read either way, e.g. * iseed: An integer to be supplied to set.seed, or NULL not to set reproducible seeds. >From Details .... optionally setting the seed of the streams by set.seed(iseed) (otherwise they are set from the current seed of the master process: after selecting the L'Ecuyer generator). As may be guessed, this caught me out, since I was expecting the same behaviour as set.seed(NULL). Thanks Colin ---------- R version 3.6.0 (2019-04-26) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 18.04.2 LTS ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel