Skip to content

Commit be0c724

Browse files
cailmdaleyclaude
andcommitted
felt: mpi-hybrid — record Layer 3 (stale config) + final e2e verification
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 7e7b744 commit be0c724

1 file changed

Lines changed: 51 additions & 28 deletions

File tree

.felt/shapepipe/mpi-hybrid/mpi-hybrid.md

Lines changed: 51 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,20 @@ tags:
88
- candide
99
created-at: 2026-05-31T12:22:50.017370879+02:00
1010
outcome: |-
11-
Two independent bugs, both fixed, verified e2e on candide. (1) LAUNCHER: container
12-
shipped OpenMPI 4.1.4/PMIx2 vs candide host 5.0.x/PMIx5 → hybrid MPI gave N rank-0
13-
singletons. Fixed by building OpenMPI 5.0.8 from source in the image (--disable-dlopen,
14-
bundled PMIx5/PRRTE), dropping libopenmpi-dev, keeping the mpi4py wheel (uv.lock
15-
untouched); SLURM-ified candide scripts; CI now publishes on every branch push.
16-
(2) SHAPEPIPE CODE: with ranks finally wired up, shapepipe_run under MPI hit
17-
"worker() missing module_runner" — a latent bug since #415 (mpi_run.py never updated
18-
when worker() gained module_config_sec), invisible for 16mo because MPI is the legacy
19-
path (SMP is production). Fixed in e5999733. Re-verified (job 780655, host-src bind
20-
over PR image): 4 ranks n23+n25, all 3 modules ran, real RUN_EXIT=0, 0 errors.
21-
REMAINING: rebuild published image with the code fix (push→CI), then Martin review +
22-
merge of #737.
11+
THREE layers of MPI bit-rot, all fixed, verified e2e on candide via the unmodified
12+
candide_mpi.sh against the published image (job 780660: 4 ranks/2 nodes, all 3 modules,
13+
0 errors, real exit 0). (1) LAUNCHER: container shipped OpenMPI 4.1.4/PMIx2 vs candide
14+
host 5.0.x/PMIx5 → hybrid MPI gave N rank-0 singletons. Fixed by building OpenMPI 5.0.8
15+
from source in the image (--disable-dlopen, bundled PMIx5/PRRTE), dropping libopenmpi-dev,
16+
keeping the mpi4py wheel (uv.lock untouched); SLURM-ified candide scripts; CI publishes on
17+
every branch push. (2) SHAPEPIPE CODE: with ranks wired up, shapepipe_run hit "worker()
18+
missing module_runner" — latent since #415 (mpi_run.py never updated when worker() gained
19+
module_config_sec). Fixed in e5999733. (3) STALE CONFIG: config_mpi.ini used pre-2020 module
20+
names without the _runner suffix → "No module named python_example" + a 5-min deadlock.
21+
Fixed in 7e7b7448. All three hid for years because nobody runs MPI (SMP is production,
22+
[[shapepipe/exec-modes-schedulers]]). Noted: MPI deadlocks on rank-0 failure instead of
23+
failing fast (follow-up). REMAINING: Martin review + merge of #737; open question whether
24+
MPI should be retired rather than maintained.
2325
---
2426

2527
## The problem
@@ -131,7 +133,9 @@ scripts work #737 started.
131133
4. **CI** — publish on every branch push so PR images are cluster-testable.
132134
5. **ShapePipe MPI code fix** (`e5999733`) — thread `module_config_sec` through
133135
`run_mpi`/`submit_mpi_jobs`/`worker()`; the latent #415 bug surfaced once the
134-
launcher worked. Needs an image rebuild to ship.
136+
launcher worked. Shipped in the published image (CI rebuild).
137+
6. **Stale example config fix** (`7e7b7448`) — `config_mpi.ini` module names
138+
`*_runner`-suffixed to match the loader; surfaced running the real script.
135139

136140
## Empirical close (2026-05-31) — two layers
137141

@@ -168,21 +172,40 @@ PMIx mismatch meant MPI never even started on candide. Fixed by threading
168172
`module_config_sec` through `run_mpi``submit_mpi_jobs``worker()` (commit
169173
`e5999733`), matching the SMP/serial call sites.
170174

171-
**Re-verified end to end** (job 780655, PR image with the working-tree `src`
172-
bind-mounted over `/app/src` so the fix is exercised without an image rebuild):
173-
fixed `submit_mpi_jobs` signature live in-container, 4 ranks across n23+n25,
174-
all three modules (`python`/`serial`/`execute_example_runner`) produced output
175-
trees, real `RUN_EXIT=0`, and `shapepipe.log` records *"A total of 0 errors
176-
were recorded."* **Now genuinely verified.**
177-
178-
> Correction: an earlier close claimed the full pipeline ran clean at this
179-
> point. It did not — that run hit the Layer-2 error and the sbatch script's
180-
> `RUN_EXIT=0` was a hardcoded `echo`, not the real exit code. The launcher
181-
> half was real; the pipeline half was not, until the code fix above.
182-
183-
**Remaining:** bake the code fix into the published image (push → CI rebuild
184-
of `:cleanup-candide-scripts-container-runtime`), then Martin's review + merge
185-
of #737.
175+
Verified with a host-src override (job 780655): fixed `submit_mpi_jobs`
176+
signature live in-container, 4 ranks across n23+n25, all three modules
177+
produced output, real `RUN_EXIT=0`, 0 errors.
178+
179+
**Layer 3 — stale example config, now fixed.** With the code fix baked into
180+
the published image, the *actual* unmodified `candide_mpi.sh` against
181+
`config_mpi.ini` first hit `No module named 'shapepipe.modules.python_example'`
182+
then deadlocked to the 5-min wall clock. `config_mpi.ini` (last touched 2020)
183+
still used the pre-suffix module names (`python_example`, `[PYTHON_EXAMPLE]`);
184+
the loader needs the full runner names (`python_example_runner`,
185+
`[PYTHON_EXAMPLE_RUNNER]`), as `example/config.ini` uses. Updated to match
186+
(commit `7e7b7448`). Same root cause as Layers 1–2: nobody runs MPI, so its
187+
example config rotted too.
188+
189+
**Note — MPI deadlocks on rank-0 setup failure** instead of failing fast: when
190+
rank 0 errored on the bad module name, the other ranks blocked in a collective
191+
until SLURM killed the job at the wall clock. This is exactly the failure mode
192+
the "preflight self-check / fail loudly" item (option 5 in the spectrum above)
193+
guards against — worth a follow-up so a stale config or desync surfaces as an
194+
immediate error, not a silent 5-minute hang. Out of scope for #737.
195+
196+
**Genuinely verified end to end** (job 780660): the unmodified `candide_mpi.sh`
197+
against the freshly-published `:cleanup-candide-scripts-container-runtime` image
198+
(fix baked in, no override) ran the example pipeline — 4 ranks / 2 nodes, all
199+
three `*_example_runner` modules produced output trees, *"A total of 0 errors
200+
were recorded"*, real exit 0 (the script's `exit $?`). The deliverable script
201+
itself works.
202+
203+
> Correction: an earlier close claimed the full pipeline ran clean before any
204+
> code fix. It did not — that run hit the Layer-2 error and the sbatch script's
205+
> `RUN_EXIT=0` was a hardcoded `echo`, not the real exit code. The launcher half
206+
> was real; the pipeline half was not, until the fixes above.
207+
208+
**Remaining:** Martin's review + merge of #737.
186209

187210
(Note: the in-image `mpi4py` import looks absent under `bash -lc` because the
188211
login shell resets PATH off the venv — a probe artifact, not real; the actual

0 commit comments

Comments
 (0)