Batch jobs are the most common jobs. Usually, these jobs run applications for long periods without user interaction, so they run autonomously once the resources are available.
The instructions are detailed below.
Via shell script
Write down your shell script for submitting your job. You can use your favourite terminal editor, for example VIM or GNU nano:
vim submit.slm
The submit script has the following structure:
- SHEBANG (#!/bin/bash)
- #SBATCH directives for SLURM.
- Load the required modules (module load <module>).
Execute the program (srun <program>).
If you have problems creating your script, you can use the Job Script Generator [old] or one of the many examples for the different applications.
Finally, submit the script to the batch system using the sbatch command:
sbatch submit.slm
Related articles