First, let’s get on the cluster


Basic Unix commands (1 of 2)


Basic Unix commands (2 of 2)


Exercise

  1. Get onto enigma and qrsh to get onto a node
  2. List the files in your home directory (that’s where you are)
  3. Create a new directory called “BST753” within your home directory
  4. Copy a file from your home directory into BST753
  5. Go into BST753 and look at the files
  6. Go back to your home directory

Working Interactively in R


Submitting batch jobs

  1. Get on enigma
  2. Go to the directory where your code is using cd path/to/code
  3. Create a “shell script” that will run your R code using emacs -nw shellscriptname.sh
  4. Write shell script (next slide)
  5. Exit emacs and save file by typing Ctrl-X Ctrl-C then y
  6. Submit job by typing qsub shellscriptname.sh

Shell script

#!/bin/sh
#$ -cwd 
#$ -l mf=40G,h_vmem=40G,h_fsize=10G 
#$ -m e -M youremail@jhsph.edu

R CMD BATCH --no-save --no-restore Rfilename.R

Additional Resources