#!/bin/bash # NOTE: Lines starting with "#SBATCH" are valid SLURM commands or statements, # while those starting with "#" and "##SBATCH" are comments. Uncomment # "##SBATCH" line means to remove one # and start with #SBATCH to be a # SLURM command or statement. #SBATCH -J slurm_job #Slurm job name # Set the maximum runtime, uncomment if you need it ##SBATCH -t 48:00:00 #Maximum runtime of 48 hours # Enable email notificaitons when job begins and ends, uncomment if you need it ##SBATCH --mail-user=user_name@ust.hk #Update your email address ##SBATCH --mail-type=begin ##SBATCH --mail-type=end # Choose partition (queue) "gpu" #SBATCH -p gpu # To use 24 cpu cores in a node, uncomment the statement below ##SBATCH -N 1 -n 24 # To use 24 cpu core and 4 gpu devices in a node, uncomment the statement below ##SBATCH -N 1 -n 24 --gres=gpu:4 # Setup runtime environment if necessary # Or you can source ~/.bashrc or ~/.bash_profile source ~/.bash_profile # Go to the job submission directory and run your application cd $HOME/apps/slurm ./your_gpu_application