Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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
width900px


Code Block
languagebash
themeEmacs
titleExample 1 : One processes with a single GPU using shared node access
linenumberstrue
#!/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
languagebash
themeEmacs
titleExample 1 2 : One process with a eight GPUs using exclusive node access
linenumberstrue
#!/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
languagebash
themeEmacs
titleExample 1 3 : Eight processes each with a single GPU using exclusive node access
linenumberstrue
#!/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 


...