Simple Job¶
Every SLURM job consists of a job submission file. A job submission file contains a list of commands that run your program and a set of resource requests, such as nodes, walltime, and queue/account requests.
The resource requests can appear in the job submission file, or they can be specified at submit time.
This simple example submits the job submission file hello.sub to the standby queue on Gilbreth and requests a single node.
Example Job Submission File¶
Create a file named hello.sub:
On Gilbreth, specifying the number of GPUs requested per node is required.
Submit the Job¶
Submit the job with sbatch:
Example output:
For a real job, you would replace:
with a command, or sequence of commands, that runs your program.
Check the Output File¶
After your job finishes running, the ls command will show a new .out file in your directory:
Example output:
The file slurm-3521.out contains the output and errors your program would have written to the screen if you had typed its commands at a command prompt.
View the output file with:
Example output:
You should see the hostname of the compute node your job was executed on, followed by the Hello World statement.