Resource Manager - SLURM
Multitasking and the scheduling of computing resources according to the prescribed job policy are handled by the system software SLURM (Simple Linux Utility for Resource Managment). Parallel jobs are usually described in shell scripts. Typically, all control is done from the command line. The most common commands are:
sbatch ime-posla.slurm
squeue
scancel ime-ali-številka-posla
The first command runs the program with the parameters prescribed in the script. If several identical programs are run with different input data, you must ensure that the results are written to separate files.
The second command shows the current state of the user’s job queue. When a job starts depends on the state of all jobs on the supercomputer. The third command stops a running job and removes it from the queue. In addition to these most frequently used commands, there are other commands for monitoring the state of SLURM and user accounts in more detail.
Job execution flow

Job submission - From the login node (or elsewhere), a request to run the job is sent with the sbatch (or srun) command
Queueing - SLURM on the control node examines the possibilities for running the job and starts it as soon as possible
Job dispatch - The control node sends the job to free compute nodes
Running the job on the compute nodes
Returning results in the form of program output
Using SLURM
Run a command on X nodes with Y cores:
srun -N X -n Y <i>ukaz</i>
Submit a script to the queue:
sbatch <i>skripta.sh</i>
Start an interactive session:
srun --pty bash -i
Check the status of unfinished jobs:
squeue
Summarise occupancy by queue:
sinfo
Check the history of today’s jobs
sacct
Check the history of all jobs from a given date onwards:
sacct --starttime 2019-05-01 --format=User,JobID,Jobname,partition,state,time,start,end,elapsed,MaxRSS,MaxVMSize,ReqMem,nnodes,ncpus,nodelist
More usage examples are available at https://slurm.schedmd.com/quickstart.html
Node usage overview
Usage can be checked at https://grafana.hpc.fs.uni-lj.si/ in the “Telegraf metrics” view. Under “server”, select the desired nodes.
Scripts
Nadzornik računskih virov - SLURM
Za večopravilnost in razporejanje računskih virov glede na predpisano politiko poslov skrbi sistemska programska oprema SLURM (Simple Linux Utility for Resource Managment). Vzporedni posli se običajno popisujejo v skriptah ukazne školjke. Običajno je, da se celoten nadzor opravlja iz ukazne vrstice. Najbolj pogosti ukazi so:
sbatch ime-posla.slurm
squeue
scancel ime-ali-številka-posla
S prvim ukazom zaženemo program s predpisanimi parametri v skripti. Če poganjamo več istih programov z različnimi vhodnimi podatki, je potrebno zagotoviti, da se rezultati pišejo v ločene datoteke.
Drugi ukaz prikazuje trenutno stanje čakalne vrste poslov uporabnika. Kdaj se požene kakšen posel je odvisno od stanja vseh poslov na superračunalniku. Tretji ukaz ustavi delujoči posel in ga izbriše iz vrste. Poleg navedenih najbolj uporabljanih ukazov obstajajo še ukazi, s katerimi lahko podrobneje spremljano stanje SLURM in uporabniških računov.
Potek izvajanja poslov

Vzpostavitev posla - Z nadzornega vozlišča (lahko tudi od drugje) z ukazom sbatch (ali srun) pošljemo zahtevo za izvajanje posla
Uvrstitev v čakalno vrsto - SLURM na nadzornem vozlišču preuči možnosti za izvajanje posla in ga požene takoj, ko je to mogoče
Razvrstitev posla - Nadzorno vozlišče pošlje posel na prosta računska vozlišča
Poganjanje posla na računskih vozliščih
Vračanje rezultatov v obliki izpisa programa
Uporaba SLURM-a
Poženi ukaz na X vozliščih z Y jedri:
srun -N X -n Y <i>ukaz</i>
Vstavi v čakalno vrsto skripto:
sbatch <i>skripta.sh</i>
Zaženi interaktivno sejo:
srun --pty bash -i
Preveri stanje nedokončanih poslov:
squeue
Povzemi zasedenost po čakalnih vrstah:
sinfo
Preveri zgodovino današnjih jobov
sacct
Preveri zgodovino vseh jobov: od datuma naprej:
sacct --starttime 2019-05-01 --format=User,JobID,Jobname,partition,state,time,start,end,elapsed,MaxRSS,MaxVMSize,ReqMem,nnodes,ncpus,nodelist
Več primerov uporabe na voljo na https://slurm.schedmd.com/quickstart.html
Pregled porabe vozlišč
Porabo lahko preverite na https://grafana.hpc.fs.uni-lj.si/ na pogledu “Telegraf metrics”. Pod “server” izberete željena vozlišča.