Skip to content

Repo - PERF - Shorten test wall time and close periodic kinetic samples - #593

Merged
matt-pharr merged 25 commits into
developfrom
test/streamline-suite
Oct 29, 2026
Merged

matt-pharr merged 25 commits into
developfrom
test/streamline-suite

Conversation

@matt-pharr

@matt-pharr matt-pharr commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

This PR shortens the unit-test feedback loop, which had reached roughly 50 minutes on GitHub. The goal is to exercise code paths and interfaces with small fixtures, retain inexpensive correctness checks, and leave production-size numerical tracking to the regression harness. The target is an entire warm-cache test workflow under five minutes, including setup.

What changes

  • Reuse solved fixtures, shrink expensive integration inputs, and remove duplicate full-case solves. All 54 test files are registered, including the new SLAYER transport-profile tests from develop.
  • Run core, api, and errorfields groups in parallel for Julia 1.11 and the latest stable Julia. Each version precompiles once before releasing its test groups.
  • Reuse portable compiled caches when available. A required workflow artifact provides the complete compiled environment if a cache restore misses or fails; cache writes are optional and time-limited. Self-hosted runners can use shared local snapshots instead.
  • Use ubuntu-slim for conventions, change detection, and final status checks. Julia tests and documentation builds remain on ubuntu-latest.
  • Prepare merge-queue checks: Tests and Documentation handle merge_group, queue candidates always run the full battery, and queue documentation builds skip deployment. PR conventions remain PR-specific.
  • Close the repeated periodic endpoint in the kinetic torque sampler exactly, fixing the strict periodic-spline failure observed on Julia 1.13.

Current status

Merged develop 057c4af0d into 9fd6366 without conflicts. The 54-file registry, Julia parsing, and diff hygiene checks pass locally; CI for this integration revision is pending. The PR-owned physics patch remains unchanged (stable patch ID 39c86967d7210c14302178bd781a42063dfa2162). The harness stamp is refreshed under the requested report-reuse policy; actual run refs are preserved below, and the latest upstream physics changes have not been rerun through the harness by this session.

Latest measured result at 8f572769a: all checks pass. The workload-enabled warm test workflow completed in 6m02s (13:07:41–13:13:43 UTC). Precompile jobs took 1m10s / 53s; the longest groups were Julia 1.11 ErrorFields at 4m26s and API at 4m24s, with core at 3m04s. Warm comparison. This improves on the earlier 7m05s warm measurement, but remains above the five-minute target; runner variability and upstream changes prevent treating these runs as a controlled benchmark.

The workload-disabled experiment passed but took approximately 10 minutes warm: first-use compilation lengthened the groups. The solver workload has therefore been restored for tests. It remains disabled for documentation, whose two measured builds passed in 3m55s and 5m40s. Group balancing and registration of all 54 test files are retained. No physics implementation was changed by these optimization commits.

Earlier workload-enabled baseline and regression provenance follow.

Ready for human review. All CI checks passed at 49e67d41f, including the full 52-file battery on Julia 1.11.9 and 1.13.3, both production precompile jobs, documentation, and conventions. The develop merge's source-image rebuild made that run take 13m49s: precompile jobs took 8m17s and 5m55s. Logs confirm only GPEC was recompiled (423s / 304s); 488 / 489 dependency images were already compiled. Completed run, attempt 1.

The unchanged-commit warm rerun passed in 7m05s (10:16:14–10:23:19 UTC). Precompile took 1m12s / 1m03s, confirming reuse of both dependency and GPEC images. The longest group was Julia 1.11 core at 5m18s; its test files consumed 4m16s, led by vacuum (76.5s), layer overlap (40.7s), equilibrium (33.9s), and grid refinement (30.9s). Warm run, attempt 2.

The previous warm-cache test workflow at c63aafbaa took 5m02s, from 09:23:19 to 09:28:21 UTC on 2026-10-27, including setup, precompile, cache handoff, all test groups, and final status. Precompile jobs took 59s and 1m01s; the longest group took 3m45s. Sampled logs confirm compatible dependency-cache and exact GPEC-image hits, with the full environment artifact skipped. Measured run.

The five-minute target is not consistently met: the earlier warm run was 5m02s, while the latest is 7m05s. Remaining work is primarily test execution/first-use compilation and group balance. Cold compilation, source changes, cache eviction, and runner queueing can still take longer; this is not a guarantee that every run finishes within five minutes.

