Repository navigation
Conversation
…erkin paths in the precompile workload The workload ran a Solovev case through the Riccati and forward stability solves only, so the first full run in a fresh process compiled the coil forcing, the perturbed equilibrium, the kinetic torque and the Galerkin solve on first use. Add a Galerkin pass on the Solovev case and a coarse TJ-analytic case with kinetic profiles and C-coil forcing that runs the response and the torque. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BgNxCG7pGc8HRXGZ3r3psj
…mpile workload Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BgNxCG7pGc8HRXGZ3r3psj
…ct equilibrium solver The TJ-analytic case compiled the inverse-equilibrium path into the package image, which changed the last bit of a re-formed inverse equilibrium against a freshly read one. The direct solver leaves that path compiled on first use. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BgNxCG7pGc8HRXGZ3r3psj
logan-nc
marked this pull request as ready for review
November 14, 2026 11:42
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release note
The first full run in a fresh Julia process no longer compiles the coil forcing, the perturbed equilibrium, the kinetic torque or the Galerkin solve on first use: the package build now runs them once. On
examples/DIIID-like_ideal_examplethe first run drops from about 48 s to about 13 s, and the first Galerkin stability run from about 24 s to about 10 s.Regression report
Notes for reviewers
What changed.
src/Precompile.jlran a coarse Solovev case through the Riccati and forward stability solves. It now also runs that case through the Galerkin solve (with the coil-response columns), and a coarse TJ-analytic case with kinetic profiles and DIII-D C-coil forcing through the perturbed equilibrium and the kinetic torque. The decks are built in memory and the kinetic table is written to the scratch directory, so nothing outsidesrc/is read.Measured (two Xeon Gold 6330, shared, 16 threads, Julia 1.11.7; each row two fresh processes; the deck is
examples/DIIID-like_ideal_examplewithout local stability and error fields, on a fixed 128-interval grid with loose tolerances, andexamples/DIIID-like_gal_resistive_examplecut down to equilibrium and stability):using GeneralizedPerturbedEquilibriumCost. The one-time build of the package is longer: about 200 s on develop against 256, 326 and 269 s in three builds of this branch, all on a loaded shared machine, so the increase is roughly one to two minutes and not better known than that.
Results. With the workload on (the default build), the full run above returns bit-identical least-stable energy, total torque and resonant fields on develop and on this branch. The harness (workload off, plus the
diiid_n1_riccati_precompiledcase with it on) is unchanged.CI on the first two commits. Two checks failed. The formatter wanted one expression wrapped differently; fixed.
runtests_equil.jl:312, an exact (==) comparison of a re-formed inverse equilibrium with a freshly read one, failed in thecoregroup, where it passes on other pull requests. The first version of the workload ran its response case through the inverse-equilibrium solver at build time, and code compiled into the package image can round differently in the last bit (docs, Developer tips). The third commit moves that case to the direct solver so the inverse path is compiled on first use as before. With the third commit every check passes. (Locally the test could not be used as a guide: on the two machines available it fails on unmodified develop as well.)What is left. About 7 s of the first full run is still compilation: 4.4 s outside the timed stages, about 0.8 s in the equilibrium read from a g-eqdsk file (the workload uses analytic equilibria) and about 1 s in the torque. Covering the file-based equilibrium would need an equilibrium file inside
src/or a writer for one; not done here.No new test. A workload that fails stops the package build, which every test run does first.
Opened as a draft: assignee set, reviewer to be named.
🤖 Generated with Claude Code
https://claude.ai/code/session_01BgNxCG7pGc8HRXGZ3r3psj