Purpose: Statistics and plotting
Latest version: 4.0.2
License: (tick) Free of use
                 Open Source - GNU GPL _ext-link
Website: https://www.r-project.org/ _ext-link

R is a language and environment for statistical computing and plotting.

R implements tools for data analysis, array operators (especially matrices), I/O features, graphical output features, and a high-level language (S) for integrating all of them, including user-defined variables, loops, etc.

SLURM Submit script example


For more information use the Job Script Generator.


R_example.slm
#!/bin/bash
#SBATCH -J R_example
#SBATCH -e R_example.err
#SBATCH -o R_example.out
#SBATCH -p std
#SBATCH -n 1
#SBATCH -t 0-02:00

module load apps/R/3.5.0
 
##
#  Modify the input and output files!
INPUT_FILE=R_example.R
OUTPUT_FILE=R_example.out
 
##
#  You don't need to modify nothing more
cp -r ${SLURM_SUBMIT_DIR}/${INPUT_FILE} ${SCRATCH}
cd ${SCRATCH}
 
srun Rscript ${INPUT_FILE} > ${OUTPUT_FILE}
 
cp ./${OUTPUT_FILE} ${SLURM_SUBMIT_DIR}

Sbatch options:

The options shown in the example are detailed below. For more information and a more comprehensive list of available options, see the sbatch command page.

  • -J: Name for the job's allocation.
  • -e: Name of the stderr redirection filename.
  • -o: Name of the stdout redirection filename.
  • -p: Name of the partition (queue) where the job will be submitted.
  • -n: Number of tasks.

  • -c: Number of cores per task.
  • -t: Set the job's time limit. If the job don't finish before the time runs out, it will be killed.




  • No labels