Nik's cache-handoff, missing-registry-entry, stale-stamp, and stale draft-description findings have been addressed. The coverage choices below are explicit review items. Third-party human approval is required before merging; Nik's current review is a comment, not an approval.

Disposition of Nik’s second review

  • The two requested pre-merge harness cases are complete: Nik reports 17 Riccati and 6 Solovev kinetic quantities unchanged (linked below).
  • Measured the workload-disabled proposal. Retained it for docs; restored the workload for tests after the warm workflow took approximately 10 minutes disabled versus 6m02s enabled.
  • Applied the suggested group rebalance and reduced the precompile timeout to 30 minutes.
  • Monte Carlo counts remain unchanged by this follow-up. The primary distribution comparisons use 20,000 / 30,000 samples; the 512-sample coherent ring checks exercise fixed resultant magnitudes or cancellation. We have not established a statistical-margin failure, and no blanket sample-count restoration was made.
  • Deferred full-tier machinery, per-module golden-value additions, subpackages, Julia-matrix policy changes, docs-trigger changes, thread/CPU-target experiments, and additional rollout/documentation refinements. These are not claimed as implemented. Existing inexpensive correctness checks and the separate regression-harness contract remain.

Nik explicitly identified the two harness cases as his only pre-merge ask; the remaining suggestions are recorded here as implemented, measured-and-rejected, or deferred. His GitHub review remains COMMENTED, so a human approval is still required.

Merge-queue rollout

This PR prepares the workflows; it does not enable the repository queue setting. After review and merge, enable the queue for develop, retain the required Tests and Documentation checks and at least one human approval, use merge commits, and start with build concurrency 1. Keep "Only merge non-failing pull requests" enabled.

Local checks verified that a queue event runs the complete test battery without PR metadata and cannot call deploydocs; PR/push deployment behavior is preserved. The first real merge-group run must be verified when the queue is enabled. Setup guidance is in docs/development/git-workflow.md.

Coverage choices for reviewers

  • Production numerical pins: remove the large DIII-D Riccati energy pin and the q=2,3,4 Δ′ diagonal pins from unit tests. These quantities belong to the regression harness. This workflow does not automatically run that harness; a separate comparison is recorded below.
  • Monte Carlo: reduce sample counts by roughly 10× in the expensive distribution comparisons, retain fixed seeds and the existing CDF/moment tolerances, and retain reproducibility checks. The reduced statistical margin needs reviewer acceptance.
  • Plotting: call all 17 ErrorFields plotting entry points, but render four representative PNGs. The remaining plots receive object/data/layout checks rather than individual file-existence checks.
  • Coil sensitivities: the nominal sweep and combined-overlap checks still cover all coil sets. Repeated post-hoc replay, finite-difference-step, and pivot comparisons use the first representative set, reducing shape-by-shape crosschecks.

Release note

  • Audience: developers
  • Numerical impact: the kinetic sampler now overwrites the repeated endpoint of five field/derivative/Jacobian sample arrays with the first sample. This changes spline inputs at rounding level; the recorded diiid_n1 comparison reports 53 unchanged quantities. (harness @ cb5c8fb)
  • Migration: none; the default test command still runs every registered file.

Unit tests use smaller fixtures and shared compilation to shorten feedback while retaining interface and execution-path checks. Production-size numerical regression is reported separately.

Regression report

Additional reviewer-run comparisons: Nik’s full reports show 17 Riccati quantities and 6 Solovev kinetic quantities unchanged, all reported differences zero, comparing 6d655c74c with 4ed1f1fd2 on feynman, Julia 1.11.7, pinned manifest, 4 Julia / 4 BLAS threads. These are reviewer-provided results, not a new run by this session. The stamp is now refreshed to 9fd6366 under the requested report-reuse policy: the PR-owned source patch is identical to the reviewer-tested 4ed1f1fd2 patch (stable patch ID 39c86967d7210c14302178bd781a42063dfa2162). The newly merged upstream changes have not been independently rerun through the harness at this integration revision.

53 unchanged, comparing develop 3456e6365 with fa1b61ae2 through the SDCC fanout runner on sirius. Both refs used Julia 1.12.6, the same pinned manifest, two Julia threads and one BLAS thread; prep, both comparison tasks, and report exited successfully.

