Using Scratch and Environment Variables
#! /bin/bash
#SBATCH --partition=TC
## -p partition_name (also works, see documentation for other alternatives)
#SBATCH --job-name=Irules-mpitest
# SBATCH --error=Irules-mpitest_%j.err
#SBATCH --output=/scratch/siegelj/Irules-mpitest_%j.out
## Writing the output to my scratch directory
#SBATCH --time=00:00:05
## 05 is an arbitrary limit for this course.
#SBATCH --mem=1G
## --mem memory required per node
#SBATCH --ntasks=3
#SBATCH --nodes=3
#SBATCH --ntasks-per-node=1
export mpiMethod=$2
export mpiCount=$3
mpirun ./$1
exit 0