hpc-runtime-doctor
About
This Claude Skill diagnoses runtime and scheduler issues for High-Performance Computing (HPC) materials simulations. It analyzes problems like MPI/OpenMP layout, GPU usage, environment modules, and resource mismatches when jobs fail or underperform on a cluster. Use it to get a diagnosis, environment checklist, and a safe retry plan for portability and performance issues.
Quick Install
Claude Code
Recommendednpx skills add HeshamFS/materials-simulation-skills -a claude-code/plugin add https://github.com/HeshamFS/materials-simulation-skillsgit clone https://github.com/HeshamFS/materials-simulation-skills.git ~/.claude/skills/hpc-runtime-doctorCopy and paste this command in Claude Code to install this skill
Documentation
HPC Runtime Doctor
Goal
Turn cluster symptoms into a resource-layout diagnosis, environment checklist, and safe retry plan.
Requirements
- Python 3.10+
- No external dependencies
- Works on Linux, macOS, and Windows
Inputs to Gather
| Input | Description | Example |
|---|---|---|
| Scheduler | SLURM, PBS, LSF, local | slurm |
| Nodes/tasks/threads | Runtime layout | 2 nodes, 128 tasks, 2 threads |
| GPUs | GPUs requested | 4 |
| 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 |
Decision Guidance
- Check resource layout before changing physics settings.
- Confirm module/compiler/MPI/CUDA consistency before debugging solver behavior.
- Treat missing restart files and scratch cleanup as workflow failures, not physics failures.
- For GPU jobs, confirm the executable was built with the requested accelerator backend.
Script Outputs
scripts/hpc_runtime_doctor.py emits:
resource_layoutdiagnosesenvironment_checksretry_planscheduler_notes
Workflow
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
Error Handling
Invalid resource counts stop with exit code 2. Unknown symptoms are preserved as custom items for human review.
Limitations
This skill does not query a live scheduler. It diagnoses from the submitted layout and symptoms.
Security
- Inputs are scalar CLI values and booleans only.
- The script does not execute scheduler commands or inspect environment variables.
- The skill uses
Bashonly to run its bundled script.
References
- See
references/hpc_runtime_patterns.mdfor scheduler and runtime diagnosis patterns.
Version History
- 1.0.0: Initial HPC runtime diagnosis skill.
GitHub Repository
Related Skills
executing-plans
DesignUse the executing-plans skill when you have a complete implementation plan to execute in controlled batches with review checkpoints. It loads and critically reviews the plan, then executes tasks in small batches (default 3 tasks) while reporting progress between each batch for architect review. This ensures systematic implementation with built-in quality control checkpoints.
requesting-code-review
DesignThis skill dispatches a code-reviewer subagent to analyze code changes against requirements before proceeding. It should be used after completing tasks, implementing major features, or before merging to main. The review helps catch issues early by comparing the current implementation with the original plan.
connect-mcp-server
DesignThis skill provides a comprehensive guide for developers to connect MCP servers to Claude Code using HTTP, stdio, or SSE transports. It covers installation, configuration, authentication, and security for integrating external services like GitHub, Notion, and custom APIs. Use it when setting up MCP integrations, configuring external tools, or working with Claude's Model Context Protocol.
web-cli-teleport
DesignThis skill helps developers choose between Claude Code Web and CLI interfaces based on task analysis, then enables seamless session teleportation between these environments. It optimizes workflow by managing session state and context when switching between web, CLI, or mobile. Use it for complex projects requiring different tools at various stages.
