#!/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 matlabjob #Slurm job name # Set the maximum runtime, uncomment if you need it ##SBATCH -t 72:00:00 #Maximum runtime of 72 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), for example, choose "standard" #SBATCH -p standard # To use 1 node and 24 cores for the parallel computing toolbox, uncomment the statement below ##SBATCH -N 1 -n 24 # To use 24 cpu cores and 4 gpu devices, uncomment the statement below # Note that if choose to use gpu devices, must choose partition "gpu", e.g, #SBATCH -p gpu ##SBATCH -N 1 -n 24 --gres=gpu:4 # Suppose you have the matlab script, e.g, myapp.m # Run the Matlab matlab -nodisplay < myapp.m > output.txt