I use the following code to ...
1. create a parallel cluster
2. source test.R
3. and do some parallel work with functions defined in 'test.R'
library(parallel)
cl <- makeCluster(4)
clusterEvalQ(cl, source("test.R"))
## do some parallel work
stopCluster(cl)
Unfortunately I rely on old packages :-(
One can make use of past snapshots of the CRAN packages using 'checkpoints'
require(checkpoint)
checkpoint("2015-02-28")
My question is ...
how can I make use of the old packages on the Cluster workers?
The following does not work:
library(parallel)
cl <- makeCluster(4)
clusterEvalQ(cl, require(checkpoint)) # 1. load checkpoint package on workers
clusterEvalQ(cl, checkpoint("2015-02-28")) # 2. set the checkponit on workers
clusterEvalQ(cl, source("test.R"))
## do some parallel work
stopCluster(cl)
The command
clusterEvalQ(cl, require(checkpoint))
Returns TRUE. But the second
clusterEvalQ(cl, checkpoint("2015-02-28"))
just hangs. I don't know why the workers hang on that command. Can I somehow look into the worker to see if they are maybe just waiting for user Input or so?