...
Example Jobscripts
The following are some brief examples of requesting GPUs via Slurm batch scripts on Setonix. For more detail, refer to Example Slurm Batch Scripts for Setonix on GPU Compute Nodes.
Column |
---|
|
Code Block |
---|
language | bash |
---|
theme | Emacs |
---|
title | Example 1 : One processes with a single GPU using shared node access |
---|
linenumbers | true |
---|
| #!/bin/bash --login
#SBATCH --account=project-gpu
#SBATCH --partition=gpu
#SBATCH --ntasks=1
#SBATCH --ntasks-per-node=1
#SBATCH --cpus-per-task=8
#SBATCH --gpus-per-task=1
#SBATCH --time=24:00:00
srun -c 8 --gpu-bind=closest ./program |
Code Block |
---|
language | bash |
---|
theme | Emacs |
---|
title | Example 1 2 : One process with a eight GPUs using exclusive node access |
---|
linenumbers | true |
---|
| #!/bin/bash --login
#SBATCH --account=project-gpu
#SBATCH --partition=gpu
#SBATCH --ntasks=1
#SBATCH --ntasks-per-node=1
#SBATCH --gpus-per-task=8
#SBATCH --time=24:00:00
#SBATCH --exclusive
srun -c 8 --gpu-bind=closest ./program |
Code Block |
---|
language | bash |
---|
theme | Emacs |
---|
title | Example 1 3 : Eight processes each with a single GPU using exclusive node access |
---|
linenumbers | true |
---|
| #!/bin/bash --login
#SBATCH --account=project-gpu
#SBATCH --partition=gpu
#SBATCH --ntasks=8
#SBATCH --ntasks-per-node=8
#SBATCH --gpus-per-task=1
#SBATCH --time=24:00:00
#SBATCH --exclusive
srun -c 8 --gpu-bind=closest ./program |
|
...