I need to call source on a snow cluster to re-eval some functions. The call to clusterCall() I’m using doesn’t work:
cl = makeSOCKcluster(rep("localhost", 5))
> clusterCall(cl, getwd)
[[1]]
[1] "/home/user"
[[2]]
[1] "/home/user"
[[3]]
[1] "/home/user"
[[4]]
[1] "/home/user"
[[5]]
[1] "/home/user"
> clusterCall(cl, source, 'ets.load.R')
Error in checkForRemoteErrors(lapply(cl, recvResult)) :
5 nodes produced errors; first error: cannot open the connection
I’ve found the problem, had to set the correct working directory first, or specify ets.load.R with its absolute path: