Writing a SLURM Script
Example SLURM Script
#!/bin/bash
#SBATCH -N 1 (1)
#SBATCH -n 8 (2)
#SBATCH --mem=8g (3)
#SBATCH -J "Example Job" (4)
#SBATCH -p short (5)
#SBATCH -t 12:00:00 (6)
#SBATCH --gres=gpu:2 (7)
#SBATCH -C A100|V100 (8)
module load python # (9)!
python my_script_name.py # (10)!
- Request 1 node for the job
- Request 8 CPU cores
- Request 8 GiB of memory
- Use
Example Job
as the job title
- Use the
short
partition
- Set the maximum time for the job to run. If the job has not completed after this timeout, the job will be killed.
- Request 2 GPUs
- Limit GPUs to the
A100
or V100
types.
- Load the latest stable version of the
python
module. For more information,
see Software.
- Run your script here.