sbatch templates¶
Two starter scripts live in generic_template/ — copy, rename, customize.
CPU + conda¶
generic_template/conda.sh
#!/bin/bash
#SBATCH --job-name=job_name
#SBATCH --partition=highmem_p
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=2
#SBATCH --time=120:00:00
#SBATCH --mem=480gb
#SBATCH --mail-user=youremail@uga.edu
#SBATCH --mail-type=BEGIN,END,FAIL
#SBATCH --output=%x.%j.out
#SBATCH --error=%x.%j.err
cd "$SLURM_SUBMIT_DIR"
ml Miniconda3
eval "$(conda shell.bash hook)"
conda activate env_name
echo "get things done"
When to use: any non-GPU work that relies on a conda env. Defaults to highmem_p with 480 GB memory — tune down for smaller jobs.
Single GPU¶
generic_template/gpu.sh
#!/bin/bash
#SBATCH --job-name=job_name
#SBATCH --partition=batch
#SBATCH --gres=gpu:V100:1 # V100/P100 from batch OK if <4h; else use gpu_p
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=8
#SBATCH --mem=32gb
#SBATCH --time=4:00:00
#SBATCH --output=%x.%j.out
#SBATCH --error=%x.%j.err
#SBATCH --mail-type=END,FAIL
#SBATCH --mail-user=youremail@uga.edu
cd "$SLURM_SUBMIT_DIR"
date
echo "do GPU stuff"
When to use: any GPU workload under 4 hours. Requests V100 from the batch partition (allowed for <4h jobs). For longer runs or bigger GPUs, switch to gpu_p or gpu_30d_p and specify --gres=gpu:A100:1 / L4:1 / H100:1.
Conventions used across the repo¶
- Shebang:
#!/bin/bash(never#!/bin/sh— sbatch scripts often need bash features) - Log files:
%x.%j.out/%x.%j.errpattern —%xis the job name,%jthe job ID - Email placeholder:
youremail@uga.edu— replace with your own before submitting cd "$SLURM_SUBMIT_DIR"near the top so relative paths in the script behavesource activate envinside sbatch, neverconda activate(why)
Right-size resources before submitting¶
Check before you ask
Over-requesting wastes queue priority. After a test run, seff <jobID> shows actual memory / CPU usage — tune the next submission from real numbers, not round-number guesses.
Full QOS + GPU hardware tables live in the Claude Code ruleset.