Differences

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

Link to this comparison view

Next revision
Previous revision
software:slurm [2026/04/08 00:10] – created Slurm page avsoftware:slurm [2026/11/20 10:20] (current) – Updated nodes/partitions and mandatory --mem from live cluster state 2026-11-20 artoo
Line 1: Line 1:
 ====== Using Slurm ====== ====== Using Slurm ======
  
-Slurm (Simple Linux Utility for Resource Management) is the job scheduler on ABI's cluster. All compute jobs must be submitted through Slurm -- **do not run heavy computation on the login nodes** (''ssh-01'', ''ssh-02'').+Slurm (Simple Linux Utility for Resource Management) is the job scheduler on ABI's cluster. All compute jobs must be submitted through Slurm -- **do not run heavy computation on the login nodes** (''ssh-01'', ''ssh-02''). **Verified against live systems: 2026-11-20.**
  
 ===== ABI Partitions ===== ===== ABI Partitions =====
  
-^ Partition ^ Nodes ^ CPUs ^ Memory ^ Purpose ^ +^ Partition ^ Nodes ^ CPUs (threads) ^ Memory ^ Purpose ^ 
-| ''compute'' (default) | thin-01, thin-02, thick-01 | 64/node | 384G-768G | General purpose -- use this for most jobs | +| ''compute'' (default) | thin-01, thick-01, thick-02 | 64 / 128 / 640 | ~320G / ~1.2T / ~502G | General purpose -- use this for most jobs | 
-| ''thin'' | thin-01, thin-02 | 64/node | ~384G each | Explicit thin-node targeting | +| ''thin'' | thin-01 | 64 | ~320G | Standard-memory jobs | 
-| ''thick'' | thick-01 | 64 | ~768G | Memory-intensive jobs (e.g., pilon, large assemblies) | +| ''thick'' | thick-01, thick-02 | 128 / 640 | ~1.2T / ~502G | Memory-intensive jobs (e.g., pilon, large assemblies) | 
-| ''download'' | dl-01, dl-02 | 2/node | ~8G each | Data downloads only (not for computation) |+| ''fast'' | thick-02 | 640 | ~502G | Newest, largest node (bare metal) -- high-throughput jobs | 
 +| ''fat'' | thick-01 | 128 | ~1.2T | Largest per-node memory -- genome-scale assemblies |
  
   * The ''compute'' partition is the **default**. If you omit ''%%--partition%%'', your job goes here.   * The ''compute'' partition is the **default**. If you omit ''%%--partition%%'', your job goes here.
-  * Use ''%%--partition=thick%%'' explicitly when you need >384G of RAM. +  * **Every job must set ''%%--mem%%''.** Memory is a scheduled resource: a job with no memory request -- or with ''%%--mem=0%%'', which means "all the node's memory" -- is treated as needing an **entire node's memory** and will sit ''PD'' indefinitely on a busy cluster. See [[#choosing_resources|Choosing Resources]]. 
-  * Use ''%%--partition=download%%'' only for data download tasks.+  * Use ''%%--partition=thick%%'' or ''%%--partition=fat%%'' explicitly when you need more than ~300G of RAM. 
 +  * The old ''download'' partition no longer exists; ''dl-01''/''dl-02'' are out of service.
  
 ===== Quick Reference ===== ===== Quick Reference =====
Line 38: Line 40:
 <code bash> <code bash>
 #!/bin/bash #!/bin/bash
-#SBATCH --mem=10gb                  # Memory required+#SBATCH --mem=10gb                  # REQUIRED -- memory for the job
 #SBATCH --cpus-per-task=4           # Number of CPU cores #SBATCH --cpus-per-task=4           # Number of CPU cores
 #SBATCH --output=slurm-%j.log      # Log file (%j = job ID) #SBATCH --output=slurm-%j.log      # Log file (%j = job ID)
Line 61: Line 63:
  
 ^ Directive ^ Purpose ^ Example ^ ^ Directive ^ Purpose ^ Example ^
-| ''%%--mem%%'' | Total memory for the job | ''%%--mem=10gb%%'' |+| ''%%--mem%%'' | Total memory for the job (**required** -- see below) | ''%%--mem=10gb%%'' |
 | ''%%--cpus-per-task%%'' | Number of CPU cores | ''%%--cpus-per-task=4%%'' | | ''%%--cpus-per-task%%'' | Number of CPU cores | ''%%--cpus-per-task=4%%'' |
 | ''%%--output%%'' | Standard output log file | ''%%--output=slurm-%j.log%%'' | | ''%%--output%%'' | Standard output log file | ''%%--output=slurm-%j.log%%'' |
