tutorials:slurmcommands
Table of Contents
SLURM Useful Commands
Man pages exist for all SLURM commands and API functions. The command option –help also provides a brief summary of options. Note that the command options are all case insensitive.
Submission
| sbatch | is used to submit a job script for later execution. The script will typically contain one or more srun commands to launch parallel tasks. |
|---|---|
| salloc | is used to allocate resources for a job in real time. Typically this is used to allocate resources and spawn a shell. The shell is then used to execute srun commands to launch parallel tasks. |
| srun | is used to submit a job for execution or initiate job steps in real time. srun has a wide variety of options to specify resource requirements, including: minimum and maximum node count, processor count, specific nodes to use or not use, and specific node characteristics (so much memory, disk space, certain required features, etc.). A job can contain multiple job steps executing sequentially or in parallel on independent or shared nodes within the job's node allocation. |
| scancel | is used to cancel a pending or running job or job step. It can also be used to send an arbitrary signal to all processes associated with a running job or job step. |
Reporting
| sinfo | reports the state of partitions and nodes managed by SLURM. It has a wide variety of filtering, sorting, and formatting options. |
|---|---|
| squeue | reports the state of jobs or job steps. It has a wide variety of filtering, sorting, and formatting options. By default, it reports the running jobs in priority order and then the pending jobs in priority order. |
| scontrol | uses to view job's state. eg. scontrol show job <job#id> |
| sstat | displays various status information of a running job/step. |
| sview | is a graphical user interface to get and update state information for jobs, partitions, and nodes managed by SLURM. |
| sprio | views the factors that comprise a job's scheduling priority |
Additionnal information
More information on batch systems can be found on the Internet. We recommend visiting the following pages (keep in mind that some information may not apply to the ICI-SC environment):
- SLURM Commands and a pdf cheatsheet.
tutorials/slurmcommands.txt · Last modified: by Richard.Randriatoamanana@ec-nantes.fr