I have downloaded an R script from the web that says that it "must be run in an MPI environment". Now I know literally nothing of MPI, except for that it is used for parallel computing, and it is rather hard to find a simple tutorial on how to set it up and use it.
Can someone give me a simple, step-by-step guide on what I should install to run this, how I should do this, and how I can run the script?
Thanks in advance.
Edit, here is what I tried:
- I installed Microsoft MPI
- I installed and loaded the RMpi package in R
Specific Problems:
> # number of available slots is passed via environment variable
> slots <- as.integer(Sys.getenv("NSLOTS"))
gives NA_integer_
.
In case I use the following (i.e. I replace Sys.getenv("NSLOTS") with some scalar)
> slots <- as.integer(4)
> cl <- snow::makeMPIcluster(slots)
I get the error
Error in mpi.comm.spawn(slave = mpitask, slavearg = args, nslaves = count, : Other MPI error, error stack: MPI_Comm_spawn(cmd="C:/PROGRA~1/R/R-31~1.0/bin/Rscript.exe", argv=0x0000000009A12CA8, maxprocs=4, MPI_INFO_NULL, root=0, MPI_COMM_SELF, intercomm=0x000000000A2FF8B0, errors=0x00000000100E3C70) failed Function not implemented
So I suspect that I did not properly configure my MPI environment.
parallel
package. See the vignette here. – Parrishparallel
indeed, so I installed that package in R. What MPI package should I exactly install on my system? Is that Open MPI? I saw on the website that you can only download sometar.gz
file, how do I install that? Are there other things than that which I need to do as well? Thanks again :)! – IntensityNSLOTS
is an environment variable set by Sun Grid Engine to the number of slots granted. You are not running under SGE, therefore the environment variable is not present. MS MPI does not implement the MPI-2.0 process management functions, therefore the error message. You should search for a different MPI implementation - I can't help in you in that respect unfortunately as I myself don't use MPI on Windows. – Kutch