/usr/lib/R/site-library/snow/RMPISNOWprofile is in r-cran-snow 1:0.4.2-1.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | library(Rmpi)
library(snow)
.MPIrun <- function()
{
if (mpi.comm.rank(0) > 0){
sys.load.image(".RData",TRUE)
.First.sys()
sink(file="/dev/null")
slaveLoop(makeMPImaster())
mpi.quit()
}
else {
makeMPIcluster()
.Last <<- function(){
cl <- getMPIcluster()
if (! is.null(cl))
stopCluster(cl)
mpi.quit()
}
}
}
.MPIrun()
|