Error in R parallel:Error in checkForRemoteErrors(val) : 2 nodes produced errors; first error: cannot open the connection
问题 I wrote a function to run R parallel, but it doesn't seem to work. The code is ''' rm(list=ls()) square<-function(x){ library(Iso) y=ufit(x,lmode<-2,x<-c(1:length(x)),type="b")[[2]] return(y) } num<-c(1,2,1,4) cl <- makeCluster(getOption("cl.cores",2)) clusterExport(cl,"square") results<-parLapply(cl,num,square) stopCluster(cl) ''' and the error is: Error in checkForRemoteErrors(val) : 2 nodes produced errors; first error: cannot open the connection I think a possible reason is that I used