Repository navigation
Rerun - BUGFIX! - Restore the saved processed equilibrium without retracing - #571
Conversation
…racing Upstream-PR: OpenFUSIONToolkit#571 Cherry-picked-from: b4773f7
…racing (#6) Upstream-PR: OpenFUSIONToolkit#571 Cherry-picked-from: b4773f7
|
@krystophny is this ready for review? If so please put it to open instead of draft. Avoid requesting a review until something is no longer a draft, as that is a mixed signal about whether something is ready for eyes/merge yet. If you want eyes on a PR before you feel it is ready to be merged then better to make that an explicit @tag + request. This also applies to several other PRs you have here. |
Yes! |
|
Merged develop and retained the geometry-to-field kernel extraction in |
matt-pharr
left a comment
There was a problem hiding this comment.
This is useful and will save runtime and confusion, and will keep things closer to the actual outputs if anything about equilibrium treatment changes in the future. This is roughly how I would have implemented this. Approve.
Restore the processed equilibrium saved by GPEC instead of retracing its input equilibrium when
equilibrium_from_h5is used for post-processing. Retracing can change the saved q profile, its derivative and the surface associated with stored response matrices.The reader now builds the native profile and periodic geometry splines from the stored arrays, restores saved equilibrium parameters and reuses the existing geometry-to-field kernel. The full rerun entry point is unchanged. A temporary synthetic HDF5 regression checks the saved arrays, root and derivative, mode and rational-surface data, and an independent nonzero coil-forcing contraction. No private fixture is included.
Verified
Native Julia 1.13.2 qualification job 3361292: the unchanged old reader fails at the missing-ingest contract, while the candidate passes all 25 synthetic checks. The RED fixture uses existing constructors and reaches the old reader.
A read-only local consumer also checks stored profiles, geometry, modes, rational surfaces and root/q/derivative consistency at 1e-12. Private input and output files remain outside Git.
The extracted 63-line numerical kernel is byte-identical to the original arithmetic and loop body. The committed source matches qualified candidate archive 87adf2d72527c47f872acebb0cc7cb849970024a02f3ee23afb12f6093a4ff6f, apart from one formatter-only docstring line wrap. All normal hygiene and formatting hooks passed.
The full native suite also passes on Julia 1.11.9 in CI job 120552763819. Its actual checkout is PR merge b467a4e, and all four files changed here are byte-identical to b4773f7. Affected positive counts include equilibrium 320, error fields 297, analytic/coil/direct/inverse reruns 12/8/20/20, and the new frozen-state regression 25.
Notes for reviewers
This remains a draft pending human review. The current numerical regression report is below. Qualification was on the pinned baseline 9a51446, and does not claim coverage of later develop changes. The saved schema does not retain every derived field, so derived field and metric splines are rebuilt with the existing native kernel rather than claimed to be serialized bitwise snapshots for every equilibrium kind. The synthetic oracle and actual read-only consumer cover the stated reconstruction contract, not all equilibrium variants.
Open PR 548 touches the old reader documentation and retracing call, while PR 569 changes the deprecated-key helper; neither implements this saved-state restoration. This PR does not depend on either branch.
Release note
equilibrium_from_h5. Current complete outputs require no changes.Post-processing a saved response now keeps its original equilibrium profiles and geometry consistent with the stored control surface and response data. Full reruns continue to reconstruct their inputs and execute their requested stages.
Regression report
Compared
develop@6d655c74cagainst this branch @ac5095f5aon ITER SDCC through Slurm (Julia 1.12.6, CI-pinned manifest, 2 Julia threads / 1 BLAS thread):solovev_n122 unchanged,solovev_multi_n15 unchanged, anddiiid_n153 unchanged. All 90 tracked quantities are unchanged, with zero numerical differences and identical checksums.Focused equilibrium, frozen-state, rerun, and solve-API tests passed, including 28 frozen-snapshot checks covering saved profiles, geometry, forcing contraction and analytic-source retention. Local and CI documentation builds passed. The full CI test matrix is still running.
Full regression report
Chris&AI