slurm
Skill30 starsChanged 51 days agoBSD-2-ClauseView on GitHub
Slurm workload manager for HPC batch job scheduling. Use when submitting batch or interactive jobs with sbatch/salloc/srun, monitoring with squeue/sacct/scontrol, cancelling with scancel, writing #SBATCH job scripts, working with job arrays, setting job dependencies, checking fair-share accounting with sacctmgr/sreport, or troubleshooting failed jobs on any Slurm cluster.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- 14790897/my-skillstheir own version, first seen Oct 28, 2026
- surajinacademia/Computational_modeling_skillstheir own version, first seen Oct 20, 2026
- NVIDIA/AI-Factory-Operations-Agenttheir own version, first seen Oct 13, 2026
- jaaxk/claude-skillstheir own version, first seen Mar 22, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- NVIDIA/AI-Factory-Operations-Agent★ 37same name
- 14790897/my-skills★ 2same name
- jaaxk/claude-skills★ 0same name
- surajinacademia/Computational_modeling_skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository30 other files it gives its agents.
- skills/academy/agents.mdAGENTS.md
- academySkill
- amsc-data-movement-apiSkill
- amsc-magSkill
- amsc-python-clientSkill
- globus-computeSkill
- i2-apiSkill
- iri-apiSkill
- skill-explorerSkill
- croissant-validatorSkill
- datacard-generatorSkill
- hdmf-schema-builderSkill
- skill-creatorSkill
- well-convertSkill
- card-eval-updaterSkill
- agentic-vulnerabilities-scanSkill
- ai-fingerprintSkill
- battleprintSkill
- fingerprintingSkill
- uncertainty-quantificationSkill
- uq-metrics-evaluatorSkill
- skill-searchSkill
- auroraSkill
- frontierSkill
- pbsSkill
- perlmutterSkill
- literature-searchSkill
- multi-agent-systemsSkill
- gkeyllSkill
- gs2Skill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 165
Run many similar jobs from one submission.
- Distinctive: line 224
Always load modules inside the job script, not just in your login shell.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Slurm Workload Manager
Slurm is the dominant HPC batch scheduler. Jobs are submitted to queues (partitions), allocated nodes, and run with full or partial node access.
Quick Command Reference
| Command | Purpose |
sbatch script.sh | Submit a batch job script |
salloc | Allocate nodes for an interactive session |
srun | Run a parallel job step (inside or outside a batch job) |
squeue | View pending and running jobs |
scontrol show job <id> | Detailed job info |
scancel <id> | Cancel a job |
scontrol hold/release <id> | Hold or release a pending job |
sinfo | Cluster partition and node status |
sacct | Query completed job accounting records |
sacctmgr | Manage accounts, QOS, and allocations |
Job State Codes
| Code | State | Meaning |
| PD | PENDING | Waiting for resources |
| R | RUNNING | Currently executing |
| CG | COMPLETING | Cleaning up after execution |
| CD | COMPLETED | Finished with exit code 0 |
| CA | CANCELLED | Cancelled by user or admin |
| F | FAILED | Non-zero exit code |
| TO | TIMEOUT | Exceeded time limit |
| OOM | OUT_OF_MEMORY | Killed by memory manager |
| PR | PREEMPTED | Preempted by higher-priority job |
Writing Job Scripts
Directives go at the top of the script as #SBATCH comments before any executable line.
Minimal working script:
#!/bin/bash
#SBATCH --job-name=myjob
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=32
#SBATCH --time=01:00:00
#SBATCH --account=myproject
#SBATCH --output=myjob_%j.out
#SBATCH --error=myjob_%j.err
module load gcc openmpi
srun ./my_applicationKey #SBATCH Directives
| Directive | Example | Notes |
--job-name | myjob | Shown in squeue |
--nodes / -N | 4 | Number of nodes |
--ntasks-per-node | 128 | MPI ranks per node |
--cpus-per-task / -c | 4 | Threads per MPI rank |
--time / -t | 2-00:00:00 | D-HH:MM:SS or HH:MM:SS |
--partition / -p | gpu | Queue to use |
--account / -A | myproject | Allocation to charge |
--output / -o | job_%j.out | Stdout path |
--error / -e | job_%j.err | Stderr path |
--gres | gpu:4 | Generic resources (GPUs) |
--mem | 64G | Memory per node |
--mem-per-cpu | 4G | Memory per CPU core |
--exclusive | — | Reserve entire node(s) |
--dependency | afterok:12345 | Wait for another job |
--array | 0-99 | Submit job array |
--mail-type | END,FAIL | Email notifications |
--mail-user | user@host | Email address |
Output Filename Tokens
| Token | Meaning |
%j | Job ID |
%A | Array parent job ID |
%a | Array task index |
%x | Job name |
%N | First node name |
Submitting Jobs
# Batch submission
sbatch script.sh
# Override directives at submission
sbatch --nodes=8 --time=4:00:00 script.sh
# Interactive allocation (drops into a shell on allocated node)
salloc --nodes=2 --time=1:00:00 --partition=debug
srun ./my_app # run within the allocation
exit # release allocation
# One-off parallel command (creates its own allocation)
srun --nodes=1 --ntasks=4 ./my_appMonitoring Jobs
# Your jobs
squeue -u $USER
# All jobs, long format
squeue -l
# Specific job
squeue -j 12345
# Estimated start times for pending jobs
squeue --start -u $USER
# Full detail (reason for pending, TRES, etc.)
scontrol show job 12345
# Live updates every 5 seconds
watch -n5 squeue -u $USERReading output files: Slurm writes stdout/stderr when the job finishes (or continuously if --output is to a path). Watch a running job's output:
tail -f myjob_12345.outAfter job completes:
sacct -j 12345 --format=JobID,State,Elapsed,MaxRSS,ExitCodeCancelling and Holding Jobs
scancel 12345 # cancel by job ID
scancel 12345_5 # cancel one array element
scancel -u $USER --state=PENDING # cancel all your pending jobs
scancel -n myjob # cancel by name
scontrol hold 12345 # hold a pending job
scontrol release 12345 # release held jobJob Arrays
Run many similar jobs from one submission. Each element gets a unique SLURM_ARRAY_TASK_ID.
#SBATCH --array=0-99 # indices 0..99
#SBATCH --array=1-50:2 # odd indices 1,3,5,...,49
#SBATCH --array=0-999%20 # up to 20 running at once
#SBATCH --output=job_%A_%a.out # %A=parent ID, %a=task indexInside the script, use $SLURM_ARRAY_TASK_ID to select input:
INPUT="data/input_${SLURM_ARRAY_TASK_ID}.txt"
srun ./process "$INPUT"Array management:
squeue -r -j 36 # show all elements
scancel 36 # cancel entire array
scancel 36_[1-5] # cancel elements 1–5Job Dependencies
Chain jobs so they start only when a predecessor finishes:
JOB1=$(sbatch stage1.sh | awk '{print $4}')
sbatch --dependency=afterok:$JOB1 stage2.sh
# Common dependency types:
# afterok:<id> — start only if <id> succeeds
# afterany:<id> — start regardless of <id> outcome
# afternotok:<id> — start only if <id> fails
# singleton — only one job with this name runs at a timeCommon Environment Variables (Inside a Job)
| Variable | Value |
$SLURM_JOB_ID | Job ID |
$SLURM_NODELIST | List of allocated nodes |
$SLURM_NTASKS | Total number of tasks |
$SLURM_CPUS_PER_TASK | CPUs per task |
$SLURM_SUBMIT_DIR | Directory where sbatch was run |
$SLURM_ARRAY_JOB_ID | Parent array job ID |
$SLURM_ARRAY_TASK_ID | This element's index |
Module System
module avail # list available modules
module spider <pkg> # search for a package
module load gcc/12 openmpi/4.1
module list # show loaded modules
module purge # unload everythingAlways load modules inside the job script, not just in your login shell.
Additional Resources
- Annotated job script examples: references/job-scripts.md
- Monitoring, troubleshooting, scontrol recipes: references/job-control.md
- Accounting, fairshare, allocation reporting: references/accounting.md
- Copy-paste templates: assets/templates/
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

