This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
guides:slurm:basics [29.10.2019 15:10] 127.0.0.1 external edit |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | # Slurm basics | ||
- | |||
- | Slurm Workload manager is an open source, fault-tolerant, | ||
- | |||
- | * It allocates exclusive and/or non-exclusive access to resources (compute nodes) to users for some duration of time so they can perform work. | ||
- | * It provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. | ||
- | * It arbitrates contention for resources by managing a queue of pending work. | ||
- | * Optional plugins can be used for accounting, advanced reservation, | ||
- | |||
- | Bioinformatics Center uses unmodified version of Slurm on sampo.uef.fi computing cluster. This guarantees that the most of the tutorials and guides found from the Internet are applicable as-is. The most obvious starting place to search for usage information is documentation section of the Slurm own website [[https:// | ||
- | |||
- | {{ : | ||
- | |||
- | ### Example | ||
- | #### Example MATLAB code (matlab.m) | ||
- | ``` | ||
- | % Creates a 10x10 Magic square | ||
- | M = magic(10); | ||
- | M | ||
- | ``` | ||
- | #### Example script (submit.sbatch) | ||
- | ``` | ||
- | |||
- | #!/bin/bash | ||
- | |||
- | module load matlab/ | ||
- | |||
- | matlab -nodisplay < matlab.m # Execute the script | ||
- | |||
- | ``` | ||
- | |||
- | User can submit the job to the compute queue with the **[sbatch](https:// | ||
- | |||
- | ``` | ||
- | sbatch submit.sbatch | ||
- | ``` | ||
- | **[sbatch](https:// | ||
- | |||
- | ``` | ||
- | less slurm-< | ||
- | ``` | ||
- | |||
- | ### Slurm job queue | ||
- | User can monitor the progress of the job with the **[squeue](https:// | ||
- | |||
- | ``` | ||
- | squeue -j < | ||
- | ``` | ||
- | |||
- | ### Scontrol - View or modify Slurm configuration and state. | ||
- | [Scontrol](https:// | ||
- | |||
- | #### List all compute nodes | ||
- | ``` | ||
- | scontrol show node | ||
- | ``` | ||
- | |||
- | #### List all compute nodes | ||
- | ``` | ||
- | scontrol show node | ||
- | ``` | ||
- | |||
- | #### List all queues/ | ||
- | ``` | ||
- | scontrol show partition | ||
- | ``` | ||
- | |||
- | #### List information of the given jobid | ||
- | ``` | ||
- | scontrol show job < | ||
- | ``` | ||
- | |||
- | #### Extend runtime of given jobid | ||
- | |||
- | ``` | ||
- | scontrol update jobid=< | ||
- | ``` | ||
- | |||
- | |||
- | ### Slurm job effiency report (seff) | ||
- | Seff command will give the report of the completed job on how much resources it consumed. The reported information are CPU wall time, job runtime and memory usage. | ||
- | |||
- | ``` | ||
- | seff < | ||
- | ``` | ||
- | |||