Running Parallel processes in R using the SNOW library package

From Research IT

Jump to: navigation, search

R_LIB should be set to R_LIBS=/opt/devel/POWER/R/R-2.2.1/library

Enter the R environement

R

> library(snow) > cl <- makeCluster(n) - n is number of processors you wnat to use. e.i. cl <- makeCluster(10)


to see what nodes you are using

>do.call("rbind",clusterCall(cl, function(cl) Sys.info()["nodename"]))


to stop the using multiple processors

> stopCluster(cl)

Personal tools