#!/bin/bash

#SBATCH -J test               # Job name
#SBATCH --partition normal    # Job queue
#SBATCH -o job.%j.out         # Name of stdout output file (%j expands to jobId)
#SBATCH -N 1                  # Number of nodes
#SBATCH -n 1                  # Number of MPI tasks
#SBATCH -t 00:03:00           # Run time (hh:mm:ss) - 3 minutes

# setting up (example)
module load gnu8 
module load  R/3.6.1

# preprocessing 
# …
# print out some info for the logs

echo “Current directory $(pwd)”
echo “Starting: $(date)”

ls -l

# actual computational intensive step
# Launch serial executable:

Rscript hello.R # or R CMD BATCH hello.R 

# post processing / cleaning up

echo “Job complete: $(date)”

