| sinfo | View information about nodes and partitions. |
| sinfo | View information about nodes and partitions. |
| squeue | View information about jobs located in the scheduling queue. |
| squeue | View information about jobs located in the scheduling queue. |
| sacct | Display accounting data for all jobs and job steps in the job accounting log or Slurm database. |
| sacct | View information about jobs from Slurm accounting database. |
| scontrol | View or modify jobs, nodes, partitions, reservations, and other Slurm objects. |
| scontrol | View or modify jobs, nodes, partitions, reservations, and other Slurm objects. |
| |
| |
| sbatch | Submit a batch script to Slurm. |
| sbatch | Submit a batch job to Slurm. |
| salloc | Run an interactive job. |
| salloc | Run an interactive job. |
| srun | Run parallel tasks. |
| srun | Run parallel job. |
| scancel | Cancel job. |
| scancel | Cancel job. |
### Job Submission Options
### Job Submission Options
Slurm provides three different commands for job submission: `salloc`, `srun`, and `sbatch`. Each of those serves a slightly different purpose; `salloc` is used to obtain an allocation, `srun` runs parallel jobs (and obtains appropriate allocation first if necessary), and serves as Slurm's native way of executing MPI-enabled applications, and `sbatch` reads a batch script, asks for required allocation, and then executes it. While all of these may be used interchangeably, their specifics make them more useful in different scenarios:
Slurm provides three different commands for job submission: `salloc`, `sbatch`, and `srun`. Each of those serves a slightly different purpose;
`salloc` is used to run interactive job - behaviour of this command at IT4Innovation's clusters might differ from behaviour at other clusters, it is alternative to PBS qsub -I command.
| Command | Preferred use case |
`sbatch` is used to submit a batch script to Slurm, it is alternative to PBS qsub command used without -I option.
`srun` behaviour of the command depends on whether it was run from inside the job or from outside, from inside of the job command serves as Slurm's native way of executing MPI-enabled applications, from outside of the job command obtains appropriate allocation first and then run a specified command in parallel.
| sbatch | Production jobs |
| salloc | Interactive jobs, debugging |
| srun | Quick interactive jobs, short analysis of output data, running MPI applications |