Skip to content

HDF5Schema - API! - ⚠️ Make the Euler-Lagrange matrix output optional and off by default - #493

Draft
d-burg wants to merge 7 commits into
developfrom
feature/optional-el-matrix-output
Draft

d-burg wants to merge 7 commits into
developfrom
feature/optional-el-matrix-output

Conversation

@d-burg

@d-burg d-burg commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Release note

  • Audience: users
  • Numerical impact: none (harness @ d068e2d)
  • Migration: the ForceFreeStates/EulerLagrangeMatrices group is no longer written by default. Set write_el_matrices = true in [ForceFreeStates] to restore it.

The Euler-Lagrange matrix group is a diagnostic that nothing reads back, and it dominates the output: 98 of 104 MB on a DIII-D n = 1 Riccati run. It is now opt-in, which takes that run's gpec.h5 from 104.8 MB to 5.8 MB with no change in runtime.

Regression report

regress --cases diiid_n1,solovev_n1 --refs 6fc89d021,d068e2d97 --force on feynman (SLURM, 8 threads; current develop against this branch with develop merged, both fresh, manifest pinned). All 53 diiid_n1 and all 22 solovev_n1 quantities are unchanged.

diiid_n1
Regression Report: diiid_n1
=================================================================================================
Ref 1: 6fc89d021  @ 6fc89d021 (2026-10-09)
       env: julia 1.11.9, x86_64-linux-gnu, manifest f826ee26 (pinned), 8 threads/8 BLAS, jit build
Ref 2: d068e2d97  @ d068e2d97 (2026-10-09)
       env: julia 1.11.9, x86_64-linux-gnu, manifest f826ee26 (pinned), 8 threads/8 BLAS, jit build
-------------------------------------------------------------------------------------------------
Quantity                                      6fc89d021        d068e2d97        Diff       Status
-------------------------------------------------------------------------------------------------
total energy Re(et[1])                        8.012355e-01     8.012355e-01     0.0e+00    OK
total energy Im(et[1])                        8.240976e-05     8.240976e-05     0.0e+00    OK
plasma energy Re(ep[1])                       -1.348452e+00    -1.348452e+00    0.0e+00    OK
vacuum energy Re(ev[1])                       2.149687e+00     2.149687e+00     0.0e+00    OK
vacuum matrix min eigenvalue                  1.873976e-01     1.873976e-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)                             1425             1425             0.0e+00    OK
ODE steps (total)                             1420             1420             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.842392e-01     8.842392e-01     0.0e+00    OK
internal inductance li2                       7.080847e-01     7.080847e-01     0.0e+00    OK
internal inductance li3                       7.304433e-01     7.304433e-01     0.0e+00    OK
poloidal beta betap1                          6.680744e-01     6.680744e-01     0.0e+00    OK
poloidal beta betap2                          5.349834e-01     5.349834e-01     0.0e+00    OK
poloidal beta betap3                          5.518761e-01     5.518761e-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.236478e-01     4.236478e-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.708350e+00     1.708350e+00     0.0e+00    OK
q profile (checksum)                          0cd285cea88d...  0cd285cea88d...  identical  OK
pressure profile (checksum)                   a1c48b266622...  a1c48b266622...  identical  OK
Mercier D_I profile (checksum)                eeb06744e795...  eeb06744e795...  identical  OK
resistive interchange D_R profile (checksum)  fa37296851f6...  fa37296851f6...  identical  OK
ballooning Delta' profile (checksum)          6eb0ea075ccf...  6eb0ea075ccf...  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.197137e-04     5.197137e-04     0.0e+00    OK
dominant-coupling singular values             [3 elem]         [3 elem]         0.0e+00    OK
|forcing overlap with dominant mode|          1.418634e-04     1.418634e-04     0.0e+00    OK
|delta_nominal| of coil set 1                 7.069938e-05     7.069938e-05     0.0e+00    OK
||ddelta/d(shift)|| over coil sets            1.246634e-04     1.246634e-04     0.0e+00    OK
||ddelta/d(tilt)|| over coil sets             4.180859e-07     4.180859e-07     0.0e+00    OK
PE plasma energy                              3.420570e+00     3.420570e+00     0.0e+00    OK
PE vacuum energy                              3.174510e+00     3.174510e+00     0.0e+00    OK
PE surface energy                             5.828844e+00     5.828844e+00     0.0e+00    OK
PE toroidal torque                            1.156768e-04     1.156768e-04     0.0e+00    OK
NTV torque FGAR [N·m]                         5.316226e-01     5.316226e-01     0.0e+00    OK
NTV kinetic energy dW FGAR [J]                7.958639e-02     7.958639e-02     0.0e+00    OK
Runtime (s)                                   300.3s           317.0s                      --
||forcing b~|| (root-area-weighted)           4.683328e-04     4.683328e-04     0.0e+00    OK
resonant area-weighted field b^r              [5 elem]         [5 elem]         0.0e+00    OK
=================================================================================================
Summary: 53 unchanged
solovev_n1
Regression Report: solovev_n1
=================================================================================
Ref 1: 6fc89d021  @ 6fc89d021 (2026-10-09)
       env: julia 1.11.9, x86_64-linux-gnu, manifest f826ee26 (pinned), 8 threads/8 BLAS, jit build
