KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I was doing some parallel simulations in R and I notice that the seed is not changed when the "L'Ecuyer-CMRG" rng is used. I was reading the book "Parallel R", and the option mc.set.seed = TRUE should give each worker a new seed each time mclapply() is called. Here is my code: library(parallel) RNGkind("L'Ecuyer-CMRG") mclapply(1:2, function(n) rnorm(n), mc.set.seed = TRUE) [[1]] [1] -0.7125037 [[2]] [1] -0.9013552 0.3445190 mclapply(1:2, function(n) rnorm(n), mc.set.seed = TRUE) [[1]] [1] -0.7125037 [[2]] [1] -0.9013552 0.3445190 EDIT: same thing happens both on my desktop and on my laptop (both Ubuntu 12.04 LTS).
Tags (comma-separated)
Save Edits
Cancel