search for: clustersetupsprng

Displaying 2 results from an estimated 2 matches for "clustersetupsprng".

Did you mean: clustersetuprng
2011 Feb 03
1
problem with parLapply from snow
...cat("Using snow package, asking for ", Nnodes, "nodes \n") cl <- makeCluster(Nnodes, type="MPI") on.exit(stopCluster(cl)) #print(do.call("rbind", clusterCall(cl, function(cl) Sys.info()["nodename"]))) # ## uses RSPRNG if there # #clusterSetupSPRNG(cl) clusterSetupRNGstream(cl, seed = rep(123456, 6)) yu <- clusterCall(cl, runif, Nsamples) yusum <- parLapply(cl, yu, sum) print(yusum) yn <- clusterCall(cl, rnorm, Nsamples) print(yn) return() } This is under R-2.12.1. on a windows Xp machine. T...
2008 Mar 05
0
rsprng, snow, rmpi interactions
...ate exactly the same random numbers that it did before; I assume SPRNG assures the streams are independent betweeen processes. Here's what I did, trying to stick within SNOW to avoid trouble (from memory): lamboot start up R library(snow) library(rsprng) library(rmpi) cl<-makeMPIcluster(11) clusterSetupSPRNG(cl, seed=123) clusterEvalQ(cl, source("mycode.R")) r<-parSapply(cl, seq(1000), function(i) doMyThing())) Any comments on that? For example, would sticking to Rmpi and using parSim make sense (I'm not using seq(1000) for anything but getting that many repetitions.)? Both rmpi and...