The actual comparison ran at fa1b61ae2 against 3456e6365. The original report stamp was refreshed to 49e67d41f under the requested report-reuse policy: the PR's own src/ patch relative to its merged develop parent is unchanged (verified stable patch ID 15b55b40f2307b5adfe516006c49b20dc6fdc676). Develop adds transport-model changes in the new merge, so the full source trees are not identical. This latest integration revision has not been rerun through the harness; the report below retains its original run refs.

SDCC report: /home/ITER/pharrm/Projects/GPEC_dev/regress-fanout/runs/pr593-fa1b61ae2-20261027/report.txt.

Full SDCC regression report
================================================================
Case: diiid_n1 — DIII-D-like equilibrium, n=1, ideal + perturbed equilibrium
================================================================

Regression Report: diiid_n1
===================================================================================================================================================
Ref 1: 3456e63658cb5302dda0402026e70e2330748be0  @ 3456e6365 (2026-10-27)
       env: julia 1.12.6, x86_64-linux-gnu, manifest 4c9d54fa (pinned), 2 threads/1 BLAS, jit build
Ref 2: fa1b61ae22b96bea15f2d36b1c630278c8f64e5d  @ fa1b61ae2 (2026-10-27)
       env: julia 1.12.6, x86_64-linux-gnu, manifest 4c9d54fa (pinned), 2 threads/1 BLAS, jit build
---------------------------------------------------------------------------------------------------------------------------------------------------
Quantity                                      3456e63658cb5302dda0402026e70e2330748be0  fa1b61ae22b96bea15f2d36b1c630278c8f64e5d  Diff       Status
---------------------------------------------------------------------------------------------------------------------------------------------------
total energy Re(et[1])                        8.006122e-01                              8.006122e-01                              0.0e+00    OK    
total energy Im(et[1])                        7.924888e-05                              7.924888e-05                              0.0e+00    OK    
plasma energy Re(ep[1])                       -1.372261e+00                             -1.372261e+00                             0.0e+00    OK    
vacuum energy Re(ev[1])                       2.172874e+00                              2.172874e+00                              0.0e+00    OK    
vacuum matrix min eigenvalue                  1.873975e-01                              1.873975e-01                              0.0e+00    OK    
plasma energy (all)                           [35 elem]                                 [35 elem]                                 0.0e+00    OK    
vacuum energy (all)                           [35 elem]                                 [35 elem]                                 0.0e+00    OK    
total energy (all)                            [35 elem]                                 [35 elem]                                 0.0e+00    OK    
ODE steps (saved)                             792                                       792                                       0.0e+00    OK    
ODE steps (total)                             787                                       787                                       0.0e+00    OK    
q0                                            1.204212e+00                              1.204212e+00                              0.0e+00    OK    
q95                                           4.781723e+00                              4.781723e+00                              0.0e+00    OK    
beta_t                                        1.327024e-02                              1.327024e-02                              0.0e+00    OK    
beta_n                                        1.372511e+00                              1.372511e+00                              0.0e+00    OK    
internal inductance li1                       8.842268e-01                              8.842268e-01                              0.0e+00    OK    
internal inductance li2                       7.080757e-01                              7.080757e-01                              0.0e+00    OK    
internal inductance li3                       7.304340e-01                              7.304340e-01                              0.0e+00    OK    
poloidal beta betap1                          6.680739e-01                              6.680739e-01                              0.0e+00    OK    
poloidal beta betap2                          5.349836e-01                              5.349836e-01                              0.0e+00    OK    
poloidal beta betap3                          5.518764e-01                              5.518764e-01                              0.0e+00    OK    
# singular surfaces                           5                                         5                                         0.0e+00    OK    
singular psi locations                        [5 elem]                                  [5 elem]                                  0.0e+00    OK    
singular q values                             [5 elem]                                  [5 elem]                                  0.0e+00    OK    
current beta betaj                            4.236480e-01                              4.236480e-01                              0.0e+00    OK    
plasma volume                                 1.829472e+01                              1.829472e+01                              0.0e+00    OK    
plasma current                                1.152130e+00                              1.152130e+00                              0.0e+00    OK    
mpert                                         35                                        35                                        0.0e+00    OK    
npert                                         1                                         1                                         0.0e+00    OK    
toroidal field bt0                            2.006573e+00                              2.006573e+00                              0.0e+00    OK    
wall field bwall                              3.880145e-01                              3.880145e-01                              0.0e+00    OK    
aspect ratio                                  2.845746e+00                              2.845746e+00                              0.0e+00    OK    
elongation kappa                              1.708322e+00                              1.708322e+00                              0.0e+00    OK    
q profile (checksum)                          6da947d0754e...                           6da947d0754e...                           identical  OK    
pressure profile (checksum)                   c9c6ca4072ca...                           c9c6ca4072ca...                           identical  OK    
Mercier D_I profile (checksum)                26babbe22505...                           26babbe22505...                           identical  OK    
resistive interchange D_R profile (checksum)  c46830151a0b...                           c46830151a0b...                           identical  OK    
ballooning Delta' profile (checksum)          c27c6779804a...                           c27c6779804a...                           identical  OK    
island half-widths                            [5 elem]                                  [5 elem]                                  0.0e+00    OK    
Chirikov parameter                            [5 elem]                                  [5 elem]                                  0.0e+00    OK    
||resonant area-weighted field||              5.288461e-04                              5.288461e-04                              0.0e+00    OK    
dominant-coupling singular values             [3 elem]                                  [3 elem]                                  0.0e+00    OK    
|forcing overlap with dominant mode|          1.411548e-04                              1.411548e-04                              0.0e+00    OK    
|delta_nominal| of coil set 1                 7.034622e-05                              7.034622e-05                              0.0e+00    OK    
||ddelta/d(shift)|| over coil sets            1.245446e-04                              1.245446e-04                              0.0e+00    OK    
||ddelta/d(tilt)|| over coil sets             4.177337e-07                              4.177337e-07                              0.0e+00    OK    
PE plasma energy                              3.320466e+00                              3.320466e+00                              0.0e+00    OK    
PE vacuum energy                              3.174319e+00                              3.174319e+00                              0.0e+00    OK    
PE surface energy                             5.508585e+00                              5.508585e+00                              0.0e+00    OK    
PE toroidal torque                            1.119355e-04                              1.119355e-04                              0.0e+00    OK    
NTV torque FGAR [N·m]                         5.480580e-01                              5.480580e-01                              0.0e+00    OK    
NTV kinetic energy dW FGAR [J]                8.163220e-02                              8.163220e-02                              0.0e+00    OK    
Runtime (s)                                   294.5s                                    234.6s                                               --    
||forcing b~|| (root-area-weighted)           4.683171e-04                              4.683171e-04                              0.0e+00    OK    
resonant area-weighted field b^r              [5 elem]                                  [5 elem]                                  0.0e+00    OK    
===================================================================================================================================================
Summary: 53 unchanged

