code-hpc
/code-hpc
Running on Stanford's Sherlock cluster with SLURM the das_ani way - preflight submit.sh, module setup script, safe sbatch headers, Python-side thread control, GPU type constraints, TF32 pinned off, sync/fetch without data loss, requeue-safe resume. Use when writing or editing slurm/ scripts, submit.sh, sherlock_setup.sh, Makefile sync/fetch targets, or planning a cluster run.
- Author
- Benz-Poobua ↗
- Repository
- benz-skills ↗
- Licence
- MIT
- Last repository change
- 10.11.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 10.11.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Running on Stanford's Sherlock cluster with SLURM the das_ani way - preflight submit.sh, module setup script, safe sbatch headers, Python-side thread control, GPU type constraints, TF32 pinned off, sync/fetch without data loss, requeue-safe resume. Use when writing or editing slurm/ scripts, submit.sh, sherlock_setup.sh, Makefile sync/fetch targets, or planning a cluster run.
Original author description
Running on Stanford's Sherlock cluster with SLURM the das_ani way - preflight submit.sh, module setup script, safe sbatch headers, Python-side thread control, GPU type constraints, TF32 pinned off, sync/fetch without data loss, requeue-safe resume. Use when writing or editing slurm/ scripts, submit.sh, sherlock_setup.sh, Makefile sync/fetch targets, or planning a cluster run.
How it works
- sbatch script rules
- Submit and transfer
- Facts to carry
SKILL.md preview
---
name: code-hpc
description: Running on Stanford's Sherlock cluster with SLURM the das_ani way - preflight submit.sh, module setup script, safe sbatch headers, Python-side thread control, GPU type constraints, TF32 pinned off, sync/fetch without data loss, requeue-safe resume. Use when writing or editing slurm/ scripts, submit.sh, sherlock_setup.sh, Makefile sync/fetch targets, or planning a cluster run.
---
# code-hpc
Reference implementation: `das_ani/` (`submit.sh`, `sherlock_setup.sh`, `slurm/*.slurm`, Makefile
`sync reachable fetch fetch-logs slurm-prep data-plan`). The older notes in
`../../../SHERLOCK_old_need_revise.md` are pending revision (root TASKS.md); prefer das_ani's files.
## sbatch script rules
- `#!/bin/bash` + `set -euo pipefail` (otherwise a failed stage is followed by a stage that "succeeds" on
partial output and the job exits 0).
- `cd "${SLURM_SUBMIT_DIR}"` — never a hard-coded checkout path.
- `mkdir -p logs results` before anything; `--output=logs/%x_%j.out` AND `--error=logs/%x_%j.err`
(SLURM does not create the log directory; a missing one kills the job with no log).
- Config path from the environment with a default: `CC_CFG="${CC_CFG:-configs/urban_cc.yaml}"`.
- Threads are set **in Python** from `SLURM_CPUS_PER_TASK` (das_ani `cc._set_thread_env`); do not export
`OMP_NUM_THREADS` in the script — it gets overridden or oversubscribes.
- GPU jobs: request the type with `--constraint` (the `gpu` partition mixes V100 / RTX 3090 / L40S / H100;
Pascal and V100 lack bf16/TF32), give the CPU side enough cores, stop at once when CUDA is absent, and
pin TF32 off in code (`torch.backends.cuda.matmul.allow_tf32 = False`,
`torch.backends.cudnn.allow_tf32 = False`); record the executed precision in the run manifest.
## Submit and transfer
- `bash submit.sh [cpu|gpu|eval] [--check|--estimate]`: preflight (config exists, logs dir, modules import,
data_root holds inputs, compiled wheels built on the login node) before `sbatch`; `--estimate` asks
`sbatch --test-only` when each option would start.
- `make sync` pushes code with `--delete` but **excludes** `data/ results/ logs/` and the venv; `make fetch`
pulls products **without** `--delete` and excludes raw archives; `make reachable` checks ssh first.
- Results must be resumable and requeue-idempotent (fingerprinted resume state, skip-and-log) — the same rules
as `benz:core-long-run`.
## Facts to carry
- Bitwise identity is a property of a build: anchors made on the laptop (arm64, torch X) may differ in the
last bit on the cluster (x86-64, torch Y). Gate cross-machine comparisons with a calibrated tolerance.
- Benchmarks are multi-tenant: report ratios at matched parameters, 4 runs, discard warm-up, median of 3.
- Nothing about the cluster is "verified" until it ran there: say "not run on Sherlock" otherwise.
Versions
The database has no other skills named code-hpc.
Database snapshot: 13.11.2026 · package version 43cf6679d87f (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100running-python
Run Python on the Yale SOM HPC cluster with uv, Slurm, thread control, logging, and resumable outputs. TRIGGER when writing Python sbatch scripts for the Yale SOM HPC cluster, creating uv environments under /gpfs, or debugging Python Slurm jobs on the cluster. - 90hpc
Manages HPC/Slurm jobs, GPU allocations, and Singularity containers. Use for slurm, sbatch, srun, gpu, partition, cluster queue, apptainer work. - 100managing-jobs
Submit, monitor, cancel, array, and chain Slurm jobs on the Yale SOM HPC cluster. TRIGGER when running, submitting, or scheduling any job or analysis on the cluster (even phrased plainly, e.g. "run my regression on the cluster"), writing sbatch scripts, choosing… - 100cluster-screening
Use when screening or coding papers on a GPU cluster or batch scheduler instead of an LLM API — emitting a request manifest, submitting a SLURM job, collecting responses, applying them to Zotero. Trigger phrases "screen on the cluster", "run this on SLURM", "sbatch", "GPU node",… - 95openfoam-cluster-ops
Operations handbook for running OpenFOAM on HPC clusters under SLURM (deploy · patrol · harvest · capacity · troubleshooting). Use when running OpenFOAM cases on a cluster (sbatch/squeue/sacct/scancel), deploying case bundles, patrolling job progress, harvesting finished cases… - 100tao-run-on-slurm
Remote SLURM GPU cluster execution over SSH with sbatch/srun, Pyxis/Enroot containers, and Lustre-backed results. Use when running TAO training/eval/inference jobs on an on-prem or DGX SLURM cluster. Trigger phrases include "run on SLURM", "submit sbatch", "DGX SLURM cluster",…