“Wimmy Wham Wham Wozzle!“
SLURM is a workload manager that performs the complex job of coordinating efficient and fair access to computational nodes.
Carbonate, BigRed3, eventually Quartz
Job handler consistency among all IU’s supercomputers.
April 12, 2021
Users of Carbonate, BigRed3, and Quartz supercomputers.
KB offers a very useful, detailed guide to everything SLURM- related here. Below is the TLDR version.
Converting your Scripts
To assist you in converting your job scripts from Torque to Slurm, HPC Everywhere offers a handy script converter. Just be sure to give your converted script a once-over before testing it in the queue.
Research Technologies provides a Slurm debug partition on Carbonate for testing converted job scripts. Submit your test script to the debug partition using the ‘-p debug‘ argument to sbatch.
sbatch -p debug test.job
Common Commands Translation
|Command Function||Torque Command||Slurm Command|
|Submit a job||
|Monitor job status information||
|Stop a queued or running job||
|Start an interactive job||
You can get more detailed information about each of these commands by entering the command name preceded by ‘man‘ (e.g. man srun) on Carbonate.
SLURM Job Script
#!/bin/bash #read script using Bash command interpreter- don't leave this line out! #SBATCH -J job_name #job name #SBATCH -p general #submit to the general partition #SBATCH -o filename_%j.txt #output file name (%j is replaced by job ID) #SBATCH -e filename_%j.err #standard error file name (%j is replaced by job ID) #SBATCH --mail-type=ALL #send email for ALL, BEGIN, END, or FAIL #SBATCH --email@example.com #the email address for job-related emails #SBATCH --nodes=1 #number of requested nodes #SBATCH --mem=128gb #memory per node #SBATCH --ntasks-per-node=1 #number of tasks per node #SBATCH --time=02:00:00 #requested time #load modules module load modulename #path to your working directory cd full/path/to/your/directory #commands to execute in following lines
We recommend you keep a ‘Run Template’ in a readily accessible location, like home, so that you don’t have to re-create a job script from scratch. To do this, follow these simple steps.
Copy the job template above and personalize it as needed:
Then every time you want to create a new job script:
cp ~/RunTemplate new.job
Submit a job script:
Start an interactive job with 6 cores for 2 hours of wall time in the general partition:
srun -p general -N 1 --ntasks-per-node=6 --time=02:00:00 --pty bash
View pending jobs:
squeue -u username -p general -t PENDING