Slurm job array starter
Skill ma-compbio-lab/SkillFoundry/skills/hpc/slurm-job-array-starter
A framework for discovering, compiling, and validating reusable skills for scientific agents.
npx -y skills add ma-compbio-lab/SkillFoundry --skill slurm-job-array-starterAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
SKILL.md
1.1 KB, 273 tokens by cl100k_base, as published. Nobody here has run it
Slurm Job Array Starter
Use this skill to submit a tiny real Slurm job array, wait for terminal accounting, and summarize per-task outputs in compact JSON.
What it does
- Renders and submits a minimal
sbatch --arrayscript on the live cluster. - Polls queue state with
squeueand waits for terminal task accounting withsacct. - Reads each task's stdout and stderr logs and exports a per-task summary.
When to use it
- You need a verified starter for the
job arraysleaf. - You want a minimal example of per-task output capture and accounting on the current Slurm cluster.
- You need deterministic JSON for tests before scaling to larger batched workloads.
Example
python3 skills/hpc/slurm-job-array-starter/scripts/run_slurm_job_array.py \
--partition cpu \
--array-spec 0-1 \
--sleep 1 \
--out scratch/slurm-array/summary.json
Verification
- Skill-local tests:
python3 -m unittest discover -s skills/hpc/slurm-job-array-starter/tests -p 'test_*.py' - Expected summary:
task_count == 2and all task states areCOMPLETEDwithExitCode 0:0