CU e-Science HTC-HPC Cluster and Cloud
  • CU e-Science HTC-HPC Cluster and Cloud
  • Introduction to our cluster
    • Our resources
    • Registration
    • Login to our cluster
    • Disk space
    • Acknowledgement and Publication
  • Slurm
    • 101: How to submit Slurm batch jobs
    • 101: Interactive jobs with Slurm
    • Basic Slurm commands
    • QoS and Partition
    • Job priority
    • Available complier and software
    • Examples
      • Simple C, C++, Python program
      • Python with VirtualEnv
      • How do I submit a large number of very similar jobs?
      • CMSSW
      • R
      • Mathematica
      • Message Passing Interface (MPI)
  • Kubenetes
    • Under construction!
Powered by GitBook
On this page

Was this helpful?

  1. Slurm
  2. Examples

R

First, we create example.R.

library(datasets)
data(iris)
summary(iris)

To run in batch mode, you may use

R CMD BATCH --no-restore --no-save example5.R  myoutput.txt

Here is an example of the submission script:

#!/bin/tcsh
#
#SBATCH --qos=cu_htc
#SBATCH --partition=cpugpu
#SBATCH --job-name=example5
#SBATCH --output=example5_log.txt
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --time=00:10:00
#SBATCH --cpus-per-task=1
#SBATCH --mem-per-cpu=2G

module purge

R CMD BATCH --no-save --no-restore example5.R example5_output.txt
PreviousCMSSWNextMathematica

Last updated 3 years ago

Was this helpful?