[R] inconsistency in parallel processing in R.....

akshay kulkarni @k@h@y_e4 @ending from hotm@il@com
Fri Jun 15 13:18:38 CEST 2018


dear members,
                             I am using the "parallel" package in R. I am using the following function to automate the process of starting the cluster(the function is named preparePP):

function (vte) {
                nc <- detectCores()
                cl <- makeCluster(nc)
                clusterExport(cl,vte)
                clusterEvalQ(cl,{ld.packages()})


}
<bytecode: 0x0b787508>

vte is the character vector of variables to be exported and ld.packages is the function that loads all the required packages.

However, when I run the  preparePP function at the beginning of the session, it frequently throws up the following error:

Error in summary.connection(connection) : invalid connection

Sometimes the function stands but othertimes it throws up the above error. But when I run the individual functions of preparePP independently at the R console, the cluster object "cl" stays put for the whole session( parLapply works all the time it is called):

> nc <- detectCores()
> cl <- makeCluster(nc)
> clusterExport(cl,vte)
> clusterEvalQ(cl,{ld.packages()})

What is wrong with preparePP?

very many thanks for your time and effort.....

yours sincerely,
AKSHAY M KULKARNI







	[[alternative HTML version deleted]]



More information about the R-help mailing list