Retrospective: M11 (slack_csr and hyper_sssp)#
M11 is PLAN 11.4’s M11 row, carried out in two pull requests (the author’s split HD1 of
2026-10-28): M11a (the reference side against MOSP_ESCHER@4b86159, the container’s incidence
edits and the slack_csr storage, the sequential and as-is CUDA hyper_sssp, its gates; merged
as PR #22, 64a5123), whose step-by-step record is Retrospective: M11a (hyper_sssp’s store side and the as-is H-SOSP port), and M11b (the carried sssp
D13 fix, the shared sssp engine, Python, the CLI, the docs and the freeze), recorded here. Release
0.4.0 = M10a + M10b + M11a + M11b.
M11a in brief#
See Retrospective: M11a (hyper_sssp’s store side and the as-is H-SOSP port) (five steps, ADRs 0080-0093, parity/results/M11a.md): hyper_sssp exact by id
against MOSP_ESCHER on every batch of its golden set, its gates within their bars, the carried
items (b) and (c) of 0.4 (ADRs 0083, 0084), and the escher-path excursions above ADR 0024’s bar
acknowledged by the author on 2026-11-03 (HD16).
M11b#
Base. The orchestrator created the branch m11b-hyper-sssp in the worktree wt-m11 from
origin/main at 64a5123 (the author’s merge of the M11a pull request, #22). M10a had not
merged then. The five-file content check (S6) passed on it: cpp/src/util/region_exceptions.hpp,
cpp/tests/support/failing_allocator.hpp, ADRs 0061 and 0062,
parity/experiments/hypergraph_host_ab.py, and parity/certify.py’s GPU_LOCAL_STEPS with its
single (0, 4) key and the M10 / M11 sub-lists.
Step 1: the carried item (a), the D13 class in sssp’s OpenMP regions (sssp-d13-carried)#
What was built#
Commit |
What |
|---|---|
|
The fix (ADR 0094): |
|
Found by the new tests: a failure of the commit’s prepare step (the host in-edge build after |
|
The tests: |
|
|
|
|
|
After the first reading: |
(records) |
ADR 0094, the readings’ records, |
Coordination with M10: the carrier exists. A new OpenMP region that appends to a
thread_list or gathers lists uses region_push_back(list, value, errors) and passes its
region_exceptions to the gather (gather(local, errors), gather_pair(..., errors)); the
signatures without a carrier are gone. M10a’s branch uses neither (checked with git grep on the
m10a-label-propagation ref), so the merge has no semantic conflict there. The PR description
draft says the same ($DYNG_SCRATCH/runs/m11b-step1/M11b-pr-body.md).
Deviations from the plan and the step’s text (each with the same intent)#
The fix is three library commits, not one (
e0d6129,e80c24c,8e2f3df).e80c24cfixes what the new tests found next to the D13 class (a failure of the commit’s prepare step left the results readable, against the documented basic guarantee);8e2f3dfchanges howregion_push_back()passes the element after the first ADR 0024 reading located a real cost (2-4 % in the push iteration’s per-edge loop, also with FB on both sides). Each is its own commit; ADR 0094 covers all three, and the readings of record are those of the final library (v2); v1’s are kept in the record (ADR 0024 rule 4).The reading’s side B is a build of the fix, not of HEAD (the parity harness of the run clone,
perf_ab.pyofcedabfc, records"commit": "cedabfc..."for the port, the clone’s commit, not the library’s): the record names each side’s library by version and sha256 (parity/results/M11b.mdsection 1.1). No later commit of the step changes the library.perf_ab.py mosp --baseline-exe/--baseline-label/--layoutsis M10a’s commit36e2a7echerry-picked unchanged (cedabfc), as the step’s text allows when M10a has not merged (“add it to the same spec”); the merge of M10a then brings the identical change.Location tools outside the repository. The parts of the tool’s report (
$DYNG_SCRATCH/runs/m11b-step1/tools/e2e_parts_ab.py) and the JCC-erratum branch scan (tools/jcc_scan.py) are experiment scripts of the step’s run directory, like the FB compiler wrapper of M11a (m11-builds/fb/g++-fb); their outputs are inM11b-d13-location-*.json.The first attempt was cut by the account’s usage limit (2026-11-04, 08:15Z); its commits and its nohup’d reading driver (
runs/m11b-step1/readings_all.sh) survived, and the resumed attempt let that driver finish (its later jobs measured v2, after the in-place rebuild of the reading’s head tree; the record dates each window). The resumed attempt also found its own check driver terminated after the tsan-openmp run (by a process outside this step; the sanitizer had passed and written its log) and ran the corpora in a driver of its own. A second attempt was cut the same way at about 18:40Z; its nohup’d drivers (readings-v2-long.sh,readings-v2-mosp-long.sh,post-v2.shwithcorpora.sh,final-checks.sh) survived, and the third attempt waited for them, checked every exit status and log, and wrote the records.Twelve small probe compiles ran without the shared lock (
thread_list_fast_path.py probe, about a second each, at about 09:30Z and 12:54Z); the second batch fell into the windowadr0024-mosp-openmp-roadNet-PA(v1), whose contamination monitor rejected no round (foreign load at most 1.04 of 2.0 cores). Compiles of any size now take the shared lock.Rule 3’s re-reads went past the step’s round counts: the 50K batches of sssp and mosp at 85 layouts x 170 rounds (the step names 17 x 51), local10k at 85 x 340 where 85 x 170 left a region outside or an interval over 3 % wide; the readings of record are the longest of each region (
parity/results/M11b.mdsections 1.5-1.6).The shared-lock drivers of the third attempt wait for queued exclusive windows for at most 15 minutes (
corpora2.sh,final-checks2.sh): with both tracks queueing their windows back to back, the unbounded wait of the earlier drivers would have starved the corpora and the checks; the wait still gives every reading that is already queued its window first.
Results#
The fix holds every guarantee: each of the six new tests ended the process on the parent and passes on the fix; the sssp (495 cases on sequential, openmp at 1-56 threads, cuda and cuda-operators) and mosp corpora are byte-identical; every CUDA object is unchanged (SASS and host code); the push fast path is push_back’s (GCC 12/13, Clang 18).
ADR 0024 (HD16): sssp’s update stages within the bar after the v1 cost was fixed; end_to_end (1.071-1.100), mosp’s path_costs and one bimodal mosp local10k stage are above it, located (code placement in byte-identical objects, or a mode mix with each mode within) and listed for the author (GOVERNANCE.md, Open decisions, M11 (HD)). The PLAN 8.6 gates against MOSP-OpenMP@c352151 hold (84 cells; no S7).
Lessons#
A fast path equal to push_back’s is not enough: look at the loop around it. The probe and the per-function compare counts were right in v1, and the push loop was still 2-4 % slower, because the signature of the cold call changed which values the compiler kept in registers. The reading’s stage split (identify_affected, seed and finalize unchanged; loop +3.5 %), the FB rebuild (the cost stayed) and a diff of the one outlined function found it in an hour; passing the element as
push_backdoes restored the parent’s instructions.Separate code from placement before calling anything placement. The same v1 reading had both: the end_to_end excursion vanished with FB (the graph reader, byte-identical objects at other addresses), the loop’s did not. Calling both “placement” would have shipped a real cost.
One stream of shared-lock work at a time. Two overlapping shared holders (a check run and a build) kept the exclusive windows of both tracks waiting for over an hour; the resumed attempt ran its shared work in one sequential driver and its long shared jobs only while no exclusive window waited.
A driver must hand
tools/locklog.py runan executable, not a shell function. The mosp driver of the second attempt passed its functionm; three windows opened and closed at once with no reading. A drybash -nand a one-line check that the command resolves (type -P) before a long queue would have caught it.
Step 3: the public surfaces and the freeze (public-python-cli-docs-freeze)#
What was built#
Commit |
What |
|---|---|
|
Python (ADR 0097): |
|
The command line |
|
The API review and freeze (ADR 0096): documentation amendments of |
|
Examples and the tutorial: |
|
Docs and records: the algorithm page in ten sections, |
|
Found by |
(records) |
|
Deviations from the plan and the step’s text (each with the same intent)#
The maturity is
stablein the manifest before the author’s confirmation, as ADR 0060 did for triad_count in 0.3: the freeze mechanism of the API baseline follows the manifest’s maturity (ADR 0035), so “frozen at the end of M11b” needs it. HD17’s “stable at 0.4.0 only on the author’s confirmation” stays a pending row; without the confirmation the release flips the one field back (the header stays frozen). The flip changes libdyng’sregistry.cppobject by the maturity constant: criterion 10’s identity proof (step 4) must account for it.The thread-safety finding is documented, not fixed in the library (ADR 0096 finding 5): a lock inside the result would change libdyng’s objects, whose gates step 4 re-reads; the Python binding takes the locks itself.
The tutorial’s code beyond the example programs lives in two tests (
hyper_sssp_tutorial_test.cpp,test_shortest_hyperpaths_tutorial.py): the 60-line limit of PLAN 9.6 leaves no room in the programs for a batch built in code, the vertex distances, a path, the budget and the oracle, and the page must quote tested code.The wheels were built from
59c64b2, before the documentation commits; the later commits change only documentation, a docstring and records (no code the wheels contain).A new
Literalfor the incidence mixes (dyng.generators.IncidenceBatchMixName, a name listed for the author): griffe reads an appended value of a type alias as a changed value, so the step’s “additions only” needed the mixes in their own alias.The ci-cuda13 compile time was read on the shared machine under load (one cold build from a
git archive, no ccache), as M9b’s; seeparity/results/M11b.mdsection 3.
Lessons#
A
pgrep -fpattern matches the shell that runs it. A chain “wait while the driver runs, then start the checks” written asbash -c 'while pgrep -f wheels.sh ...'waits for itself forever, and thepkill -fthat removed it matched the tool’s own shell. Waiting on the PID (a small script withkill -0 <pid>) has no such trap.A docstring’s first phrase is a type to Sphinx. “X of every id (int32): …” on a property made autoapi look up three classes named after the phrase; the docs build (-W) found it, the Python tests could not.
Step 4: the final readings, the certificate and the records (final-readings-certificate-records)#
What was built#
Commit |
What |
|---|---|
|
|
|
|
|
|
(records) |
|
Every reading, replay, mutation and corpus ran from a clone of the worktree at 4f439a2 (a clean
tree, so every record names a commit, never +dirty), while the worktree took the records and the
documentation. The final readings took five windows (four exclusive, one GPU1-QUIET; 1 h 39 min
in all); the replays, the corpora, the SASS and the mutations ran on GPU 1 under the shared lock
beside the CPU checks.
Deviations from the plan and the step’s text (each with the same intent)#
Criterion 10’s identity route cannot hold for libdyng. nvcc names every CUDA translation unit’s anonymous namespace with a per-compilation unique hash (
_GLOBAL__N__<hash>_..._<n>), those names are strings in.rodata, and two compilations of the same source differ there, which moves every rip-relative displacement in.text. So libdyng’s text is never byte-identical across builds; the step read the default engine again (the criterion’s “otherwise”), and recorded the stronger comparison the shared engine’s readings rest on: every host function at the same address with the same instructions once the displacements are normalized, but the registry’smake_table()(the maturity string of step 3), anddyng-compat-hsosp’s executable sections byte-identical (parity/results/M11b.md4.2). The comparison tools (text_identity.py,disasm_identity.py) live in$DYNG_SCRATCH/runs/m11b-step4/tools, as step 1’s location tools do; their records are committed.The certificate now requires the shared engine’s replays (
HYPER_SSSP_CUDA_ENGINES): criterion 11 asks that certify.py’s (0, 4) hyper_sssp entries cover both engines; the golden set’s coverage table stays as decided (HD2), and the requirement is a rule of certify.py that applies each cuda mode to both engines. No ADR of its own: it extends ADR 0093’s certificate plumbing to ADR 0095’s second engine.ci/cmake_consumer.shmoved, not anchored. The file has no M10 / M11 anchors and M10a’s branch (not merged) already inserts its block after triad_count’s; adding anchors there would itself conflict with M10a’s text, so M11’s block moved to a place the two branches do not share (recorded for M10b: the file still has no anchors).The replays first ran without their executable.
build.shbuilt the library targetdyng_hsosp_replayinstead of the tooldyng_hsosp_replay_tool; the firstreplays.shstopped at once on every stage (replays-attempt1.log), the tool was built (no library object relinked) and the replays ran again whole.The trial-merged tree’s scoped dry runs (section 4.9 of the record): the records of both milestones were measured on their own branches, so on the merged library certify.py finds that they “do not have the release’s code”, as M10a’s acceptance round found for M11’s records on its merged tree; the author ruled on 2026-11-11 that M11’s readings on the merged library belong to the integrator once M10’s code is on
origin/main. They are listed under open issues for that merge.The summary
ia3_hsosp.jsonis committed without indentation: with it, the file is just over the repository’s 256 KB large-file limit (M11a’s copy is 262,220 bytes).
Results#
Criterion 10: the default engine read again on the final library: 271 of 271 gated rows within their bars (16 configurations x 21 rounds at base clocks, 336 rounds, none repeated, no audit flag, every round guard passed; ratios 0.150-1.038), the memory peaks 0.477-0.557 of MOSP_ESCHER’s (the same bytes as M11a’s), the graph scope 1.0000. M11a’s replay matrix on both CUDA engines and on sequential: 0 mismatches, operators == fused and sequential == cuda by digest, update == compute, ten identical repeated runs, fallbacks 75 = B’s on cuda; the slack_csr store check (T + P50 with the oracle, every case without) with M11a’s totals. sssp’s and mosp’s 51 kernels SASS-identical to step 2’s (and so to step 1’s), their corpora equal on sequential, openmp, cuda and cuda-operators. No STOP.
Mutations: the control passes and 15 of 15 are detected on the final tree.
Criterion 11: the dry 0.4 certify of hyper_sssp passed; it fails without a gate row, without the sequential by_key replay and without the shared engine’s by_id replay. On the trial merge with M10a’s branch: Markdown conflicts only (after
3b8a410), the generated files consistent, the certificate tests passing; both scoped dry runs need records measured on the merged library (deviation 5).Criterion 12: every check green on the final tree (
ci/check.sh,ci/gpu_local.shwith nothing skipped, cpu-only without OpenMP, the fortified build, Clang 18, ASan / UBSan, TSan-openmp, a depth-1 clone) but GCC 13’s three known test-file warnings, open since M11a (parity/results/M11b.mdsection 4.10).
Lessons#
“Byte-identical text” is the wrong test for a CUDA library. nvcc’s per-compilation unique names make two builds of the same source differ in
.rodataand therefore in every rip-relative displacement; compare instruction streams at the same addresses with the displacements normalized (and the SASS with the names normalized) instead. A plan that wants an identity route for readings should name that comparison.A shared driver should name the executable target it needs.
dyng_hsosp_replayis the replay library anddyng_hsosp_replay_toolthe program; a build of the library alone passes, and the replays fail at their first stage, which a driver that stops on the first failure would have shown at once.Do not commit while
ci/check.shruns on the same worktree. Its harness tests compare the commits they record at the start with HEAD at the end, and its scaffold check copies the working tree: a commit and an edit made during the run failed both (checks-check.log); the steps were run again on the final tree.Readings from a clean clone keep the worktree free. The records name the clone’s commit, a clean tree, so the documentation could be written while the readings ran.
The review fixes and the merge of main (review-fixes-merged)#
What was done#
The merge of
origin/main(c854f69): the author merged M10a as9bf1bd3(#23) during the review, soorigin/mainwas merged in with a merge commit before the fix phase. Three Markdown conflicts (GOVERNANCE.md’s approvals log,docs/adr/README.md’s index rows,docs/developer/plan.md’s M10 / M11 rows), each resolved by combining both sides; no conflict in code or an anchor block; the generated files rerun on the merged tree (scripts/regen.py --check, the stubs, the API baseline: unchanged). With M10a on main, M11b is the first of M10b / M11b to freeze, so the integration duties of criterion 11 (the trial merge with the other track, both scoped dry runs on the final tree, the 0.1-0.3 certificate tests) are M10b’s, as its branch note provides; M11b records them as owed by M10b.The review’s thirteen confirmed findings (
parity/results/M11b.mdsections 5.1-5.2), each in its own commit: the shared engine’s packing bound (a blocker: wrong results afterresult::set_options()turnedvalidate_inputson;fd51364), the moved clone documented and tested (2be6f95), triad_count’s refusal of slack_csr storage before the result’s identity (f6f8d64), the work budget’s first check and unit (41362d6), the engine-dependent relaxation counts documented (814d704), a non-throwingrepr()(c57a3b7), the record citations (8285908), the HD3 rule in the gate records (f6c1911); the merge and the integration record (findings 9 and 10) by the merge and section 5’s readings.M11’s final readings and replays again on the merged library (
f6c1911, the library both the merge and the fixes changed;parity/results/M11b.mdsections 5.3-5.8): M11a-18 (271 of 271 gated rows within their bars, ratios 0.149-1.037), M11a-19 (0.477-0.557, graph scope 1.0000), the replay matrix on both engines and sequential (0 mismatches, step 4’s totals), the store check, the SASS (every hyper_sssp, sssp and mosp kernel identical to step 4’s), the corpora (495 / 495, 20 / 20), the mutations (15 / 15) and the scoped dry run of hyper_sssp (passed on747e8c7; it fails without a gate row or a replay). Records:parity/results/M11b-merged-ia3_hsosp/andparity/results/M11b-merged/.The checks of the final tree (section 5.10):
ci/check.shagainst the neworigin/main,ci/gpu_local.shwith nothing skipped, the cpu-only, no-OpenMP, FORTIFY, Clang 18, GCC 13, ASan / UBSan, TSan-openmp and shallow-clone checks: all green but GCC 13’s three known test-file warnings (open since M11a).
Deviations from the findings’ proposed fixes (each with the same intent)#
The moved clone is documented, not re-linked. A result cannot find the hypergraph it was moved with:
clone(res)does not receive it, and a lookup by state identity would need a registry incpp/src/hypergraph(whose change would re-open M11a’s id, delta and escher-path readings, criterion 10) or a new public overload (a public name outside HD12’s list, an author item, on a header frozen at the end of M11b). Soclone()documents (C++ and Python) that the copy’s firstupdate()links it to the hypergraph it is given, an empty batch being enough, the stale error of a gone hypergraph says so, and the move-then-read path is tested. Aclone(res, h)overload is left as a possible later addition.The engines’ different counts are documented, not aligned. A compile-time “re-queue on any word decrease” policy for the line graph would make engine::operators count as MOSP_ESCHER does, but it changes the shared engine’s machine code and so its readings (criterion 3), for counters that are not a parity target (HD7); the claims of ADR 0095, the record and the algorithm page were corrected and the counters documented as engine-dependent.
No backstop in the shared engine’s fallback. With the bound fixed it is a true bound of every shortest distance (n x the largest live weight), so a shared solve with it cannot drop a candidate; a
distance_widthfallback whose words cannot hold the parents already takes the ported 64-bit recompute (solve.packed()).The M11a records keep their verdict string. The stale early-read rule is also in
M11a-ia3_hsosp/(merged on main); only M11b’s records were corrected (the shared engine’s, with a note; the default engine’s are new).Three host objects of sssp and mosp differ from step 4’s, and are not read again by M11.
sssp.cpp.o,mosp.cpp.oanddyng-compat-mosp’smosp_compat.cpp.ochanged with the merge: the functions that take a graph, from M10a’s graph headers and entry check (two lines insssp.cppandmosp.cpp). Criterion 2’s fallback (ADR 0024 readings ofipdps25_dynamosp_sosp/_mospand the one-layout gates) is about M11b’s own change to sssp, whose objects are unchanged (every kernel and the OpenMP objects identical); M10a read its change on its merged library (parity/results/M10a.mdsection 14). Recorded inparity/results/M11b.mdsection 5.3.The memory reading took three GPU1-QUIET windows. Two were void because M10b’s GPU-1 jobs (its label_propagation mutant tests, then
dyng-compat-dynlp) ran inside them; the driver of the third (retake.sh) waited until GPU 1 had shown no compute process for two minutes before taking the window. Reported to the orchestrator (open issues).
M11 as a whole (M11a and M11b)#
What M11 delivered for 0.4.0 (HD1’s split): the hypergraph’s slack_csr storage and incidence
edits on every backend; hyper_sssp on sequential and CUDA, exact by id against
MOSP_ESCHER@4b86159 on every batch of its golden set in three parity modes, with MOSP_ESCHER’s
kernels as the default CUDA engine and the shared sssp engine selectable (O12: bit for bit, but
four coauth-DBLP sosp_update rows at 1.051-1.061 against the 1.05 bar, so not the default); the public surfaces
(C++, Python, the command line), frozen, stable at 0.4.0 only on the author’s confirmation
(HD17); the three carried items of 0.4 (the D13 class in for_each, flatten_rows and sssp’s
OpenMP regions); the gates against the original within their bars on the final library; the
certificate’s (0, 4) entries of hyper_sssp. ADRs 0080-0097 (M11a 0080-0093, M11b 0094-0097).
Deviations, each recorded with its step: M11a’s in Retrospective: M11a (hyper_sssp’s store side and the as-is H-SOSP port) (five steps and the review);
M11b’s in the four step sections above. The ones that change what a reader of 0.4 sees: the
pair delta computed inside the commit (no translate hook; ADR 0086); engine::fused kept as the
default (HD13’s rule applied; ADR 0095); the maturity stable set before the author’s
confirmation, as in 0.3 (ADR 0096); the thread-safety rule of the vertex accessors documented
rather than locked in the library (ADR 0096); the Geology file MOSP_ESCHER was measured on, from
the restricted archive (the author’s decision of 2026-10-29, HD15).
What the author acknowledged on the D14 path (HD16): M11a’s escher-path excursions (2026-11-03) and the D13 fix’s (2026-11-05); and the public names outside HD12’s list (2026-11-11, “M11’s public names beyond HD12’s list”). Still pending the author: only HD17’s stability at 0.4.0 (GOVERNANCE.md, Open decisions, M11 (HD)).
Lessons across M11.
Exact parity first, then the shared engine, made the shared engine cheap to judge. With the as-is engine exact by id, the shared engine’s parity was one more replay with
--same-as, and its readings a decision rather than an investigation.The reference’s own exports are the best oracle input. Replaying MOSP_ESCHER’s exported batches (HD5) kept every comparison exact, including its forced overflows and fallbacks.
Every reading needs a clean, named build. The
+dirtyrefusals of M11a and the clone of this step are the same lesson: a record is only as good as the commit it names.Two tracks need a calendar and anchors, and still conflict in files without anchors. The shared lock-window log kept the readings of M10 and M11 apart; the P040 anchors kept the shared code files mergeable; the one code conflict found (
ci/cmake_consumer.sh) was in a file that had none.
Machine time (the logged windows of $DYNG_SCRATCH/perf-lock.log; M11a’s first steps
predate the log and are in Retrospective: M11a (hyper_sssp’s store side and the as-is H-SOSP port)):
Milestone, step |
Exclusive windows |
GPU1-QUIET windows |
|---|---|---|
M11a, steps 1-4 |
6 windows, 0.3 h |
none |
M11a, step 5 (mutations, gates, certificate) |
13, 4.0 h |
2, 0.1 h |
M11a, the review and its fixes |
15, 5.5 h |
3, 0.2 h |
M11a, acceptance |
1, 0.1 h |
1, 0.0 h |
M11b, step 1 (the D13 fix) |
64, 12.0 h |
none |
M11b, step 2 (the shared engine) |
9, 4.8 h |
1, 0.1 h |
M11b, step 3 (the public surfaces) |
none |
none |
M11b, step 4 (the final readings) |
4, 1.5 h |
1, 0.1 h |
M11b, the review fixes on the merged library |
4, 1.5 h |
3, 0.5 h (two void) |
The GPU-1 work under the shared lock (replays, corpora, mutations, sanitizers, the plugin tests)
and the CPU checks are not in the log: in step 4 the replays, corpora, SASS and mutations took
about 1 h after the windows, the CPU checks about 1.5 h beside them, and ci/gpu_local.sh with
nothing skipped 4 h 37 min (memcheck over every GPU test executable is most of it).