Line 176: Line 178:
 Once the session starts, you will be on a compute node and can run commands directly. Type ''exit'' to end the session. Once the session starts, you will be on a compute node and can run commands directly. Type ''exit'' to end the session.
  
-**Important:** Interactive sessions consume resources just like batch jobs. End them when you are done.+**Important:** Interactive sessions consume resources just like batch jobs. End them when you are done. Like batch jobs, they **must request memory** (''%%--mem%%'') -- an interactive session without ''%%--mem%%'' will never start.
  
 ---- ----
Line 237: Line 239:
  
 === Memory === === Memory ===
 +
 +**Every job must request memory explicitly.** Slurm schedules memory as a consumable resource. A job submitted **without** ''%%--mem%%'' -- or with ''%%--mem=0%%'', which means "all the memory of the node" -- is treated as needing an **entire node's memory**. Since nodes are shared, such a job will stay in ''PD'' (''Resources'') indefinitely: no node will ever have all of its memory free. If your job has been pending for a long time and you did not set ''%%--mem%%'', this is why.
  
 Guidelines for common bioinformatics tasks: Guidelines for common bioinformatics tasks:
Line 273: Line 277:
  
   * **Always create a ''log/'' directory** before submitting jobs that write to ''log/''.   * **Always create a ''log/'' directory** before submitting jobs that write to ''log/''.
 +  * **Always set ''%%--mem%%''** -- a job without a memory request will never start (see above).
   * **Use ''$SLURM_CPUS_PER_TASK''** instead of hardcoding thread counts.   * **Use ''$SLURM_CPUS_PER_TASK''** instead of hardcoding thread counts.
   * **Name your jobs** with ''%%--job-name%%'' so you can identify them in ''squeue''.   * **Name your jobs** with ''%%--job-name%%'' so you can identify them in ''squeue''.
Line 295: Line 300:
   2299    compute  glasso_j1          davith          R   11:12:15          1              thin-01   8        60G   2299    compute  glasso_j1          davith          R   11:12:15          1              thin-01   8        60G
   2282    compute  run_som.sh         melina          R   11:12:16          1              thin-01   8        50G   2282    compute  run_som.sh         melina          R   11:12:16          1              thin-01   8        50G
-  2309    compute  plot_cover          mherk         PD       0:00          1          (Resources)   1         0+  2309    compute  plot_cover         mherk         PD       0:00          1          (Resources)   1        8G
   2121      thick  pilon                nate         PD       0:00          1       (Nodes requi..   4       512G   2121      thick  pilon                nate         PD       0:00          1       (Nodes requi..   4       512G
 </code> </code>
Line 305: Line 310:
 ^ Problem ^ Likely Cause ^ Solution ^ ^ Problem ^ Likely Cause ^ Solution ^
 | Job stays in ''PD'' state | Not enough free resources | Wait, or reduce resource request | | Job stays in ''PD'' state | Not enough free resources | Wait, or reduce resource request |
 +| Job stays ''PD'' forever, reason ''(Resources)'' | No ''%%--mem%%'' set (or ''%%--mem=0%%'') -- the job requests an entire node's memory | Add ''%%--mem=<N>%%'' to your script and resubmit |
 | Job immediately fails | Script error or bad path | Check the log file for error messages | | Job immediately fails | Script error or bad path | Check the log file for error messages |
 | ''slurmstepd: error: Exceeded job memory limit'' | Requested too little memory | Increase ''%%--mem%%'' | | ''slurmstepd: error: Exceeded job memory limit'' | Requested too little memory | Increase ''%%--mem%%'' |
 | ''CANCELLED AT ... DUE TO TIME LIMIT'' | Job took longer than ''%%--time%%'' | Increase the time limit | | ''CANCELLED AT ... DUE TO TIME LIMIT'' | Job took longer than ''%%--time%%'' | Increase the time limit |
-| ''error: Batch job submission failed: Invalid partition'' | Wrong partition name | Valid partitions: ''compute'', ''thin'', ''thick'', ''download''. Check with ''sinfo'' |+| ''error: Batch job submission failed: Invalid partition'' | Wrong partition name | Valid partitions: ''compute'', ''thin'', ''thick'', ''fast'', ''fat''. Check with ''sinfo'' |
  
 ---- ----