feat(claude): add slurm-discovery, bodhi-storage, bodhi-software and slurm-batch skills - #7
Merged
Merged
Conversation
bodhi-compute tells an agent to pick a partition with sinfo, which is only half the story: partitions restrict which accounts and QOS may submit to them, and the request has to satisfy both the partition's AllowAccounts/AllowQos and the user's own association. Neither half implies the other, and failing either produces the same unhelpful "invalid account or partition". That intersection is the part nobody guesses right. On Bodhi the gpu partition takes gpu_rbi/gpu_devbio/gpu_scb and not the default rbi account, so the job is refused however many GPUs are idle, and the error names neither the account nor the QOS. An agent that does not know to look ends up shrinking a request that was never too big. The skill covers the survey, the rule, reading the QOS limit columns, and squeue's reason column when a job is rejected or stuck PENDING. Every command in it was run against Bodhi rather than recalled. Its answers are cached to ~/.cache/sinteractive/slurm-map-<cluster>.md and re-read rather than re-run, since partitions and accounts change on the order of months. The file is keyed by ClusterName because one $HOME is frequently mounted on several clusters and a map from the wrong one is worse than none, and it lives beside the session state files, which sinteractive only ever removes by job id. Only the structure is cached: node state and queue depth are re-read live every time, which is why the cached sinfo deliberately drops the state column a cached "idle" would misreport within minutes. No installer change was needed — skills are discovered from what ships beside the script. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
slurm-discovery told an agent which partition it may use. These cover the next three things it hits, all of which are cheap to get wrong and invisible until they are: where the output goes, where the tool comes from, and how to run the same command four hundred times. bodhi-storage. /beevol is a single BeeGFS mount shared by everyone and 84% full; the compute node's /tmp is a 423G local disk. Inputs get read from the former and scratch written to the latter, then copied back — a pipeline streaming small writes to BeeGFS is slow for its owner and slow for everyone else. Slurm hands out no private temp directory here (TMPDIR is plain /tmp, SLURM_TMPDIR is unset), so the skill shows making one under the job id and clearing it with a trap, which is why /tmp on a shared node is already two thousand entries deep. It also records that du on a home directory can run for minutes on BeeGFS — long enough to look like a hang. bodhi-software. The order is module, then container, then pixi/uv. The tree at /cluster/software/modules-sw carries around 137 packages, so most of a genomics pipeline is one module load away and building it from source is an hour spent on a less reproducible result. Pin the version rather than taking whatever carries (default) today; load inside the job script, since sbatch starts from a clean login shell; and note that module avail writes to stderr, so grepping it without 2>&1 silently returns nothing. slurm-batch. For work that is per-sample rather than one command: job scripts, arrays throttled with %N so one submission does not fill the partition ahead of its own later stages, --parsable dependency chains, and sizing the next run from what the last one measured. The local numbers that bite are written down rather than left to be discovered: DefMemPerCPU is 4000 MB, so omitting --mem is not "unlimited"; MaxArraySize is 1001, so longer sample lists need chunking; kill_invalid_depend is set, so a dependent job vanishes rather than hangs when its upstream fails; and MaxRSS is reported on the step rows, where sacct -X will not show it at all. Every command and every number in the three was checked against Bodhi rather than recalled. bodhi-compute gains a related-skills list, and the docs, man page and Makefile comment now describe six skills. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Four skills covering what an agent needs before it can do real work on the
cluster: which partition it may use, where the output goes, where the tool
comes from, and how to run the same command four hundred times. Every command
and number in them was checked against Bodhi rather than recalled.
No installer change is needed for any of it — skills are discovered from what
ships beside the script, so each one is a new directory.
slurm-discoverybodhi-computetells an agent to pick a partition withsinfo, which is halfthe story. Partitions restrict which accounts and QOS may submit, and a
request must satisfy both the partition's
AllowAccounts/AllowQosandthe user's own association. Neither half implies the other, and failing either
gives the same unhelpful "invalid account or partition".
That intersection is the part nobody guesses right. On Bodhi the
gpupartition takes
gpu_rbi/gpu_devbio/gpu_scb, not the defaultrbi, sothe job is refused however many GPUs are idle — and an agent that does not
know to look ends up shrinking a request that was never too big.
Covers the survey, the rule, what
MaxWall/MaxTRESPU/OverPartQOS/DenyOnLimitdo to a request, and a table mappingsqueue's reason column tothe wall you hit, plus
srun --test-only.The map is cached to
~/.cache/sinteractive/slurm-map-<cluster>.mdandre-read rather than re-run, since partitions and accounts change on the order
of months. Keyed by
ClusterName, because one$HOMEis often mounted onseveral clusters and a map from the wrong one is worse than none. Only the
structure is cached — the cached
sinfodeliberately drops the state column,since a cached
idleis a lie within minutes.bodhi-storage/beevolis one shared BeeGFS mount at 84% full; the compute node's/tmpis a 423G local disk. Read inputs from the former, write scratch to thelatter, copy results back — a pipeline streaming small writes to BeeGFS is
slow for its owner and slow for everyone else.
Slurm hands out no private temp directory here (
TMPDIRis plain/tmp,SLURM_TMPDIRunset), so the skill shows making one under the job id andclearing it with a
trap— which is why/tmpon a shared node is alreadytwo thousand entries deep. It also records that
duon a home directory canrun for minutes on BeeGFS, long enough to look like a hang.
bodhi-softwareModule → container →
pixi/uv./cluster/software/modules-swcarries ~137packages, so most of a genomics pipeline is one
module loadaway andbuilding from source is an hour spent on a less reproducible result. Pin the
version rather than taking today's
(default); load inside the job script,since
sbatchstarts from a clean login shell; and notemodule availwritesto stderr, so grepping it without
2>&1silently returns nothing.slurm-batchFor work that is per-sample rather than one command: job scripts, arrays
throttled with
%N,--parsabledependency chains, and sizing the next runfrom what the last one measured. The local numbers that bite are written down
rather than left to be discovered:
DefMemPerCPUis 4000 MB — omitting--memis not "unlimited"MaxArraySizeis 1001 — longer sample lists need chunkingkill_invalid_dependis set — a dependent job vanishes rather than hangswhen its upstream fails
MaxRSSis on the step rows, wheresacct -Xwill not show itAlso
bodhi-computegains a related-skills list; the README,docs/scripting.md,man page and Makefile comment now describe six skills. All four
validate.ymlgates pass locally,--install-claudeinto a throwaway configdir picks up all six, and every skill's frontmatter was checked for a
name:matching its directory.🤖 Generated with Claude Code