hpc-deucalion
Skill1 starsChanged 6 months agoMITView on GitHub
Operate AEGIS-KG on Deucalion HPC: SLURM, sbatch, srun, compute nodes, Lmod modules, $SCRATCH/$WORK, GPU partitions. Use when running on deucalion, hpc, slurm, or cluster.
- Reads credentials
- Deletes or force-pushes
- Installs packages
- Commits and pushes
In this repository41 other files it gives its agents.
- AGENTS.mdAGENTS.md
- academic-evaluationSkill
- academic-writingSkill
- agent-orchestrationSkill
- agents-md-writerSkill
- algorithmic-artSkill
- brand-guidelinesSkill
- codebase-architectureSkill
- code-reviewSkill
- commit-workflowSkill
- context-checkpointSkill
- doc-coauthoringSkill
- docxSkill
- etl-runnerSkill
- eval-runnerSkill
- feature-devSkill
- frontend-designSkill
- internal-commsSkill
- langchainSkill
- langfuseSkill
- langgraphSkill
- llm-observability-stackSkill
- mcp-builderSkill
- neo4j-verifySkill
- pdfSkill
- pptxSkill
- project-conventionsSkill
- python-best-practicesSkill
- react-namingSkill
- security-hooksSkill
- service-verifySkill
- skill-creatorSkill
- skill-inspectorSkill
- slack-gif-creatorSkill
- sprint-contractSkill
- theme-factorySkill
- uml-modelingSkill
- webapp-testingSkill
- web-artifacts-builderSkill
- web-debugSkill
- xlsxSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 131
When you sync updated Python files to Deucalion (via scp, rsync, or tar extract) the cluster's _archive/.../markdown_parser.py is fresh but …
- Very specific: line 160
Always chmod +x after the copy if the destination is a script.
- Distinctive: line 216
If 2FA is required, follow the cluster's MFA flow (typically TOTP + SSH key).
- Distinctive: line 246
Use this path — it's faster and more stable than the module.
- Very specific: line 424
If the GPU queue is long, see the queue strategy in references/07-slurm-jobs.md and the human-oriented docs/deucalion/08-hpc-workflow.md in …
- Distinctive: line 430
Stop and report to the user if:
- Distinctive: line 443
All site-specific values are real.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
HPC Deucalion
Operational knowledge for running AEGIS-KG on the Deucalion supercomputer. Deucalion is a shared HPC cluster: it uses SLURM for scheduling, Lmod for software modules, has login nodes (interactive, lightweight) and compute nodes (batch, dedicated), and exposes tiered storage. Most local-workstation assumptions (free Docker, persistent background services, free port use) do not apply.
Progressive disclosure: SKILL.md (this file) gives the operational rules and quick-start. Detailed topics live in
references/. Copy-pasteable job scripts live inexamples/. The companion tutorial for humans lives indocs/deucalion/README.md.
When to Activate
Activate this skill when any of the following is true:
- The user mentions "deucalion", "hpc", "supercomputer", "cluster", "slurm", "sbatch", "srun", "squeue", "login node", "compute node", "gpu partition", "module load", "$SCRATCH", "$WORK", or "walltime".
- The user asks to run eval/ETL/agent workloads at scale on a shared cluster.
- A workflow needs Neo4j or Ollama as long-running services (these must go on compute nodes, not login nodes).
- A planned change involves pip-installing heavy packages, moving large CSVs, or running a job longer than a few minutes.
Staged launch process (MANDATORY, 2026-09-04)
Do NOT submit a job to Deucalion until each previous stage is green.
| Stage | Where | What | Tool | Pass criterion |
| 0. Local preflight | workstation | bash -n + lint + import smoke + deterministic-only run + cache check | bash scripts/hpc/preflight_local.sh [--models "<tags>"] | prints "PREFLIGHT OK" — catches .pyc stale, missing imports, syntax breaks, cache miss before any cluster cost. |
| 1. Cluster smoke (1 GPU) | Deucalion login → sbatch | cheapest model (e.g. ornith:9b) on dev-a100-40, walltime 30 min | sbatch -J aegis_smoke_<model> --partition=dev-a100-40 --gres=gpu:a100:1 … | warm-up OK + run_full completes with docs in output/scout_full_<JOB>/. |
| 2. Real run (1 GPU) | Deucalion login → sbatch | the actual model on the partition gpu-pick.sh chose | sbatch -J <job-name> | 9 docs + xlsx in output/run_<tag>_<case>_<JOB>/. |
| 3. Scale | Deucalion login → sbatch | multiple models/cases in parallel (one per node) | bash scripts/runs_tools/status.sh then submit | distributed across distinct nodes (no two jobs on the same node for the Ollama 11434 port). |
Why staging matters — confirmed wins (2026-09-02):
- 4 scouts
FAILEDbecause Ollama crashed at 5 min (port 11434 collision on same node). - 3 jobs
FAILEDwith empty logs (pre-cluster update ofrun-full-m-aegis.sbatch). - 5 jobs
FAILEDbecause model tags were wrong (cache miss + no egress). - 2 jobs
COMPLETEDbut produced 0 docs becauserun_allaborted before OUTPUT stage (patched upstream as CORR-114).
Each class is preventable. Stage 0 catches about half before cluster, the others between stages 1 and 2.
Hard Rules (Non-Negotiable)
These apply to any Deucalion work, regardless of task. Violating any of them is a STOP and report to user.
| # | Rule | Why |
| 1 | Never run heavy work on a login node. Login nodes are shared; CPU/disk-heavy work (pip install with compilation, ETL, eval) is forbidden and will be killed. | Multi-user fairness. |
| 2 | All long-running services (Neo4j, Ollama, Langfuse) run inside sbatch/srun on a compute node. They get killed when the job ends — design for that. | Services must not outlive their job. |
| 3 | Neo4j ports stay 7688 (Bolt) / 7475 (HTTP). Never hardcode 7687/7474 on Deucalion (those are reserved for the local D3Fend dev container). | Project-wide port invariant. |
| 4 | Code lives in ~/aegis-kg (NFS, 22TB). Lustre is /projects/F202512235CPCAA1/. Do NOT assume $WORK/$SCRATCH env vars exist. | Storage tier policy. |
| 5 | Use a per-project venv inside the cloned repo, not a shared venv on $HOME. HPC sites wipe $HOME shells or move users between login nodes. | Reproducibility. |
| 6 | Langfuse is opt-in. Default is LANGFUSE_ENABLED=false. Self-hosting on HPC adds Postgres+Clickhouse+Redis+MinIO overhead — only enable if user explicitly asks. | Cost / complexity. |
| 7 | Never put secrets in sbatch scripts or job stdout. Use ~/.aegis_env (mode 600) and source it from the job script. | Credential safety. |
| 8 | Always set --chdir (or cd in the script) to the job submission directory. HPC file systems behave differently on login vs compute nodes. | Reproducibility. |
| 9 | Read references/10-checklist.md before submitting any job. It is the single source of truth for pre-flight. | Discipline. |
| 10 | Stop and ask the user if you do not know the SLURM account (-A), partition (-p), QoS (-q), or walltime limit. These are site-specific. | Wrong flags = job rejected. |
Standard facts — learned the hard way, do not relitigate
These are facts that have bitten us in real sessions. Treat them as known facts from now on; if a new situation contradicts them, gather evidence and surface it rather than re-deriving.
Ollama model tags (must match the exact library name)
| Tag | Library dir on cluster |
granite4.2:30b | .../ollama_data/models/manifests/registry.ollama.ai/library/granite4.2/ |
muse-glimmer:30b | .../library/muse-glimmer/ |
qwen3.8:27b | .../library/qwen3.8/ |
qwen3.5:27b | .../library/qwen3.5/ |
qwen3.5:9b | .../library/qwen3.5/ |
gemma4:26b | .../library/gemma4/ |
gemma4:e2b / gemma4:e4b | .../library/gemma4/ |
nemotron-3.5-lightning:30b | .../library/nemotron-3.5-lightning/ |
ornith:9b | .../library/ornith/ |
glm-4.7-flash:latest | .../library/glm-4.7-flash/ |
gpt-oss:20b | .../library/gpt-oss/ |
phi4:14b | .../library/phi4/ |
mistral:7b, ministral-3:8b, llama3.2:1b | .../library/{mistral,ministral-3,llama3.2}/ |
Trap to avoid: short-form tags (nemotron3.5:30b, granite:30b,
ornith-1.5:9b) silently trigger ollama pull — which fails because
the cluster has no egress to https://registry.ollama.ai from
compute nodes. Result: minutes wasted, job aborts. Verify the cache
directory before sbatch, not the tag string alone. Use
examples/gpu-pick.sh <tag> to also pick the right partition.
Two Ollama binaries — pick the right one for the model
| Binary | Version | Used for |
$BD/bin/ollama ($BD=/projects/F202512235CPCAA1/CyberMetric_Deucalion) | 0.31.1 | serve for known architectures (gemma3/4, qwen3.x, llama, mistral, phi, granite4.2, muse-glimmer) |
$BD=/projects/F202512235CPCAA1/graphify-methodology/bin/ollama (+ lib/ollama in LD_LIBRARY_PATH) | 0.32.13 | serve for unknown/edge architectures AND the only one that can ollama pull modern manifests |
0.31.1 cannot resolve modern manifests (granite4.2:30b fails with
unknown model architecture). When in doubt, use 0.32.13 from
graphify-methodology/.
Parallel jobs (proven pattern, 2026-09-02)
- Across nodes: safe. Multiple scouts on different nodes each get
their own GPU and port 11434 — confirmed with JOBs 1869099/100/101.
Each lives on its own
--gres=gpu:1. - Same node: 2 jobs collide on
11434(Ollama server). Resource contention shows up asConnection refusedin the 2nd job and the warm-up fails. Mitigation: checksqueue -o "%.6R"(Reason column); if both jobs say the same node and it isn't yet fully routed, cancel and submit again. - Walltime budgets (as of 2026-09-02, battle-tested):
- Phase 1B scout (4 LLM calls + Doc 05 only): 30 min.
- Phase 1+2+3 scout-full (full pipeline, 9 docs + xlsx): 1 h 30.
- Full run-all (warm-up + pipeline + bulk output): 8 h.
Stale .pyc cache after a code sync (proven 2026-09-02)
When you sync updated Python files to Deucalion (via scp, rsync, or
tar extract) the cluster's _archive/.../markdown_parser.py is
fresh but the corresponding __pycache__/*.pyc is stale. Python
happily loads the old bytecode, finds ImportError: cannot import name
'X', and the job aborts ~1 minute after warm-up with a confusing trace.
Always include these in sbatch scripts before python is invoked:
echo "=== wiping stale .pyc + __pycache__ (defense-in-depth) ==="
find "$PROJ/src" -name "__pycache__" -type d -exec rm -rf {} + 2>/dev/null || true
find "$PROJ/src" -name "*.pyc" -delete 2>/dev/null || true
PYTHONDONTWRITEBYTECODE=1
export PYTHONDONTWRITEBYTECODEThe byte-code-suppression flag is also useful for --gres shared GPU
runs where two Python processes might write to the same __pycache__
directory simultaneously and corrupt each other.
scp and $HOME quota
- The user's
$HOMEon Deucalion has a tight quota (a few GB).scp ... ~/often fails withDisk quota exceeded. Stage through/tmp(per-job, auto-cleared):scp foo.py user@login:/tmp/, thenssh user@login 'cp /tmp/foo.py <dest>'. - Two
scpcalls with the same basename to the same/tmp/overwrite each other (no subdir mapping). Use unique basenames, or combine into a singletar -czfirst. - Always
chmod +xafter the copy if the destination is a script.
Job-name uniqueness — squeue is unreadable if everything is aegis_scout
The --job-name directive is pre-evaluated; you cannot use $1 in it.
For multiple parallel scouts, pass the sanitised model tag via the
sbatch CLI:
sbatch -J "aegis_<sanitised-tag>_full" <script> <model:tag>where <sanitised-tag> is the model tag with : and . replaced by
_. Use the wrapper scripts/scouts/scout-full-submit.sh to print the
exact line — otherwise each scout ends up with the same
aegis_scout_full job-name and squeue becomes a wall of duplicates.
Egress
Compute nodes cannot reach registry.ollama.ai (HTTPS timeout). New
models must be pulled on the login node with the graphify
0.32.13 binary in /projects/F202512235CPCAA1/graphify-methodology,
then the manifests land in the shared
/projects/F202512235CPCAA1/CyberMetric_Deucalion/ollama_data/models/
cache and are visible to compute nodes.
Monitoring jobs
squeue -u $USER— quick status (only running/pending; finished jobs drop off after a few minutes).sacct -j <JOBID> --format=JobID,State,ExitCode,Elapsed,MaxRSS— post-mortem state and resource use.scontrol show job <JOBID>— full live state (good for diagnostics like Reason, StdOut path, NodeList).cat /projects/<...>/<project>/logs/scout_runs/scout_<tag>_<JOB>.logfor the per-run structured log (preferred overslurm-*.out).cat /projects/<...>/<project>/slurm-<script>-<JOB>.outfor stdout/stderr (slurm-managed, slow to appear).
Path conventions for AEGIS-Phase-1
- Active project dir:
/projects/F202512235CPCAA1/CyberMetric_Deucalion/aegis-phase1. (The old~/aegis-kgpath is the CORR-057 eval layout; superseded.) - Output dirs (created by
--output):output/run_<model>_<JOB>for full run-alls.output/scout_<model>_<JOB>for Phase 1B-only scouts.output/scout_full_<JOB>for pipeline-complete scouts.
- Run logs:
logs/scout_runs/scout_<tag>_<JOB>.log. - Per-model JSONL traces:
logs/phase1/<model>/v2/pipeline_<model>.log.
Quick-Start (5 Steps)
- Access. SSH to the login node:
If 2FA is required, follow the cluster's MFA flow (typically TOTP + SSH key).ssh -i /home/epmq-cyber/.ssh/id_ed25519 paulinho@login.deucalion.macc.fccn.pt - Clone the repo (code lives in
~/aegis-kg).# Deucalion has no $WORK. Code in ~/aegis-kg. cd ~ # HTTPS git clone fails (needs auth). Use tar+scp from workstation: # on workstation: tar --exclude='.venv' --exclude='__pycache__' -czf aegis-kg.tgz aegis-kg/ # scp aegis-kg.tgz paulinho@login.deucalion.macc.fccn.pt:~ # on cluster: tar xzf aegis-kg.tgz - Load the modules and create the venv (interactively, on a login node is
OK for this step — no heavy compute). Modules need login shell. If
module loadfails, usebash -lc 'python ...'. venv needs--system-site-packages(see references/04). Seereferences/04-environment-setup.md. - Submit a scout first, then the heavy work via
sbatch.examples/scout.sbatch— 5 min CPU job that prints a full environment reportexamples/test-ollama-gpu.sbatch— real run with Ollama on GPU + Langfuse Cloudexamples/test-ollama-cpu.sbatch— CPU fallback when no GPU availableexamples/neo4j-server.sbatch— start Neo4j on a compute nodeexamples/ollama-gpu.sbatch— start Ollama (with GPU) on a compute nodeexamples/eval-batch.sbatch— run the eval harness in batchexamples/run-etl.sbatch— run the ETL pipeline
- Monitor with
squeue -u $USERand read job logs fromslurm-<JOBID>.out. Seereferences/07-slurm-jobs.mdfor full inspection/debugging.
Ollama on Deucalion
Ollama is pre-installed at /projects/F202512235CPCAA1/CyberMetric_Deucalion/bin/ollama.
Use this path — it's faster and more stable than the module.
# In your sbatch scripts (or login shell):
export PATH="/projects/F202512235CPCAA1/CyberMetric_Deucalion/bin:$PATH"
export LD_LIBRARY_PATH="/projects/F202512235CPCAA1/CyberMetric_Deucalion/lib/ollama:$LD_LIBRARY_PATH"
export OLLAMA_MODELS="/projects/F202512235CPCAA1/CyberMetric_Deucalion/ollama_data/models"Models are pre-loaded in the shared cache above. To add new models,
run examples/download-models.sbatch (a separate sbatch job on
normal-a100-40). Do NOT ollama pull inside AEGIS-KG jobs — compute
nodes have spotty egress to registry.ollama.ai.
vLLM on Deucalion (AEGIS-KG CORR-110, 2026-09-02, unverified)
For models that the local Ollama 0.31.1 daemon refuses to load
(Qwen3.8-Flash-Next, qwen3.8:27b, anything outside the known-arch
list), or when you want the exact HF model id with no tag drift,
use vLLM. The aegis-phase1 pipeline talks to any OpenAI-compatible
HTTP server through ChatOpenAICompat (no new project dep — only
httpx).
# Pilot sbatch (single-job, TP=8 on dev-a100-80 for Qwen3.8-Flash-Next):
sbatch /projects/F202512235CPCAA1/CyberMetric_Deucalion/aegis-phase1/examples/deucalion/scout-vllm-qwen-flash-next-aegis.sbatch
# Override default scope (run-all → phase-1b for cheap scout):
sbatch --export=AEGIS_SCOPE=phase-1b \
/projects/F202512235CPCAA1/CyberMetric_Deucalion/aegis-phase1/examples/deucalion/scout-vllm-qwen-flash-next-aegis.sbatchPrereqs: weights pre-staged on Lustre under
$BD/models/hf/Qwen_Qwen3.8-Flash-Next/ (~360 GB — no egress from
compute nodes); a venv with vllm at $AEGIS_VLLM_VENV
(default /projects/F202512235CPCAA1/cybermetric-vllm-cache/venv —
the sibling project's working install, but verify it still works
after a cluster change). The pilot sbatch defaults to TP=2 on
A100-40 (sized for the original gemma-4-31B-it pilot); you MUST
override --gres=gpu:a100:8 and -p dev-a100-80 before submitting
for Qwen3.8-Flash-Next (125B+ params ≈ 360 GB BF16 — won't fit
otherwise). Recipe details + patterns A/B/C + TP=N sizing + likely
gotchas: see references/11-running-vllm.md. The branch carrying
the wiring is feature/aegis-p1-corr-110-vllm-provider in
aegis-phase1. No successful cluster run logged yet — the
section above is the documented recipe, not a verified pattern.
Ollama version split (2026-09-01, battle-tested)
There are two Ollama binaries on the cluster and they are NOT interchangeable:
| Binary | Version | Use for |
$BD/bin/ollama ($BD = /projects/F202512235CPCAA1/CyberMetric_Deucalion) | 0.31.1 | ollama serve for models whose architecture it knows (gemma3/gemma4, qwen3.x, llama, mistral, phi, granite4.2) |
/projects/F202512235CPCAA1/graphify-methodology/bin/ollama (+ lib/ollama in LD_LIBRARY_PATH) | 0.32.13 | ollama pull of NEW model tags (0.31.1 cannot resolve modern manifests — granite4.2:30b fails, granite4.2:30b vs granite4:30b matters) AND serve for models whose renderer/arch it doesn't know (muse-glimmer → unknown model architecture under 0.31.1) |
Pull recipe (login node, spotty egress): serve 0.32.13 locally, pull
one model at a time with timeout 600, verify the manifest appeared
under ollama_data/models/manifests/registry.ollama.ai/library/<model>/.
Exact tag names matter — check the Ollama library page first
(granite4.2:30b exists; granite4:30b does not; nemotron-3.5-lightning:30b,
muse-glimmer:30b|latest, ornith:9b all pulled successfully 2026-09-01).
AEGIS Phase 1 scout recipe (2026-09-01, battle-tested)
The aegis-phase1 project runs model scouts (Phase 1B only: 4 LLM calls)
on dev-a100-80. Use the generic sbatch
aegis-phase1/examples/deucalion/scout-bench-m-aegis.sbatch — pass the
model as a positional argument, never via --export (flaky):
# from the aegis-phase1 dir on the login node:
sbatch examples/deucalion/scout-bench-m-aegis.sbatch granite4.2:30bRules encoded in that sbatch (do not relearn the hard way):
- Sequential, never parallel. One Ollama per node. Three 30B scouts
in parallel →
Connection refused/Server disconnectedon all of them. Submit, wait for SUCCESS, then submit the next. - Logs to NFS, not compute-node scratch:
--out/--errpoint to$PROJ/slurm-scout-bench-m-<JOBID>.{out,err}and a run log to$PROJ/logs/scout_runs/scout_<model>_<JOBID>.log. Scratch logs are unrecoverable after the job ends. - Warm-up with retries before python. 5 attempts, 180s timeout each; abort before wasting the pipeline run if the model won't load.
- Walltime: budget ≥2× the slowest previous scout (qwen3.8 = 18 min, ornith:9b = 5:36, 30B models ≈ 15-25 min). 30 min is the working default for Phase 1B scouts on 1× A100-80.
- Active project dir:
/projects/F202512235CPCAA1/CyberMetric_Deucalion/aegis-phase1(NOT~/aegis-kg— that is the old CORR-057 eval layout). - Monitor:
squeue -u $USER+sacct -X -j <JOBID> -n -P -o "JobID,State,ExitCode,Elapsed". Success =STATUS: SUCCESSin the run log ANDrationale_by_reg has 2 entriesin stderr. - Post-run: scp Doc 05 to the local mirror
<workspace>/Deucalion/results/<model>_<jobid>/, then evaluate:PYTHONPATH=src python3 scripts/eval/generate_report.py --run-dir <mirror_dir> --preproc preproc_out --output-{dir,md,json} ... --use-parser-gate(seeexecution/reports/EVAL_PROTOCOL.mdfor the judge pass).
Operational Cheat Sheet
| Need | Command |
| Check queue | squeue -u $USER |
| Cancel a job | scancel <JOBID> |
| Detailed job info | scontrol show job <JOBID> |
| Job efficiency / why pending | sacct -j <JOBID> --format=JobID,State,Reason,Elapsed,MaxRSS,NTasks |
| Disk usage | myquota (or lfs quota -u $USER /work) |
| Available partitions | sinfo -o "%P %a %D %t" | sort |
| Module list | module avail |
| Loaded modules | module list |
| Show module contents | module show python/3.11 |
| GPU nodes available | sinfo -p gpu -o "%P %D %G" |
| Pre-load model | sbatch examples/download-models.sbatch |
| Model cache path | /projects/F202512235CPCAA1/CyberMetric_Deucalion/ollama_data/models |
| Ollama binary | /projects/F202512235CPCAA1/CyberMetric_Deucalion/bin/ollama |
| Attach to running job (debug) | srun --jobid=<JOBID> --pty bash (if granted) |
Topic Index — Read on Demand
| Topic | File |
| What Deucalion is, accounts, fair-use | references/00-overview.md |
| SSH, login nodes, 2FA, X11 | references/01-access.md |
$HOME / $SCRATCH / $WORK, quotas, performance | references/02-storage.md |
| Lmod, Python, CUDA, GCC, MPI | references/03-software-stack.md |
venv, PYTHONPATH, .env, pip install | references/04-environment-setup.md |
| Neo4j on a compute node | references/05-running-neo4j.md |
| Ollama + GPU, vLLM alternative | references/06-running-ollama.md |
sbatch anatomy, partitions, QoS, accounts | references/07-slurm-jobs.md |
| ETL / eval / batch orchestration | references/08-data-pipeline.md |
| Quota, GPU, OOM, network, port issues | references/09-troubleshooting.md |
| Pre-flight checklist (always read) | references/10-checklist.md |
| vLLM (CORR-110, AEGIS-KG pipeline provider) | references/11-running-vllm.md |
Templates (Copy-Paste)
| Script | Purpose | When to use |
examples/scout.sbatch | Environment report (account, modules, GPU, internet) | Always first — 5 min, no GPU needed |
examples/test-ollama-gpu.sbatch | Real run: Ollama + agent + Langfuse Cloud | GPU available, end-to-end test |
examples/test-ollama-cpu.sbatch | CPU fallback: same pipeline, 10-60x slower | GPU queue >24h or no GPU access |
examples/download-models.sbatch | Pre-pull Ollama models into shared cache | New model needed, before first GPU run |
examples/env-setup.sh | Idempotent env + module loader for login sessions | Source from job scripts |
examples/neo4j-server.sbatch | Start Neo4j on a compute node | When adding Neo4j back to the pipeline |
examples/ollama-gpu.sbatch | Start Ollama on a GPU compute node (as a service job) | Pattern B (shared service for many workers) |
examples/eval-batch.sbatch | Submit eval tasks (1+ tasks, N trials) | Full eval with Neo4j |
examples/run-etl.sbatch | Run an ETL phase end-to-end | ETL with Neo4j |
examples/gpu-pick.sh | VRAM estimate + smallest-fit partition for a model tag | Before any sbatch that picks a partition based on the model |
How This Skill Coordinates with Others
neo4j-verify— invoke before any Neo4j work (HPC or not). Port rules still apply (7688/7475).etl-runner— invoke when running ETL. On HPC, the execution part of ETL must go throughsbatch(seeexamples/run-etl.sbatch).eval-runner— invoke when running eval. On HPC, prefer batch mode withexamples/eval-batch.sbatchinstead of interactive runs.python-best-practices— still required for any Python change. venv location differs (per-project inside~/aegis-kginstead of~/shared-venv).agents-md-writer— invoke when updatingdocs/deucalion/orAGENTS.mdsections related to Deucalion.
Async Workflow on Deucalion
Running on HPC is asynchronous: you submit, the scheduler decides when your job runs, and you collect results later. The full cycle is:
- Workstation:
git pushyour changes - Login node:
cd ~/aegis-kg && git pull, edit.aegis_envif needed - Login node:
sbatch scout.sbatchto verify environment - Login node:
sbatch test-ollama-gpu.sbatch(or-cpu) - Login node:
squeue -u $USER+tail -f slurm-<JOBID>.outto monitor - Job ends: results land in
~/aegis-kg/results/<JOBID>/ - Workstation:
rsyncresults back, inspect, iterate
If the GPU queue is long, see the queue strategy in
references/07-slurm-jobs.md and the human-oriented
docs/deucalion/08-hpc-workflow.md in the consuming project.
Stop Conditions
Stop and report to the user if:
- The user gives an ambiguous account/partition/QoS — wrong flags = job rejected.
- A required module is missing on the cluster (
module availshows nothing). - The job hits a quota error — do not retry blindly.
- The user asks to "make Neo4j persistent across jobs" — this requires site-specific setup (e.g., a reserved service node). Confirm before attempting.
- A
sbatchscript will run >24h without checkpointing — design needs review.
Placeholders
All site-specific values are real. No placeholders to substitute.
| Placeholder | Real value | Source |
<DEUCALION_LOGIN_HOST> | login.deucalion.macc.fccn.pt | Confirmed via SSH |
<DEUCALION_ACCOUNT_GPU> | f202512235cpcaa1g | sacctmgr show assoc user=$USER |
<DEUCALION_ACCOUNT_X86> | f202512235cpcaa1x | Same |
<DEUCALION_PARTITION_GPU> | dev-a100-40 (short jobs <=4h) / normal-a100-40 (<=2d) | sinfo -p gpu |
<DEUCALION_PARTITION_X86> | dev-x86 (short) / normal-x86 (longer) | sinfo -p x86 |
<DEUCALION_QOS> | normal | sacctmgr show qos |
<DEUCALION_WORK> | /projects/F202512235CPCAA1 (Lustre, 8.2PB) | ls /projects/... |
<DEUCALION_SCRATCH> | /tmp (no persistent scratch; use /tmp/$JOBID per job) | df -h /tmp |
<DEUCALION_PYTHON_MODULE> | Python/3.11.3-GCCcore-12.3.0 | module avail python |
<DEUCALION_CUDA_MODULE> | (auto via ollama module deps) | -- |
<DEUCALION_OLLAMA_BIN> | /projects/F202512235CPCAA1/CyberMetric_Deucalion/bin | Pre-installed |
<DEUCALION_OLLAMA_MODELS> | /projects/F202512235CPCAA1/CyberMetric_Deucalion/ollama_data/models | Pre-loaded (102 blobs) |
<DEUCALION_OLLAMA_MODULE> | ollama/0.20.3-GCCcore-14.2.0-CUDA-12.8.0 (alternative to binary) | module avail ollama |
<REPO_URL> | (HTTPS clone fails) — use tar+scp | -- |
<BRANCH> | main | -- |
Error playbook (2026-09-02 + 2026-09-04 lessons)
Run grep -ho "<token>" ~/.zcode/cli/rollout/*.jsonl | sort | uniq -c | sort -rn
on the prior sessions to count these if you're unsure. Recurring errors
with their cause and the resolver:
Symptom (in scout_runs/run-*.log or slurm-*) | Cause | Fix |
model 'X' not found (404) | pull interrupted → blobs cached but no manifest dir under library/<name>/<tag> | bash scripts/hpc/pull-verify.sh X on login node (re-pulls the manifest in seconds when blobs are present). |
cannot import name 'P1BLLM02Parser' (or any other class) after a scp/tar sync | .pyc stale in __pycache__/ (Python found old bytecode that references a class that no longer exists in the source) | every sbatch must run find "$PROJ/src" -name __pycache__ -type d -exec rm -rf {} + + PYTHONDONTWRITEBYTECODE=1 before invoking Python (now part of every hardened sbatch + _lib/common.sh). |
Ollama not reachable at http://localhost:11434 (probe from invoke_raw) | two Ollama-serving jobs on the same GPU node compete for port 11434 | new sbatches compute PORT=$((11434 + JOBID % 20000)) and export OLLAMA_HOST=127.0.0.1:$PORT + OLLAMA_BASE_URL (the UnifiedInvoker already reads OLLAMA_BASE_URL). |
Pipeline aborted — MAP mostly failed (X/10 domains) after which no docs were written | old run_all re-raised MapPartialFailure before reduce()+generate_outputs() ran. Patched in CORR-114 (orchestrator.run_all now catches, renders partial docs, then re-raises). Update your code OR mirror the patch in your branch. | |
warm-up failed repeatedly inside 10 retries | model not in cache (manifest missing) OR model architecture incompatible with the binary in PATH (e.g. qwen3.8 against 0.31.1; nemotron against 0.31.1) | check ls <cache>/library/<name>/<tag>; if absent, pull-verify.sh; if present, switch to 0.32.13 from /projects/.../graphify-methodology/{bin,lib/ollama} (set PATH and LD_LIBRARY_PATH BEFORE ollama serve). |
ollama pull failed; aborting AND i/o timeout | compute nodes have no egress to registry.ollama.ai. Pulls inside jobs always die. | never ollama pull inside a sbatch. Always pull on the login node with the graphify 0.32.13 binary (the only one that resolves modern manifests). |
Pipeline aborted — MAP mostly failed (10/10 domains) — short time | small/medium model cannot follow P1C-LLM-01-OVERLAP-CLASSIFICATION spec | expected behaviour for these models. Raise the model count after documenting the scoreboard — don't try to patch the spec. |
3 jobs FAILED with empty logs | pre-cluster-update sbatch had RUN_LOG created after some early failures | every hardened sbatch creates RUN_LOG and redirects stdout+stderr before the first echo/call. trap writes final END= + EXIT_CODE= so even an early crash leaves forensics. |
Companion: Human-Oriented Workflow Doc
The consuming project ships docs/deucalion/08-hpc-workflow.md which is
the step-by-step async cycle (workstation → login → sbatch → wait →
collect → iterate) and the queue-handling strategies. Point users there
for the narrative view; this SKILL.md is the operational reference.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

