From 8c491ad0e3e303cb23623d707a68d6af8d0dc6e2 Mon Sep 17 00:00:00 2001 From: Zach Williams Date: Fri, 19 Aug 2022 19:16:57 -0500 Subject: [PATCH] Initial commit of cluster batch job script --- cluster/sim.sbatch | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 cluster/sim.sbatch diff --git a/cluster/sim.sbatch b/cluster/sim.sbatch new file mode 100644 index 0000000..48ec491 --- /dev/null +++ b/cluster/sim.sbatch @@ -0,0 +1,36 @@ +#!/bin/bash +# +############################################################################### +# sim.sbatch +# +# Batch script that runs some number of trials in the simulation and writes out +# the output to disc. +############################################################################### +# +#SBATCH --time=24:00:00 # Job run time (hh:mm:ss) +#SBATCH --nodes=1 # Number of nodes +#SBATCH --ntasks-per-node=16 # Number of task (cores/ppn) per node +#SBATCH --job-name=potential # Name of batch job +#SBATCH --partition=csl # Partition (queue) +##SBATCH --array=1 # Job array indicies +#SBATCH --output=jobarray.o%A_%a # Name of batch job output file +#SBATCH --error=jobarray.e%A_%a # Name of batch job error file +#SBATCH --mail-user=zjw4@illinois.edu # Send email notifications +##SBATCH --mail-type=END # Type of email notifications to send +# +############################################################################### + +# Create a unique directory using the jobid +mkdir -p ${SLURM_SUBMIT_DIR}/${SLURM_ARRAY_TASK_ID} +cd ${SLURM_SUBMIT_DIR}/${SLURM_ARRAY_TASK_ID} + +module load anaconda/2021-May/3 +conda activate dec + +# Q: why is this necessary? +conda init bash +exec $SHELL + +python ../run/analysis.py + +