Notes for reviewers

Test orchestration uses optimization level 0, test processes use level 1, and production package images remain at level 2. Bounds checks stay enabled in CI. The registry rejects omitted or duplicated test files. The periodic-endpoint closure is the only physics-source change relative to the merged develop parent.

@matt-pharr matt-pharr self-assigned this Oct 26, 2026
@github-actions github-actions Bot added the test Tests only label Oct 26, 2026
@matt-pharr matt-pharr changed the title Test/CI - TEST - Streamline the full test battery and cache package images Repo - PERF - Shorten test feedback and close periodic kinetic samples Oct 26, 2026
@github-actions github-actions Bot added perf Same answers, less time or memory and removed test Tests only labels Oct 26, 2026
@matt-pharr
matt-pharr requested a review from logan-nc October 26, 2026 16:35
@matt-pharr
matt-pharr marked this pull request as ready for review October 26, 2026 16:35
@matt-pharr matt-pharr added this to the GPEC v2.0.0 milestone Oct 26, 2026

@logan-nc logan-nc left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read in full (test files, workflows, the one src/ hunk). Nothing pushed. Findings not already on the record:

  1. The 1.11 groups are red because the precompile job's depot save silently failed. Its log reads Failed to save: Unable to reserve cache with key julia-depot-v3-…-1.11-1.11.9-…, another job may be creating this cache, actions/cache/save treats that as a warning, so the job stayed green and needs: precompile let the three groups run into fail-on-cache-miss: true (julia-test-version.yaml:218,226). The restore key is identical to the save key, so this is not a fingerprint bug; it is the reservation race (the cancelled run on b1d1062 is the likely holder). Either fail the precompile job when its save fails, or let a group rebuild on a miss. The same setting will also redden every fork PR, whose read-only token cannot save a cache, unless develop already holds the key.
  2. The registry check will stop the suite after the next develop merge. develop now has test/runtests_localstability.jl and test/runtests_analysis_plots.jl (#568, #573); neither is in test/suites.jl, and runtests.jl raises error("Update test/suites.jl …") before any test runs.
  3. Stamp. The PR's own src/ patch differs between ea32a0c and the head 685c52c, so the stamp check is red; the Torque.jl endpoint closure needs a restamp.
  4. What the suite no longer pins, for the maintainers to accept explicitly: et_ric ≈ 0.800637 and the three Δ′ diagonals (q = 2, 3, 4) from the DIII-D large-N Riccati testsets are removed with nothing in their place. The comment points at diiid_n1_riccati, which does track the Δ′ diagonal, but no workflow runs the harness, so CI keeps no production-size numerical check after this. Also quieter than the comments admit: Monte-Carlo sample counts cut ~10× with the moment tolerances unchanged (flakiness risk), isfile dropped for most ErrorFields plots, and the sensitivity comparisons sliced to sets[1:1] so the second hoop is untested.
  5. The Torque.jl hunk is not test-only. It overwrites all five sampled arrays at θ = 1 with the θ = 0 samples before the periodic spline, which changes the spline input at rounding level; the 53-row harness result covers it at 1e-8, fine, but it is a numerical change and the note should say so rather than "test feedback".
  6. The body says keep this a draft with no reviewer; it is marked ready and requests me. One of the two is stale.

@matt-pharr
matt-pharr requested a review from logan-nc October 27, 2026 09:47
@matt-pharr

Copy link
Copy Markdown
Collaborator Author

@logan-nc sorry for the premature review request. I have a few comments.

  • This repo is taking the form that the regression harness is the main "test" that makes sure that there is no unintentional drift of physical quantities, and I think that that is the right approach. As such, the CI tests should make sure that all of the main code paths run, and should verify other correctness things that are not final quantities. That way, we can make CI to be fast as it is in this PR. I have other optimizations for the regression harness as well which can make it run in ~5 minutes on a large slurm cluster with available nodes, which I have been using locally and will add to the repo at some point in the near future. However, this PR was motivated by my struggles this weekend to get some PRs merged due to CI taking an hour to run in some cases and then needing to re-run tests every time a PR is merged.
  • I have addressed your comments and fixed the stamp.
  • I am also adding in this PR the idea of "merge queues" which will reduce the number of times we need to rerun CI due to merge order of other PRs. This will be enabled after this PR merges, and will change the 'merge' button on PRs to be an 'add to queue' button. Then, later PRs that want to merge will be assumed to go in after that, and it will establish a merge order which will help us organize things better during this period of many small PRs.

This PR is now ready for your eyes, it should be quick. I would like to get this in ASAP as it will streamline the merging of the rest of our 2.0.0 items.

Any further commits you see after this point will just be addressing merge conflicts with develop as they arise throughout the day.

@matt-pharr matt-pharr changed the title Repo - PERF - Shorten test feedback and close periodic kinetic samples Repo - PERF - Shorten test wall time and close periodic kinetic samples Oct 27, 2026

@logan-nc logan-nc left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Second pass at 4ed1f1fd2, this time on the big picture as Matt asked. Last night's items (cache-reservation race, missing registry entries, stale stamp, draft wording) are all addressed; I am not repeating them. Nothing below blocks approval; the two harness cases at the end are the only pre-merge ask.

The design is right: precompile once per Julia version, hand the compiled environment to parallel groups through a required artifact with caches as optional acceleration, aggregate behind one stable Tests status, and prepare merge_group so the queue replaces the update-and-rerun cycle. What follows is where the time goes after this PR, because that is what decides the next structural step.

Where the wall time goes now

Measured on the latest run (40500657019, a develop-merge commit) and the three most recent Documentation runs on this branch:

Component Measured On the critical path?
GPEC image rebuild, any src/ change 331 s (1.x) / 337 s (1.11), serial, per version yes, gates every group
Documentation job 425, 448, 554 s on every PR push yes, required check, untouched by this PR
Longest group (core, 1.11) 305 s job; 242 s in test files, of which 96 s is compile yes
Other groups api 141 s / errorfields 119 s of test-file time (1.11) no
Environment artifact 759 MB / 943 MB, 6 to 10 s to upload no
Warm test-only push about 7 min end to end

Two consequences. First, Documentation is now the long pole on a warm push and ties the cold path: it recompiles GPEC in a separate, unpinned docs environment on every push. Second, the "image rebuild" cost is almost entirely the PrecompileTools workload, not the package itself. I measured that on feynman with a fresh stacked depot at develop db90e824d:

GPEC image build
default (src/Precompile.jl runs two Solovev cases) 178 s (187 s wall)
precompile_workload = false 22 s (29 s wall)

So roughly nine tenths of the 5.5-minute precompile step is the workload executing physics at build time, once per Julia version, on every PR that touches src/.

Structural suggestions (post-2.0 direction, with what I would do now)

  1. Turn the workload off for CI test and docs environments, now. One LocalPreferences.toml line written by the workflow (precompile_workload = false, the switch already documented in docs/src/set_up.md) should take the precompile job from about 5.5 min to under 1 min per version on a src/ change. The groups then pay more first-use compilation, but they pay it in parallel, and they already spend 74 to 126 s compiling with the workload present. This needs one measurement, not an argument: run it once and compare the critical path. Keep the workload on for the images users build. The same switch in the docs environment should cut the Documentation job by a similar amount, since Documenter never runs physics.

  2. Documentation should stop being a per-push gate. Two options. (a) Trigger it on merge_group plus PRs that touch docs/, with a skip-aware status job exactly like Tests, so every PR still passes it once in the queue; this loses per-push previews. (b) Keep it per push but have the docs environment consume the pinned CI manifest and the same depot and GPEC-image cache keys as julia-test-version.yaml, so it stops compiling its own copy of everything. I would do (a) now because it is twenty lines and removes the long pole, and keep (b) for when the queue is running. Either way, the sentence in the rollout notes about keeping Documentation required stays true.

  3. Name the floor. With the workload off, the floor on a src/-touching PR is the 22 to 40 s image build plus first-use JIT in the groups. Below that, only one thing helps: Julia rebuilds the whole package image for any change under src/, so a Tearing edit recompiles Vacuum and Equilibrium. The post-2.0 answer is subpackages with path dependencies inside this repo (Utilities, Equilibrium, Vacuum, ... as their own Project.toml), which also shortens every developer's edit-test loop without Revise. Not for this PR; worth an issue with the numbers above as its motivation.

  4. Make the two-tier contract explicit in the test files, not only in the PR description. Matt's framing is right: the harness tracks numbers, the suite exercises paths. The weak point is that the shrunken fixtures and sample counts replace the production ones, so the full-size checks are gone rather than moved. A one-line convention fixes that: each test file reads one tier flag (GPEC_TEST_TIER=full or similar) and picks nsample, grid sizes and fixture decks from it, with the fast values as the default. suites.jl already carries one attribute per file; a second one (tier) is natural. A scheduled workflow then runs the full tier plus the harness on develop nightly. When Matt's Slurm fanout harness lands, that is the job it slots into, and it closes the gap this PR opens by removing pins (see below).

  5. Pin the Julia matrix to explicit minors. The floating 1.x is how the 1.13 periodic-spline break arrived mid-weekend, and each new Julia minor now needs a 3500-line manifest commit before CI is reproducible again. ['1.11', '1.13'] bumped deliberately is calmer. If early warning on the newest Julia is wanted, run it as an advisory job that does not feed the required Tests status, so a Julia release never blocks merges for everyone at once.

  6. Merge-queue rollout notes. Branch protection on develop currently has Documentation and Tests required with strict (require up to date) on. The GitHub docs say the queue "provides the same benefits as the Require branches to be up to date before merging branch protection" without requiring the author to update first, so strict becomes redundant once the queue is on and is worth switching off in the same change. Both required checks already handle merge_group, and PR Conventions is not required, so the queue cannot stall on a check that never reports. One addition for the notes: set the queue's status-check timeout explicitly, because a required check that never reports is the only queue failure mode the docs describe.

  7. Self-hosted snapshot path. ci/local-julia-cache.sh and the GPEC_LOCAL_CACHE_DIR branches are fine to ship, but nothing in CI exercises them. One sentence in ci/manifests/README.md saying they are manually tested on pharr-desktop keeps the next person from assuming CI covers them.

Speed nits (each with what it buys)

  • Rebalance the groups from the measured file times. core carries 242 s of test-file time against errorfields 119 s and api 141 s. Moving runtests_layer_overlap_fitzpatrick.jl (40 s) and runtests_innerlayer.jl (18 s) into errorfields, where their SLAYER siblings already live, and runtests_grid_refinement.jl (30 s) into api gives roughly 154 / 171 / 177 s, about 90 s off the longest group.
  • JULIA_NUM_THREADS: 4 on the 4-vCPU hosted runners instead of 2; OPENBLAS_NUM_THREADS: 1 already prevents oversubscription. The threaded stages (ODE chunks, kinetic surfaces) are what the slow files run.
  • JULIA_CPU_TARGET. generic is baseline x86-64 with no FMA or AVX in Julia-compiled kernels, which is both slower and numerically further from a workstation run. The multi-target string Julia's own binaries use (generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)) keeps images portable across hosted runners. Flagged as an experiment, because clone_all lengthens the image build; measure it after item 1 above, when the build is short.
  • timeout-minutes: 90 on the precompile job no longer matches reality; 30 catches a hung cache upload instead of letting it burn an hour of runner time.

Are the tests now insufficient anywhere?

Choices I accept as-is: kinetic smoke precision in the error-fields deck, coil replay on one set with the nominal sweep still covering all sets, four rendered PNGs with object checks on the rest, dropping the duplicate Solovev full run.

Three places I would change:

  • The removed pins are tracked only in a harness case this PR did not run. The DIII-D Riccati energy pin and the Δ′ diagonal pins now live in diiid_n1_riccati (delta prime (BVP diagonal), total energy Re(et[1])), and the kinetic endpoint change in Torque.jl is only exercised by the solovev_kinetic_* cases. The report in the body ran diiid_n1 alone. I have diiid_n1_riccati,solovev_kinetic_ntv queued on feynman against current origin/develop and will post the table here when it finishes; if it is clean, that plus the existing report is the evidence the removals need.

  • Restore the sample counts in runtests_monte_carlo.jl. That file now runs in 2.6 to 3.5 s including compile, so the 10× cut saved at most tens of seconds. What it cost: with 512 or 2000 samples and rtol=1e-2 on a sampled mean, the tests pass because of the particular seed, not because of statistical margin, so a change in Julia's RNG stream between minors turns them red with no code change. Keep the cuts in runtests_error_fields.jl, where Monte Carlo is only exercised on the DIII-D run; put the synthetic distribution tests back to their original N (or a tier switch, item 4).

  • One loose golden value per module on the fixtures that already run. The gap a paths-only contract leaves is a wrong number that still runs: a factor of two in a torque, a sign flip in Δ′, a dropped Jacobian. The harness catches those, but it is manual, author-run, and not on the queue. A single isapprox with rtol=1e-3 per physics module on the small fixtures each file already builds (Solovev et[1], one NTV torque on the Solovev kinetic deck, one Δ′ diagonal on the TJ analytic deck, one |∇ψ| average) costs nothing at run time, is cheap to maintain because the tolerance is loose, and catches gross breakage in seconds. Tight pins stay in the harness; loose pins belong here.

Third-party human approval is still required before this merges.

@logan-nc

Copy link
Copy Markdown
Collaborator

Follow-up to my review: the two harness cases that track the removed pins and the kinetic endpoint change, run on feynman against this PR's actual merge base 6d655c74c (the develop commit it last merged), head 4ed1f1fd2, Julia 1.11.7, pinned manifest, 4 threads. Both are bit-clean, every diff 0.0e+00.

Note for whoever merges: develop has since taken #513 and #571, both results-moving in ForceFreeStates. A first run against today's develop head showed Δ′, energies and ODE step counts moving in diiid_n1_riccati; that is entirely those two merges (this branch's only src/ change against its merge base is the seven-line Torque.jl hunk), so the next develop merge into this branch will move those numbers for reasons unrelated to it.

Regression Report: diiid_n1_riccati
===========================================================================================
Ref 1: 6d655c74c  @ 6d655c74c (2026-10-27)
       env: julia 1.11.7, x86_64-linux-gnu, manifest cb9237e9 (pinned), 4 threads/4 BLAS, jit build
Ref 2: origin/test/streamline-suite  @ 4ed1f1fd2 (2026-10-27)
       env: julia 1.11.7, x86_64-linux-gnu, manifest cb9237e9 (pinned), 4 threads/4 BLAS, jit build
-------------------------------------------------------------------------------------------
Quantity                       6d655c74c      origin/test/streamline-suite  Diff     Status
-------------------------------------------------------------------------------------------
delta prime (BVP diagonal)     [5 elem]       [5 elem]                      0.0e+00  OK    
delta prime (raw side-major)   [10 elem]      [10 elem]                     0.0e+00  OK    
edge coil response delta_coil  [10 elem]      [10 elem]                     0.0e+00  OK    
total energy Re(et[1])         8.031978e-01   8.031978e-01                  0.0e+00  OK    
plasma energy Re(ep[1])        -1.368533e+00  -1.368533e+00                 0.0e+00  OK    
vacuum energy Re(ev[1])        2.171731e+00   2.171731e+00                  0.0e+00  OK    
total energy (all)             [35 elem]      [35 elem]                     0.0e+00  OK    
# singular surfaces            5              5                             0.0e+00  OK    
singular psi locations         [5 elem]       [5 elem]                      0.0e+00  OK    
singular q values              [5 elem]       [5 elem]                      0.0e+00  OK    
ODE steps (saved)              93             93                            0.0e+00  OK    
ODE steps (total)              2647           2647                          0.0e+00  OK    
mpert                          35             35                            0.0e+00  OK    
npert                          1              1                             0.0e+00  OK    
q0                             1.204212e+00   1.204212e+00                  0.0e+00  OK    
q95                            4.781723e+00   4.781723e+00                  0.0e+00  OK    
beta_n                         1.372511e+00   1.372511e+00                  0.0e+00  OK    
Runtime (s)                    223.2s         227.9s                                 --    
===========================================================================================
Summary: 17 unchanged
Regression Report: solovev_kinetic_ntv
======================================================================================================
Ref 1: 6d655c74c  @ 6d655c74c (2026-10-27)
       env: julia 1.11.7, x86_64-linux-gnu, manifest cb9237e9 (pinned), 4 threads/4 BLAS, jit build
Ref 2: origin/test/streamline-suite  @ 4ed1f1fd2 (2026-10-27)
       env: julia 1.11.7, x86_64-linux-gnu, manifest cb9237e9 (pinned), 4 threads/4 BLAS, jit build
------------------------------------------------------------------------------------------------------
Quantity                                   6d655c74c     origin/test/streamline-suite  Diff     Status
------------------------------------------------------------------------------------------------------
NTV torque fgar [Re, Im]                   [1 elem]      [1 elem]                      0.0e+00  OK    
NTV ψ quadrature evaluations               45            45                            0.0e+00  OK    
root-area-weighted total energy Re(et[1])  1.090570e-02  1.090570e-02                  0.0e+00  OK    
# singular surfaces                        2             2                             0.0e+00  OK    
singular psi locations                     [2 elem]      [2 elem]                      0.0e+00  OK    
q0                                         1.900006e+00  1.900006e+00                  0.0e+00  OK    
Runtime (s)                                248.5s        244.1s                                 --    
======================================================================================================
Summary: 6 unchanged

@matt-pharr
matt-pharr requested a review from logan-nc October 28, 2026 13:35
@matt-pharr

Copy link
Copy Markdown
Collaborator Author

Thanks for the detailed follow-up, Nik, and for running the two additional harness cases. The clean Riccati and Solovev kinetic comparisons close the remaining regression check.

We tested disabling the precompile workload on GitHub. GPEC itself compiled in about 17 seconds, but first-use compilation pushed the warm test workflow to roughly 10 minutes. Restoring the workload brought it down to 6m02s, so we’ve kept it enabled for tests and disabled it for docs. Documentation passed in 3m55s and 5m40s across the two runs. We also applied your group rebalance and reduced the precompile timeout to 30 minutes.

On Monte Carlo, I don’t think restoring all sample counts is warranted: the primary distribution comparisons still use 20,000/30,000 samples, while the 512-sample coherent-ring checks exercise fixed resultant magnitudes or cancellation. We’ve retained those counts.

I’d keep the broader tiering, golden-value, matrix-policy, and architectural suggestions outside this PR. The intended split remains small fixtures with inexpensive correctness checks in CI, and production numerical tracking in the harness.

The body now records the measurements, your harness results, and the disposition of the suggestions. All tests and docs pass. This seems like a reasonable stopping point for the overhaul; could you give it a final look and approve if you’re satisfied?

@matt-pharr
matt-pharr enabled auto-merge October 29, 2026 13:13
@matt-pharr
matt-pharr merged commit 5b2258e into develop Oct 29, 2026
15 of 16 checks passed
@matt-pharr
matt-pharr deleted the test/streamline-suite branch October 29, 2026 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

perf Same answers, less time or memory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants