Print

Print


Students,

During our last class, you may remember Sean and I discussing different possible ways to run R on Tusker or Crane. Based on some subsequent discussions, I just wanted to let you know of one other possible way. Below is a shell script file that can be used with SLURM:  

#!/bin/sh
#SBATCH --ntasks-per-node=1
#SBATCH --nodes=1
#SBATCH --time=00:01:00
#SBATCH --mem-per-cpu=1024
#SBATCH --job-name=Test
#SBATCH --error=Hello_worldRscript.stderr
#SBATCH --output=Hello_worldRscript.stdout
 
module load R/3.1
Rscript Hello_world.r
 
By using Rscript, the output from R is directed to Hello_worldRscript.stdout. This “perhaps” may be more convenient because one less file is created. 

Chris