Diagnoses HPC runtime/scheduler problems: MPI/OpenMP/GPU layout, modules, CUDA/Kokkos hints, scratch paths, walltime, array jobs, restart strategy, resource mismatch. Use when a submitted job failed, ran slowly, or was killed.
Ships in full. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Turn cluster symptoms into a resource-layout diagnosis, environment checklist, and safe retry plan.
| Input | Description | Example |
|---|---|---|
| Scheduler | SLURM, PBS, LSF, local | slurm |
| Nodes/tasks/threads | Runtime layout | 2 nodes, 128 tasks, 2 threads |
| GPUs | Total (whole-job) GPUs via --gpus, or per node via --gpus-per-node | --gpus 4 or --gpus-per-node 1 |
| Symptoms | Observed failure | oom,killed,slow-gpu |
| MPI/OpenMP/GPU use | Parallel modes | mpi+openmp+gpu |
| Walltime | Requested time | 12:00:00 |
| Scratch | Whether scratch is used | true |
scripts/hpc_runtime_doctor.py emits:
resource_layout (includes tasks_per_node, total_cpus, total gpus, and gpus_per_node)diagnosesenvironment_checksretry_planscheduler_noteswarnings (layout flags such as ranks-per-GPU oversubscription, OpenMP/thread mismatch, and uneven task placement)In default (non-JSON) mode the script also prints the resource-layout summary, any
warnings, environment checks, and retry plan, so the most actionable items are never hidden.
--gpus is the total (whole-job) GPU count. Use --gpus-per-node (SLURM
--gres=gpu:N semantics) when you know the per-node allocation; total GPUs are then
gpus_per_node * nodes and it overrides --gpus.
python3 skills/hpc-deployment/hpc-runtime-doctor/scripts/hpc_runtime_doctor.py \
--scheduler slurm \
--nodes 2 \
--tasks 128 \
--cpus-per-task 2 \
--gpus 4 \
--symptoms oom,slow-gpu \
--uses-mpi \
--uses-openmp \
--uses-gpu \
--json
The example above shares 128 ranks across 4 GPUs (32 ranks/GPU), so the
warnings list surfaces Many MPI ranks per GPU (32.0 ranks/GPU) may reduce GPU efficiency. The ranks-per-GPU check uses total ranks over total GPUs, so it fires
correctly on multi-node jobs (the threshold is 16 ranks/GPU).
Invalid resource counts stop with exit code 2. Unknown symptoms are preserved as custom items for human review.
This skill does not query a live scheduler. It diagnoses from the submitted layout and symptoms.
resource_layout block and confirmed tasks_per_node is an integer (no fractional value) and total_cpus equals tasks * cpus_per_task; if tasks_per_node is fractional, the uneven-placement warning was triaged before retrying.gpus (and gpus_per_node when set) and computed ranks/GPU = tasks / gpus, confirming it is at or below the 16 ranks/GPU threshold or that the resulting Many MPI ranks per GPU warning was deliberately accepted.warnings list (OpenMP-with-cpus_per_task=1, GPU-requested-but-zero-GPUs, tasks < nodes, uneven placement, scratch-for-heavy-I/O) and resolved or justified each one rather than ignoring it.environment_checks items as real artifacts: captured the module list, executable path/version, MPI launcher-vs-library match, accelerator build flags (CUDA/Kokkos/OpenMP), and scheduler stdout/stderr.diagnoses entry and verified no symptom landed in the custom category unaddressed (every custom item had stderr/stdout/module list/command line collected for human review).retry_plan: reran the smallest reproducing case, changed exactly one resource variable, enabled restart/checkpoint, and saved the scheduler script plus environment snapshot alongside the results.| Tempting shortcut | Why it's wrong / what to do |
|---|---|
| "It ran without crashing, so the layout is fine." | Run completion is not correctness. Review the warnings list and resource_layout -- oversubscription, uneven placement, or an idle GPU can silently slow or corrupt results without a crash. |
| "Per-node ranks fit the GPUs, so there's no oversubscription." | Oversubscription is total ranks over total GPUs, not per-node. The script computes tasks / gpus; a multi-node job can hide a high ranks/GPU value that only the unit-consistent check exposes. |
"I passed --gpus, so per-node GPU count doesn't matter." | --gpus is the whole-job total. If the cluster allocates per node, use --gpus-per-node (SLURM --gres=gpu:N); it overrides --gpus and total becomes gpus_per_node * nodes. Mixing them up misreports ranks/GPU. |
| "The job was killed, so it's a physics/solver bug." | killed/oom/timeout are scheduler and resource categories, not physics. Check walltime, memory limits, and preemption from stdout/stderr before touching simulation parameters. |
| "An unknown symptom isn't in the rules, so I can skip it." | Unknown symptoms become custom diagnoses, not no-ops. Collect scheduler stderr/stdout, the module list, and the command line for human review -- silence is not a clean bill of health. |
| "Just change ranks, threads, and the build together to fix it faster." | Changing multiple variables at once makes the failure undiagnosable. The retry_plan mandates one variable at a time on the smallest reproducing case. |
--nodes, --tasks, --cpus-per-task, --gpus, --gpus-per-node)
are validated as integers (booleans rejected), required to be non-negative and finite,
and capped at 1,000,000. --nodes, --tasks, and --cpus-per-task must additionally
be at least 1. Out-of-range, non-integer, or zero values exit with code 2.--symptoms string is capped at 64 comma-separated entries of at most 64 characters
each; --walltime is capped at 32 characters. Oversized input exits with code 2.custom diagnoses for human review.--scheduler is accepted as a free-form string and is not checked against an allowlist;
it is only echoed back in the resource layout.--json, otherwise a human-readable summary); errors go to stderr.allowed-tools is Read, Bash, Write, Grep, Glob.Bash is used only to run the bundled scripts/hpc_runtime_doctor.py.Read, Grep, and Glob are used to inspect the skill's own files and any logs or
submission scripts the user points at; Write is used to record diagnosis notes or a
retry plan when asked.eval, exec, os.system, or subprocess; the script does not launch a scheduler
or any external process and does not inspect environment variables.argparse, and machine-readable output is emitted as JSON.references/hpc_runtime_patterns.md for scheduler and runtime diagnosis patterns.resource_layout, warnings, ranks/GPU, environment_checks, diagnoses,
and the retry_plan) and a Common pitfalls & rationalizations table.script_checks.--gpus-per-node argument, integer tasks_per_node with an uneven-placement warning,
full human-readable (non-JSON) output, and input caps for resource counts, symptoms,
and walltime.What SKILL.md sets; muted values are Claude Code's defaults
/full:hpc-runtime-doctorfrom full
npx claudepluginhub heshamfs/materials-simulation-skills --plugin full23 skills in this plugin
/benchmark-and-mms-plannerPlan verification and validation campaigns for simulation codes using manufactured solutions, canonical benchmark problems, grid/time refinement, uncertainty propagation, and pass/fail acceptance criteria. Use when an agent needs to prove a solver, model, or result is trustworthy rather than only plausible.
/convergence-studyPerform spatial and temporal convergence analysis for solution verification — compute observed convergence orders from grid or timestep refinement studies, apply Richardson extrapolation to estimate discretization error, and calculate the Grid Convergence Index (GCI) per ASME V&V 20 standards. Use when verifying that a numerical solution converges at the expected rate, estimating the error on the finest mesh, checking whether grids are in the asymptotic range, or preparing formal verification reports, even if the user only asks "is my mesh fine enough" or "how accurate is my solution."
/differentiation-schemesSelect and apply numerical differentiation schemes for PDE and ODE discretization — generate finite-difference stencils at arbitrary order and accuracy, choose between central, upwind, compact (Pade), and spectral methods, handle boundary stencils, and estimate truncation error scaling. Use when discretizing spatial derivatives, picking a scheme for advection- or diffusion-dominated problems, building custom stencils for nonstandard operators, or comparing dispersion and dissipation properties of candidate schemes, even if the user just says "how do I approximate this derivative" or "my solution is too diffusive."
/fair-simulation-packagerCreate FAIR-minded reproducibility bundles for materials simulations by collecting input/output file inventories, hashes, units, engine versions, structure identifiers, provenance, and NOMAD/OPTIMADE/Materials Project friendly metadata. Use before publishing, sharing, archiving, or handing simulation results to another agent.
/linear-solversSelect and configure linear solvers for Ax=b systems arising in numerical simulations — choose between direct (LU, Cholesky) and iterative (CG, GMRES, BiCGSTAB, MINRES) methods, analyze sparsity patterns and matrix conditioning, recommend preconditioners (AMG, ILU, IC), apply row/column scaling, and diagnose convergence stagnation from residual histories. Use when setting up a linear solve for FEM/FVM assembly, debugging slow or stalled Krylov iterations, choosing a preconditioner for SPD or nonsymmetric systems, or investigating ill-conditioning, even if the user only says "my solver is slow" or "GMRES won't converge."
/md-analysis-plannerPlan molecular dynamics post-processing for materials simulations, including RDF, MSD and diffusion, VACF/VDOS, coordination numbers, bond-angle distributions, stress-strain curves, equilibration detection, PBC unwrapping, and trajectory format choices. Use before writing MD analysis scripts or trusting trajectory-derived results.
Other plugins' skills for the same job