R: Difference between revisions

Jump to navigation Jump to search
697 bytes added ,  7 years ago
running
(RMPI installation)
(running)
Line 82: Line 82:
}}
}}


==== Rmpi ==== <!--T:16-->
=== Rmpi === <!--T:16-->
 
====Installing====
Below is the procedure to install [https://cran.r-project.org/web/packages/Rmpi/index.html Rmpi], an interface (wrapper) to MPI routines, which allow R to run in parallel.
Below is the procedure to install [https://cran.r-project.org/web/packages/Rmpi/index.html Rmpi], an interface (wrapper) to MPI routines, which allow R to run in parallel.


Line 111: Line 113:


This will use the default version of MPI to perform the install, which is currently 2.1.1.
This will use the default version of MPI to perform the install, which is currently 2.1.1.
====Running====
Please your R code in a script file, in this case mpi_test.R.
Give the file executable permissions with:
chmod u+x rmpi_test.R
Then place the following in a job submission script, job.sh :
#!/bin/bash
#SBATCH --account=def-ppomorsk
#SBATCH --ntasks=4              # number of MPI processes
#SBATCH --mem-per-cpu=1024M      # memory; default unit is megabytes
#SBATCH --time=0-01:00          # time (DD-HH:MM)
module load r/3.4.0
export R_LIBS=~/local/R_libs/
srun Rscript rmpi_test.R
Finally, submit the job with:
sbatch job.sh
For more on submitting jobs, see the [https://docs.computecanada.ca/wiki/Running_jobs#MPI_job Running jobs] page.


</translate>
</translate>
cc_staff
239

edits

Navigation menu