I know this is not a revolution support forum, but as anyone noticed the
following?
I have a foreach loop to generate random samples. If I run the exact code
below in normal r (2.14.1) it works as expected, but if I run it from
revolution 4.2.0 each loop returns the same numbers.
The only way I can get revolution to give different numbers is using 1
instead of 8 in
registerDoSNOW(makeCluster(8, type = "SOCK"))
but that seems to defeat the point.
library(foreach)
library(doSNOW)
registerDoSNOW(makeCluster(8, type = "SOCK"))
getDoParWorkers()
getDoParName()
getDoParVersion()
mySamples <- foreach (jj = 1:4, .combine=cbind) %dopar% {
return(sample(1:10,10,replace=TRUE))
}
mySamples
##########
r 2.14.1
##########
library(foreach)
library(doSNOW)
registerDoSNOW(makeCluster(8, type = "SOCK"))
getDoParWorkers()
####################
# revolution r
####################
library(foreach)
Loading required package: iterators
Loading required package: codetools
foreach: simple, scalable parallel programming from REvolution Computing
Use REvolution R for scalability, fault tolerance and more.
http://www.revolution-computing.com
library(doSNOW)
Loading required package: snow
registerDoSNOW(makeCluster(8, type = "SOCK"))
getDoParWorkers()