Reference Documentation
Let's explore how to use the Slurm Batch System to the ATOS HPCF or ECS.
Basic job submission
Access the default login node of the ATOS HPCF or ECS.
Create a directory for this tutorial so all the exercises and outputs are contained inside:
mkdir ~/batch_tutorial cd ~/batch_tutorial
Create and submit a job called
simplest.sh
with just default settings that runs the commandhostname
. Can you find the output and inspect it? Where did your job run?Configure your
simplest.sh
job to direct the output tosimplest-<jobid>.out
, the error tosimplest-<jobid>.err
both in the same directory, and the job name to just "simplest". Note you will need to use a special placeholder for the -<jobid>
.From a terminal session outside the Atos HPCF or ECS your VDI or computer, submit the
simplest.sh
job remotely. What hostname should you use?
Basic job management
Create a new job script
sleepy.sh
with the contents below:sleepy.sh#!/bin/bash sleep 120
Submit
sleepy.sh
to the batch system and check its status. Once it is running, cancel it and inspect the output.Can you get information about the jobs you have run so far today, including those that have finished already?
Can you get information of all the jobs run today by you that were cancelled?
The default information shown on the screen when querying past jobs is limited. Can you extract the submit, start, and end times of your cancelled jobs today? What about their output and error path? Hint: use the corresponding man page for all the options.
Common pitfalls
Reference Documentation
We will now attempt to troubleshoot some issues
Create a new job script
broken1.sh
with the contents below and try to submit the job. What happened? Can you fix the job and keep trying until it runs successfully?Create a new job script
broken2.sh
with the contents below and try to submit the job. What happened? Can you fix the job and keep trying until it runs successfully?Create a new job script
broken3.sh
with the contents below and try to submit the job. What happened? Can you fix the job and keep trying until it runs successfully?
Understanding your limits
Although most limits are described in HPC2020: Batch system, you can also check them (or reach them) for yourself in the system.
Create a new job script
naughty.sh
with the following contents:naughty.sh#!/bin/bash #SBATCH --mem=100 #SBATCH --output=naughty.out MEMORY=300 perl -e "\$a='A'x($MEM*1024*1024/2);sleep 60"
Submit
naughty.sh
to the batch system and check its status. What happened to the job?Edit
naughty.sh
to comment the request for memory, and then play with the MEM value.naughty.sh#!/bin/bash #SBATCH --output=naughty.out ##SBATCH --mem=100 MEMORY=300 perl -e "\$a='A'x($MEM*1024*1024/2);sleep 60"
How high can you with the default memory limit on the default queue before the system kills it?
How could you have checked this beforehand instead of taking the trial and error approach?
Can you check, without trial and error this time, what is the maximum wall clock time, maximum CPUs, and maximum memory you can request to Slurm for each QoS?
- How many jobs could you potentially have running concurrently? How many jobs could you have in the system (pending or running), before a further submission fails?