Ref 2: d068e2d97  @ d068e2d97 (2026-10-09)
       env: julia 1.11.9, x86_64-linux-gnu, manifest f826ee26 (pinned), 8 threads/8 BLAS, jit build
---------------------------------------------------------------------------------
Quantity                      6fc89d021        d068e2d97        Diff       Status
---------------------------------------------------------------------------------
total energy Re(et[1])        6.775244e-01     6.775244e-01     0.0e+00    OK
total energy Im(et[1])        -1.817305e-05    -1.817305e-05    0.0e+00    OK
plasma energy Re(ep[1])       -9.735863e+00    -9.735863e+00    0.0e+00    OK
vacuum energy Re(ev[1])       1.041339e+01     1.041339e+01     0.0e+00    OK
vacuum matrix min eigenvalue  2.171581e+00     2.171581e+00     0.0e+00    OK
plasma energy (all)           [32 elem]        [32 elem]        0.0e+00    OK
vacuum energy (all)           [32 elem]        [32 elem]        0.0e+00    OK
total energy (all)            [32 elem]        [32 elem]        0.0e+00    OK
ODE steps (saved)             412              412              0.0e+00    OK
ODE steps (total)             410              410              0.0e+00    OK
q0                            1.900006e+00     1.900006e+00     0.0e+00    OK
q95                           3.147422e+00     3.147422e+00     0.0e+00    OK
beta_t                        4.620277e-02     4.620277e-02     0.0e+00    OK
beta_n                        3.215290e+00     3.215290e+00     0.0e+00    OK
# singular surfaces           2                2                0.0e+00    OK
singular psi locations        [2 elem]         [2 elem]         0.0e+00    OK
singular q values             [2 elem]         [2 elem]         0.0e+00    OK
mpert                         32               32               0.0e+00    OK
npert                         1                1                0.0e+00    OK
q profile (checksum)          049799b65749...  049799b65749...  identical  OK
pressure profile (checksum)   46c4ecb65021...  46c4ecb65021...  identical  OK
ca_left (checksum)            b238fe7486b2...  b238fe7486b2...  identical  OK
Runtime (s)                   222.8s           221.1s                      --
=================================================================================
Summary: 22 unchanged

Notes for reviewers

Tests check that the option writes the group and that a default run omits it. They reuse runs the suite already makes.


NO MERGE WITHOUT HUMAN REVIEW. This PR is a draft and needs a named human reviewer before it can be considered for merge.

🤖 Generated with Claude Code

d-burg and others added 4 commits September 23, 2026 12:29
…d off by default

The ForceFreeStates/EulerLagrangeMatrices group holds the ideal A-K matrices,
and on a kinetic run the kinetic set, sampled on the psi grid. Each is
mpert x mpert x npsi complex, so the group scales as mpert^2 times npsi and
dominates the output: 98 of 104 MB on a DIII-D n=1 Riccati run, and far more
at higher mode counts or finer grids.

Nothing in the code reads the group back; it is a diagnostic for inspecting the
coefficient system. Gate it behind a new write_el_matrices control, default
false, which takes that run's gpec.h5 from 104.8 MB to 5.8 MB. Runtime is
unchanged (17.52 s vs 17.50 s, min of five warm runs).

Set write_el_matrices = true in [ForceFreeStates] to restore the group.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
… document it

The schema test now opts into write_el_matrices so the metadata contract still
covers the group, and checks the default is off. Move the conventions-table
entry into the ForceFreeStates row, flag the opt-in in workflow.md, and trim
run-specific figures from the field docstring and write-site comment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… a default run omits the group

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ig reference

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@d-burg d-burg self-assigned this Oct 2, 2026
@github-actions github-actions Bot added api Config key, output dataset or exported name changed changed-results Results move or an interface breaks - read before upgrading labels Oct 2, 2026
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

This pull request is missing a reviewer.

If you are not ready to name them, mark this pull request as a draft.
docs/development/contributors.md suggests lead developers to ask.
Merging is not blocked here, but no pull request may be merged without human review.

1 similar comment
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

This pull request is missing a reviewer.

If you are not ready to name them, mark this pull request as a draft.
docs/development/contributors.md suggests lead developers to ask.
Merging is not blocked here, but no pull request may be merged without human review.

@d-burg d-burg changed the title HDF5Schema - API! - Make the Euler-Lagrange matrix output optional and off by default HDF5Schema - API! - ⚠️ Make the Euler-Lagrange matrix output optional and off by default Oct 5, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Config key, output dataset or exported name changed changed-results Results move or an interface breaks - read before upgrading

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant