Running Jobs – The Batch System (SLURM)
Why use a batch system?
All jobs must be run in the batch system (Slurm). This allows you to specify the resources (cores and memory) you need for your jobs and ensures the jobs only run when those resources become available.
It also ensures fair usage of the system – there are many jobs making different demands of the system and many users submitting jobs. The batch system will schedule your jobs according to resources requested and size of your group’s contribution to the system.
CSF3 users moving to CSF4
CSF3 uses the SGE batch system whereas CSF4 uses Slurm. This represents a significant change. You will need to edit your jobscripts or write new ones to run on CSF4. Please see our page on moving from SGE to Slurm. But in summary here are the three commands you will use:
sbatch myjobscript # Submit a SLURM jobscript squeue # Check on status of your jobs scancel jobid # Cancel a job (running or queued)
Be kind to the login nodes and other users
Applications should not be run directly on the login nodes. These are relatively small, light-weight nodes (not many cores, small memory) used to access the system, edit files, submit jobs. Many users will be connected to the login nodes. If you run an application there you may prevent all of those users from doing their work.
If you want to diagnose / debug a problem with your application (e.g., quick test runs, trying different parameters, possibly modifying and recompiling code) without using a batch script, please use an interactive job (see srun). DO NOT do this type of work directly on the login node – your quick test run may use far more CPU and memory that you think!
Please take the time to learn how to submit jobs to the batch system.
Batch Tutorial
If you are unfamiliar with running jobs in a batch system please see our 10 minute tutorial on running jobs on the CSF.
Submitting Jobs and Requesting Resources
You will need to write a small jobscript,
gedit myjobscript
which is a simple text file that specifies
- Any additional or specific resources your job needs (number of CPU cores, the architecture/type of CPU, memory).
[The default is 1 CPU-core, Intel Cascade Lake CPU type, 4GB RAM (as of Nov 2021)] - The actual commands / application your job should execute.
Further details on how to write jobscripts, and some example job scripts, are in the sections on serial jobs and parallel jobs. The menu on the left also has pages for more advanced job options. Our software pages also have example jobscripts for each application we have installed.
Then submit the jobscript to the batch system using
sbatch myjobscript
You may also wish to check on your job (is it still running?) using
squeue
See the batch commands for more information.