Bash R on Oracle Grid Engine (JHPCE)

I recently link posted on submitting Stata jobs to a Linux computing cluster running the Oracle Grid Engine. Here’s a quick post on how to submit a R job.

I usually submit a qsub job by writing qsub Scripts/NAME_OF_SCRIPT into terminal. My R scripts use the following naming convention: R<PROJECT>_v<NUM>.sh or for a R bash file to run the v1 R script in the 018 project (I explain my project organization in another post). The command qsub Scripts/ will read the follow script.

#!/bin/bash -l

#$ -pe local 1
#$ -l mem_free=20G
#$ -l h_vmem=22G
#$ -m e
#$ -M
#$ -o ofiles
#$ -e efiles

R CMD BATCH ~/ERGOT/000_workspace/018_pump/try_med.R \

Please refer to my previous post to learn more about the qsub options in the lines that start with #$.

Now the the single R line. I usually submit from my work root file so here I write out the full paths to the R file and then provide R with where I want the log file output. Note that the \ could be removed and the two lines combined. That’s it!

Here’s a gist.

comments powered by Disqus