Submitting jobs - melisakman/Helianthus GitHub Wiki

On the cluster we submit jobs through a slurm protocol that manages job queues. There are many examples in the shells folder that you can explore. The regular slurm script looks like this:

#!/bin/bash 
#SBATCH -D yourWorkingDirectory
#SBATCH -J jobName
#SBATCH --partition=vector
#SBATCH --qos=vector_batch
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=6
#SBATCH --mem=16000
#SBATCH --time=16:00:00
#SBATCH -o outDirectory/jobName.out
#SBATCH -e outDirectory/jobName.err
#SBATCH --mail-user=yourMailAddress
#SBATCH --mail-type=All

module load yourProgram 

srun yourjob

You will have a text similar to this on a txt file that has the extension ".sh". This is the file format that slurm recognizes and uses. When you have your script ready you could either scp of use git (I hope you do use git) to transfer them to the cluster home folder. Of course you could create this file also on the cluster itself but I find that to be more troublesome. And after you have your file you simply do:

$ sbatch yourScript.sh

This will submit your job on the batch queue and hopefully it will start some time after you submit it. You can check the status of your job with:

$ squeue -u UserName This gives you some information on your job such as its ID, how long it has been running for, which node it is using etc.

You can cancel your job with:

$ scancel YourJobID This job ID is in the first column in your job status and is also printed when you sbatch your jobs.