Logo: Hpc Runtime Doctor

Hpc Runtime Doctor

Communautéit
HeshamFS
hpc-runtime-doctor

Diagnostizéiert Problemer mat der HPC-Runtime an dem Scheduler bei Materialsimulatiounen, dorënner MPI/OpenMP/GPU-Layout, Moduler, CUDA/Kokkos-Hinweiser, Scratch-Pfaden, Walltime, Job-Arrays, Restart-Strategie, Scheduler-Portabilitéit a Ressource-Mismatch. Benotzt dëse Skill, wann en Job, deen SCHONN OFGESCHÉCKT gouf, gescheitert ass, lues gelaf ass, ofgebrach gouf oder sech op engem Cluster anescht verhält wéi op enger Workstation. Fir e Skript fir eng NEI Job-Ofschécken ze schreiwen oder ze kontrolléieren, ier Dir et ausféiert, benotzt slurm-job-script-generator amplaz.

Add to TypingMind

Iwwersiicht

EditeurHeshamFS
Repositorymaterials-simulation-skills
Skill-Nummhpc-runtime-doctor
Stären
83
Forks
6
Matgeliwwert Dateien
4
LizenzApache-2.0
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 4 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    HeshamFS huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Hpc Runtime Doctor an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/HeshamFS/materials-simulation-skills/tree/main/skills/hpc-deployment/hpc-runtime-doctor
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/HeshamFS/materials-simulation-skills.git /tmp/materials-simulation-skills
mkdir -p .claude/skills
cp -r /tmp/materials-simulation-skills/skills/hpc-deployment/hpc-runtime-doctor .claude/skills/hpc-runtime-doctor
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Hpc Runtime Doctor an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Hpc Runtime Doctor automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Hpc Runtime Doctor net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

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

InputDescriptionExample
SchedulerSLURM, PBS, LSF, localslurm
Nodes/tasks/threadsRuntime layout2 nodes, 128 tasks, 2 threads
GPUsTotal (whole-job) GPUs via --gpus, or per node via --gpus-per-node--gpus 4 or --gpus-per-node 1
SymptomsObserved failureoom,killed,slow-gpu
MPI/OpenMP/GPU useParallel modesmpi+openmp+gpu
WalltimeRequested time12:00:00
ScratchWhether scratch is usedtrue

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_layout (includes tasks_per_node, total_cpus, total gpus, and gpus_per_node)
  • diagnoses
  • environment_checks
  • retry_plan
  • scheduler_notes
  • warnings (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.

Workflow

--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.

bash
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).

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.

Verification checklist

  • Recorded the script's 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.
  • For GPU jobs, recorded the resolved total 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.
  • Reviewed every entry in the 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.
  • Completed the 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.
  • Mapped each observed symptom to a 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).
  • Followed the 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.

Common pitfalls & rationalizations

Tempting shortcutWhy 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.

Security

Input Validation

  • Inputs are scalar CLI values and booleans only; there is no free-form code path.
  • Resource counts (--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.
  • The --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.
  • Symptoms are split, trimmed, and lower-cased. Unknown symptoms are not rejected: they are preserved as 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.

File Access

  • The script reads and writes no files. All I/O is CLI args in and stdout out (indented JSON with --json, otherwise a human-readable summary); errors go to stderr.
  • Because no paths are accepted or opened, there is no filesystem traversal surface and no path-sandboxing concern.

Tool Restrictions

  • 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.

Safety Measures

  • No eval, exec, os.system, or subprocess; the script does not launch a scheduler or any external process and does not inspect environment variables.
  • Argument parsing is handled by argparse, and machine-readable output is emitted as JSON.
  • DoS exposure is bounded by the resource-count cap (1,000,000), the symptom caps (64 entries x 64 characters), and the walltime cap (32 characters).

References

  • See references/hpc_runtime_patterns.md for scheduler and runtime diagnosis patterns.

Version History

  • 1.1.3: Added a Verification checklist (evidence-based items tied to resource_layout, warnings, ranks/GPU, environment_checks, diagnoses, and the retry_plan) and a Common pitfalls & rationalizations table.
  • 1.1.1: Discriminating evals -- each case now pins the script's specific output (exact ranks-per-GPU warning, diagnosis categories, resource-layout fields) via deterministic script_checks.
  • 1.1.0: Unit-consistent ranks-per-GPU warning (total ranks / total GPUs), new --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.
  • 1.0.0: Initial HPC runtime diagnosis skill.

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Hpc Runtime Doctor?

Diagnostizéiert Problemer mat der HPC-Runtime an dem Scheduler bei Materialsimulatiounen, dorënner MPI/OpenMP/GPU-Layout, Moduler, CUDA/Kokkos-Hinweiser, Scratch-Pfaden, Walltime, Job-Arrays, Restart-Strategie, Scheduler-Portabilitéit a Ressource-Mismatch. Benotzt dëse Skill, wann en Job, deen SCHONN OFGESCHÉCKT gouf, gescheitert ass, lues gelaf ass, ofgebrach gouf oder sech op engem Cluster anescht verhält wéi op enger Workstation. Fir e Skript fir eng NEI Job-Ofschécken ze schreiwen oder ze kontrolléieren, ier Dir et ausféiert, benotzt slurm-job-script-generator amplaz.

Firwat Hpc Runtime Doctor op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Hpc Runtime Doctor besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Hpc Runtime Doctor an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/HeshamFS/materials-simulation-skills/tree/main/skills/hpc-deployment/hpc-runtime-doctor an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Hpc Runtime Doctor benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Hpc Runtime Doctor benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Hpc Runtime Doctor domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Hpc Runtime Doctor gratis?

Jo. HeshamFS huet de Skill ënner der Lizenz Apache-2.0 op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