R and Rmpi

Revision as of 14:54, 8 July 2016 by Botto (talk | contribs) (Created page with "== Description == ''From the R Project Home Page:'' '''R''' is a free software environment for statistical computing and graphics. R provides a wide variety of statistical (l...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

From the R Project Home Page: R is a free software environment for statistical computing and graphics. R provides a wide variety of statistical (linear and nonlinear modelling, classical statistical tests, time-series analysis, classification, clustering, …) and graphical techniques, and is highly extensible.

Rmpi is a package that provides MPI bindings for the R programming language. In much the same way parallel code is written in other languages such as C or Fortran, R codes can run in parallel across multiple processors or nodes.

Version

  • R: 3.1.2
  • Rmpi: 0.6-5

Installed Packages

  • ada 2.0-3
  • Bioconductor 3.0
  • BRugs 0.8-1
  • caret 6.0-41
  • cluster 1.15.3
  • coda 0.16-1
  • dmt 0.8.20
  • e1071 1.6-4
  • foreach 1.4.2
  • iterators 1.0.7
  • plyr 1.8.1
  • R2OpenBUGS 3.2-2.2
  • reshape2 1.4.1
  • rgdal 0.9-1
  • rjags 3-14
  • sp 1.0-17
  • stringr 0.6.2

Authorized Users

  • CIRCE account holders
  • RRA account holders
  • SC account holders

Platforms

  • CIRCE cluster
  • RRA cluster
  • SC cluster

Modules

R and Rmpi requires the following module file to run:

  • apps/R/3.1.2

Running R and Rmpi on CIRCE

The R and Rmpi user guide is essential to understanding the application and making the most of it. The guide and this page should help you to get started with your simulations. Please refer to the Documentation section for a link to the guide.

  • Note on CIRCE: Make sure to run your jobs from your $WORK directory!
  • Note: Scripts are provided as examples only. Your SLURM executables, tools, and options may vary from the example below. For help on submitting jobs to the queue, see our SLURM User’s Guide.

Prepare your R Environment

Copy this file to /path/to/job/directory/.Rprofile to allow Rmpi jobs to work, e.g.:

cp /apps/R/3.1.2/share/Rprofile $WORK/rmpi_test/.Rprofile

Submitting a Job

A sample submit script is listed below. If, for example, you have an R input file named r-test.R, you would set up a submit script like this:

  • The script below (for testing, name it “r-test.sh”) can be copied into your job directory (the folder with your input files) and modified so that you can submit batch processes to the queue.
#!/bin/bash
#
#SBATCH --comment=r-test
#SBATCH --ntasks=4
#SBATCH --job-name=r-test
#SBATCH --output=output.%j.r-test
#SBATCH --time=01:00:00

#### SLURM 4 processor R test to run for 1 hour.

module purge
module add apps/R/3.1.2

mpirun Rmpi r-test.R

 
Next, you can change to your job’s directory, and run the sbatch command to submit the job:

[user@login0 ~]$ cd my/jobdir
[user@login0 jobdir]$ sbatch ./r-test.sh
  • You can view the status of your job with the “squeue -u <username>” command

Documentation

Home Page, User Guides, and Manuals

Benchmarks, Known Tests, Examples, Tutorials, and Other Resources

More Job Information

See the following for more detailed job submission information:

Reporting Bugs

Report bugs with R and Rmpi to the IT Help Desk: rc-help@usf.edu