User Tools

Site Tools


howto:r

This is an old revision of the document!


Using R

R is installed in /opt/gridware/applications/R/R-2.15.2/ and is compiled using Open-MPI with the GNU compilers so you will need to add

module add openmpi/openmpi-1.6.1-gnu

to your .bashrc file in your home directory.

The rMPI and doMPI packages are already installed to allow R to use MPI to distribute its work across multiple nodes of the cluster.

Once you've created your R script file, called 'job-1.r', you will need to create a job script file to submit to the Moab scheduler.

Example job script file:

#!/bin/bash
#MSUB -l nodes=2:ppn=8
#MSUB -l walltime=1:00:00
#MSUB -V
#MSUB -o /export/home/username/simulations/job-1.out
#MSUB -e /export/home/username/simulations/job-1.err
#MSUB -d /export/home/username/simulations
#MSUB -M be your_emall@address
#MSUB -q 
 
mpirun -np 16 /opt/gridware/applications/R/R-2.12.2/bin/R --slave -f /export/home/username/simulations/job-1.r

Notes:

  • Replace username with your user name.
  • Replace your_emall@address with your email address.
  • And replace simulations with your program's working directory (which should really be on scratch for speed).
  • And change job-1 to be your script file name.
/app/dokuwiki/data/attic/howto/r.1361270948.txt.gz · Last modified: 2021/12/09 16:42 (external edit)