Fix extract_doe_region.py SLOT_FMT drift; regenerate report with real data
FABRIC-3.md §XXXV.15. §XXXV.12 added an explicit _align_pad field to doe_trial_slot_t to fix a struct-alignment bug, but never updated the Python extractor's SLOT_FMT/SLOT_CRC_SPAN to match -- every field after isa was read from the wrong byte offset, so slot_crc read wrong bytes entirely and every legitimate record (including the real, live campaign's own first two clean trials) was flagged as CRC-corrupt. Fixed; SLOT_SIZE assertion tightened from <= to == to catch this drift immediately next time. Regenerated multiuser_doe_report.pdf against the real campaign's actual first two trials: run=0 (cfg=0, nw=2, uniform, fail=0) and run=1 (cfg=5, nw=8, heterogeneous, fail=0), both fleet_conserved=1 at exactly Q48.16 1.0. Real report, real data, first time this has happened for this campaign. disk/artemis.img itself and the live campaign's log directory are deliberately left uncommitted -- still being written by the running campaign. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BWpNjdwPtFLuVLaAq44L9K
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
553ca9163d
commit
9aebbb224b
@@ -73,11 +73,13 @@ CTRL_CRC_SPAN = struct.calcsize("<QIIII") # everything before hdr_crc
|
||||
|
||||
# doe_trial_slot_t: fleet_k_q48(u64) switch_count_cumulative(u64)
|
||||
# run_id(u32) cfg(u32) rep(u32) nw(u32) mode(u32) fail_count(u32)
|
||||
# fleet_conserved(u32) isa(8s) slot_crc(u64), rest is padding to 64.
|
||||
SLOT_FMT = "<QQIIIIIII8sQ"
|
||||
# fleet_conserved(u32) isa(8s) _align_pad(u32, explicit -- see
|
||||
# doe_region.h's own comment on why: brings slot_crc to an 8-aligned
|
||||
# offset without relying on implicit compiler padding) slot_crc(u64).
|
||||
SLOT_FMT = "<QQIIIIIII8sIQ"
|
||||
SLOT_SIZE = struct.calcsize(SLOT_FMT)
|
||||
SLOT_CRC_SPAN = struct.calcsize("<QQIIIIIII8s") # everything before slot_crc
|
||||
assert SLOT_SIZE <= DOE_SLOT_SIZE
|
||||
SLOT_CRC_SPAN = struct.calcsize("<QQIIIIIII8sI") # everything before slot_crc
|
||||
assert SLOT_SIZE == DOE_SLOT_SIZE
|
||||
|
||||
|
||||
# CRC-64/XZ, same polynomial/algorithm as compute_crc64() in
|
||||
@@ -186,7 +188,7 @@ def read_ring(dev_path: str):
|
||||
f.seek(blk_off + slot_off_in_devblock)
|
||||
raw = f.read(SLOT_SIZE)
|
||||
(fleet_k_q48, switch_count, run_id, cfg, rep, nw, mode,
|
||||
fail_count, fleet_conserved, isa_raw, slot_crc) = struct.unpack(SLOT_FMT, raw)
|
||||
fail_count, fleet_conserved, isa_raw, _align_pad, slot_crc) = struct.unpack(SLOT_FMT, raw)
|
||||
|
||||
want_slot_crc = compute_crc64(raw[:SLOT_CRC_SPAN])
|
||||
if want_slot_crc != slot_crc:
|
||||
|
||||
Reference in New Issue
Block a user