Repository navigation
Repo - API! - Time stages in main and drop the runtimes keyword - #552
Conversation
logan-nc
left a comment
There was a problem hiding this comment.
Read in full. Ready to approve from my read.
Pushed f2be9f0 (tests only, stamp unaffected): the body says runtests_error_fields.jl asserts Info/Runtimes/forcing_terms is absent, but the diff only dropped the haskey; it now asserts !haskey for forcing_terms and galerkin.
Checked the force_termination path: the shared tail writes the same file (pe_file falls back to ctrl.HDF5_filename, matching the old nothing → result.control.HDF5_filename) and records total the same way, so the early-return deletion is behaviour-preserving. No stale Runtimes/galerkin or forcing_terms references anywhere on the branch (src, docs, harness cases).
|
Heads-up: GitHub did not start the pull-request workflows on f2be9f0 (my push above); no check runs exist for it after an hour although Actions itself is fine. A close/reopen or your next push will re-fire them. The change is non- |
Remove the runtimes keyword from run_force_free_states, perturbed_equilibrium, compute_perturbed_equilibrium, run_perturbed_equilibrium and run_slayer_stage. main times every stage from outside: PerturbedEquilibrium, KineticForces and ErrorFields each get one banner and one timer through _timed_stage, so they are no longer timed twice. Info/Runtimes drops the galerkin and forcing_terms sub-stage entries, which only a stage could measure from inside. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0186CLfjeJeSusNTva5RMfGU
f2be9f0 to
4d75b80
Compare
Release note
perturbed_equilibrium(...)no longer accepts aruntimeskeyword; drop it. gpec.h5 no longer hasInfo/Runtimes/galerkinorInfo/Runtimes/forcing_terms; the Galerkin and forcing times are part offorce_free_statesandperturbed_equilibrium.Stage timing now lives only in
main: the publicperturbed_equilibriumand the other stage functions take noruntimescollector, and each stage's banner and wall-clock time are printed and recorded once.Regression report
Stacked on #546, so the baseline is
test/deck-api-parity.Notes for reviewers
Stacked on #546 (stack B); review that first. Closes blocker-4 ("no
runtimes=keyword threaded into stages") and the stage-timing-banners duplication.runtimesis removed fromrun_force_free_states,run_perturbed_equilibrium, the publicperturbed_equilibrium,PerturbedEquilibrium.compute_perturbed_equilibriumandrun_slayer_stage.maintimes each stage from outside. PerturbedEquilibrium, KineticForces and ErrorFields run through a private_timed_stage(f, runtimes, key, label)that prints the section banner, logs "completed in" and records the time. The banners and timers those three stage functions printed on top ofmain's own are deleted, so each stage is timed once. A deck without a[PerturbedEquilibrium]section no longer prints an empty "Perturbed Equilibrium completed in 0.000 s".mainaroundrun_slayer_stageand recorded only when SLAYER returns a result. Its banner stays inside the function, because only the function knows whether[SLAYER]is enabled.Info/Runtimes/galerkinandInfo/Runtimes/forcing_termsare dropped, along with their annotations. Both were measured inside a stage, which a caller outside the stage cannot time. The Galerkin solve still logs its own time. Rerun from gpec.h5 skipsInfo/Runtimes, so old files are unaffected.force_terminationearly exit, a copy of the SLAYER and runtimes tail, now shares that tail through arun_responsegate. SLAYER still writes to the ForceFreeStates file, and the return tuple is unchanged.mainalready timed themselves once and are untouched apart from the dropped keyword.Overlaps: #549 edits the same
perturbed_equilibriumsignature and docstring, and #547 rewrites the body ofrun_slayer_stage. Whichever lands second resolves a small textual conflict.Tests:
runtests_error_fields.jlnow asserts thatInfo/Runtimes/forcing_termsis absent.runtests_solve_api,runtests_h5_schema,runtests_fullrunsandruntests_error_fieldspass locally.🤖 Generated with Claude Code