The sbatch program takes many arguments to specify resource needs, job options, outputs, and. notifications.

Below you see a simple header which also sets a few options.

#!/bin/bash
#SBATCH --mail-user=<YOUR_EMAIL>@uams.edu        #<---- Email address to notify
#SBATCH --mail-type=ALL                          #<---- Status to notify the email
#SBATCH --job-name=YourJobName                   #<---- Name of this job
                                       			 #<---- Commands below this point will be run on the assigned node
<< Your compute job scripts go here >>

Once this script is created it can be run by passing it to the sbatch program. 

sbatch YourComputeJobSubmission.slurm

After this job has finished there will now be a file named slurm-#####.out in your home directory which will contain any output that would normally have been printed to STDOUT

Monitoring Jobs 

Often you will want to monitor longer running jobs. The program squeue will show you all the jobs running and queued on the cluster.

squeue


The sacct program will print the full status of any job both running and completed with metrics about that job. (Job number was displayed when you submitted it with sbatch)

sacct -all -j <JobNumber> 
  • No labels