Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
compute_slurm_reservations [2019/06/17 14:10]
ktm5j
compute_slurm_reservations [2021/10/08 17:28] (current)
Line 1: Line 1:
-====== SLURM Reservations ​======+==== SLURM Reservations ====
  
-===== Getting a Reservation ​=====+=== Getting a Reservation ===
  
-Reservations for slurm nodes/​resources can be requested by submitting a ticket by email to <​cshelpdesk@virginia.edu>​. ​ We can give out reservations for a specific amount of computing resources (Cores, Mem, GPU count, etc.) or by reserving an entire compute node or node group (i.e. slurm1 ​or slurm[1-5]).+Reservations for slurm nodes/​resources can be requested by submitting a ticket by email to <​cshelpdesk@virginia.edu>​. ​ We can give out reservations for a specific amount of computing resources (Cores, Mem, GPU count, etc.) or by reserving an entire compute node or node group (ex"​cortado01" ​or "​cortado[01-05]").
  
 In your request for a reservation,​ please be specific about: In your request for a reservation,​ please be specific about:
  
-  - What resources ​are needed +  - What servers ​are needed ​(ex. "​cortado01-05"​) 
-  - How long they will be needed +  - The start and end time of the reservation (ex. today to Dec 31st) 
-  - Who has rights to use reservation (list of user IDs)+  - Who can use the reservation (list of user IDs)
  
-===== Using Reservations =====+//Note: the node must be free of any running jobs before a reservation can be created. So if you are requesting a reservation on a node upon which you are running a job, we can't create the reservation until the job completes on the node. So it is best to cancel ('​scancel'​) the job before requesting a reservation.//​ 
 + 
 +//Note: nodes may be reserved for a maximum of fourteen days, and extended in one week increments.//​ 
 + 
 +=== Using reservations when submitting jobs ===
  
 If you have been granted a reservation you will receive a reservation tag, a short string that is required to submit jobs.  This string must be included in any ''​%%srun%%''​ or ''​%%sbatch%%''​ submissions via the flag ''​%%--reservation=...%%''​. If you have been granted a reservation you will receive a reservation tag, a short string that is required to submit jobs.  This string must be included in any ''​%%srun%%''​ or ''​%%sbatch%%''​ submissions via the flag ''​%%--reservation=...%%''​.
  
-If our tag is "abcde_4" then you would submit jobs using the flag ''​%%--reservation=abcde_4%%''​+If our tag is "abc1de_4" then you would submit jobs using the flag ''​%%--reservation=abc1de_4%%''​
  
 This can be done at the command line: This can be done at the command line:
  
 <​code>​ <​code>​
-[abcde@portal03 ~]$ sbatch --reservation=abcde_4 ​slurm.sh+[abc1de@portal03 ~]$ sbatch --reservation=abc1de_4 ​slurm.sh
 ... ...
-[abcde@portal03 ~]$ srun --reservation=abcde_4 ​slurm.sh+[abc1de@portal03 ~]$ srun --reservation=abc1de_4 ​slurm.sh
 </​code>​ </​code>​
  
 Or you can include the flag in the header of your sbatch file: Or you can include the flag in the header of your sbatch file:
  
-**reservation.sh** 
 <​code>​ <​code>​
-[abcde@portal03 ~]$ cat reservation.sh+[abc1de@portal03 ~]$ cat reservation.sh
 #!/bin/bash #!/bin/bash
 #SBATCH --job-name="​Reservation Example" ​ #SBATCH --job-name="​Reservation Example" ​
Line 36: Line 39:
 #SBATCH --output="​stdout.txt"​ #SBATCH --output="​stdout.txt"​
 # #
-#SBATCH --reservation=abcde_4 ​        <- Include reservation tag+#SBATCH --reservation=abc1de_4 ​              <- Include reservation tag
 ... ...
-[abcde@portal03 ~]$ sbatch reservation.sh+[abc1de@portal03 ~]$ sbatch reservation.sh
 </​code>​ </​code>​
 +
 +=== Listing Reservations ===
 +
 +You can see a listing of all active reservations by using the ''​%%scontrol%%''​ command:
 +
 +<​code>​
 +[abc1de@portal03 ~]$ scontrol show res
 +ReservationName=abc1de_4 StartTime=2019-06-25T00:​00:​00 EndTime=2019-07-02T16:​00:​00 ​
 +   ​Nodes=slurm1 NodeCnt=1 CoreCnt=12 Features=(null) PartitionName=(null) Flags=SPEC_NODES
 +   ​TRES=cpu=24
 +   ​Users=abc1de Accounts=(null) Licenses=(null) State=ACTIVE BurstBuffer=(null) Watts=n/a
 +
 +</​code>​
 +
  • compute_slurm_reservations.1560780647.txt.gz
  • Last modified: 2019/06/17 14:10
  • by ktm5j