Skip to content

Submitting Rmpi Jobs With Torque

This script is an example of launching individual Rmpi jobs on the Kennesaw State HPC Cluster.

Torque Shell Script

run_Rmpi.pbs
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#!/usr/bin/bash
#PBS -l nodes=2:ppn=32
#PBS -l walltime=100:00:00
#PBS -m abe
#PBS -M netid@kennesaw.edu (1)

JOBID=$( echo ${PBS_JOBID} | cut -f1 -d. )

module load R

cd ${PBS_O_WORKDIR}

mpiexec --quiet R --slave --file=${FILE} > ${FILE}.${JOBID}
  1. 🙋‍♂️ Make sure to change netid@kennesaw.edu on this line to your KSU email address or you won't receive emails when the job starts and stops.

Usage

Assuming you saved the Torque script from above as run_Rmpi.pbs, and the name of your Rmpi script is mpi_script.R, you can submit your Rmpi job with the following command:

[barney@hpc ~]$ qsub run_Rmpi.pbs -vFILE=${PWD}/mpi_script.R