The srun command has a significant number of options to control the execution of your application closely. However, you can use it for a simple launch of a serial program, as Example
Example
$ srun hostname
n1
The srun Roles and Modes
The srun command submits jobs to run under SLURM management. The srun command can perform many roles in launching and managing your job. The srun command operates in several distinct usage modes to accommodate the roles it performs.
The srun Roles
srun options allow you control a SLURM job by:
•Specifying the parallel environment for your job when you submit it, such as the number of nodes to use, partition, distribution of processes among nodes, and maximum time.
•Controlling the behavior of your parallel job as it runs, such as by redirecting or labeling its output, sending it signals, or specifying its reporting verbosity.
The srun Modes
The srun command has five distinct modes in which it can be used:
•Simple mode
•Batch mode
•Allocate mode
•Attach mode
•Batch (with
The SLURM Reference Manual describes the Simple, Batch, Allocate, and Attach modes.
You can submit a script to
Using the srun Command with HP-MPI
The srun command can be used as an option in an
Using the srun Command with LSF-HPC
The srun command can be used in an
Monitoring Jobs with the squeue Command
The squeue command displays the queue of running and waiting jobs (or "job steps"), including the JobID used for scancel), and the nodes assigned to each running job. 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.
Example
Example
$ squeue --jobs 12345,12346
JOBID PARTITION NAME USER | ST TIME_USED NODES | NODELIST | |||||
12345 | debug | job1 | jody | R | 0:21 | 4 |
|
12346 | debug | job2 | jody | PD | 0:00 | 8 |
|
64 Using SLURM