From 1f018a48472cbd6b527a55367f4ee002a3773ab7 Mon Sep 17 00:00:00 2001 From: Konsta Kiirikki Date: Sat, 6 Jun 2026 09:46:56 +0300 Subject: [PATCH 1/2] feat(lumi): add opencode agents and deployment tooling --- .gitignore | 15 ++ .opencode/agent/lumi-reference.md | 117 ++++++++++++++ .opencode/agent/lumi-slurm-reviewer.md | 114 ++++++++++++++ .opencode/agent/lumi-tooling.md | 125 +++++++++++++++ docs/lumi/README.md | 97 ++++++++++++ docs/lumi/deployment.md | 196 +++++++++++++++++++++++ docs/lumi/preflight.md | 205 +++++++++++++++++++++++++ lumi_deployment/README.md | 76 +++++++++ lumi_deployment/diffqec_smoke.sbatch | 105 +++++++++++++ lumi_deployment/env.example | 13 ++ lumi_deployment/hello_smoke.sbatch | 101 ++++++++++++ lumi_deployment/setup_lumi_env.sh | 85 ++++++++++ opencode.json | 10 ++ 13 files changed, 1259 insertions(+) create mode 100644 .opencode/agent/lumi-reference.md create mode 100644 .opencode/agent/lumi-slurm-reviewer.md create mode 100644 .opencode/agent/lumi-tooling.md create mode 100644 docs/lumi/README.md create mode 100644 docs/lumi/deployment.md create mode 100644 docs/lumi/preflight.md create mode 100644 lumi_deployment/README.md create mode 100644 lumi_deployment/diffqec_smoke.sbatch create mode 100644 lumi_deployment/env.example create mode 100644 lumi_deployment/hello_smoke.sbatch create mode 100644 lumi_deployment/setup_lumi_env.sh create mode 100644 opencode.json diff --git a/.gitignore b/.gitignore index 16c015a..02dc150 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,18 @@ __pycache__/ dist/ build/ .DS_Store + +# LUMI deployment +.env +results/ +*.out +*.err + +# LUMI local caches (should never be on home; listed for completeness) +.cache/ +.ipynb_checkpoints/ + +# QEC result dumps (large, transient) +*.npz +*.npy +!tests/**/*.npy diff --git a/.opencode/agent/lumi-reference.md b/.opencode/agent/lumi-reference.md new file mode 100644 index 0000000..66e699c --- /dev/null +++ b/.opencode/agent/lumi-reference.md @@ -0,0 +1,117 @@ +--- +name: lumi-reference +description: "Read-only specialist for LUMI supercomputer documentation, allocation policies, hardware details, and operational rules. Use when agents need to look up LUMI-specific facts, verify module names, confirm Slurm partition names, or retrieve allocation limits. This agent must not modify files, run shell commands, or invoke tasks." +mode: subagent +permission: + read: allow + glob: allow + grep: allow + edit: deny + bash: deny + task: deny +--- + +# LUMI Reference Specialist + +## Role + +You are a read-only consultant for all things LUMI (CSC Finland supercomputer). Your job is to answer questions, verify facts, and point callers to the right docs. You do NOT edit, run, or delegate. + +## Trigger Phrases + +Activate on any of: + +- "lumi reference", "LUMI facts", "LUMI allocation" +- "LUMI module", "LUMI stack", "LUMI/25.09" +- "LUMI-G", "MI250X", "LUMI GPU", "slurm partition" +- "SSH alias", "login node", "batch job", "sbatch" +- "PROJECT_DIR", "SCRATCH", "$HOME on LUMI" +- "low-noise mode", "LUMI cores", "GCD" (in LUMI context) +- "JunctionHackathon allocation", "quantumhack LUMI allocation" (historical reference only — answer with adapted JunctionHackathon facts) + +## What You Know + +### Current LUMI Stack (LUMI/25.09 — always use this) + +``` +module --force purge +module load LUMI/25.09 +module load partition/G # LUMI-G GPU partition +module load rocm # AMD ROCm for MI250X +module load cray-python/3.11.7 +``` + +> **Note:** LUMI/23.09 is deprecated on this system. It will fail with `cray-python/3.11.5 missing`. Always use LUMI/25.09. + +### Hardware (LUMI-G) + +| Property | Value | +|---|---| +| GPU | AMD MI250X | +| GCDs per node | 8 | +| GCD = Slurm GPU | 1 GCD = 1 `sbatch --gpus=1` | +| CPU cores (low-noise mode) | **56** (not 64) | +| Login nodes | No GPUs; CPU-only interactive | + +### Allocation (JunctionHackathon style) + +- **20,000 CPU-hours** +- **1,000 GPU-hours** +- **1,000 TB-hours** + +### Slurm Commands + +- `sbatch