Skip to content

Sync: the lab merge's regressions fixed and pinned in the corpus - #14

Closed
chenyueqi wants to merge 4 commits into
mainfrom
sync/clubb-solve
Closed

chenyueqi wants to merge 4 commits into
mainfrom
sync/clubb-solve

Conversation

@chenyueqi

Copy link
Copy Markdown
Member

Carried by tools/export sync; each commit names its origin in a Carried-From trailer.

  • Character parameters are their text; the CESM-family constant shapes are an engine test with gfortran's values; corpus/elm_leaf is a shipped tree run in CI
  • The gate bounds generated draws only; corpus/clubb_solve pins the shapes CLUBB's variance step hands its solver
  • The reference is handed only the OUT buffers its wrapper takes
  • A draw spans a declared lower bound, and the profile reads the draw the way Python does

🤖 Generated with Claude Code

chenyueqi and others added 4 commits September 8, 2026 16:23
…inned in the corpus

- A character parameter is its text: the fold check has no width to refuse
- The constant shapes the CESM-family trees carry, as an engine test with gfortran's values
- corpus/elm_leaf: the ELM shapes that failed, as a shipped tree both recipes run in CI

Signed-off-by: lewisychen <yueqichen.0x0@gmail.com>

Carried-From: fb5c51f0dea04d70279a52c247142b5de27283c9
…s generated draws only, corpus/clubb_solve pins CLUBB's solver shapes

The JAX port follows the lab merge's anchor spellings, the gate bounds generated draws only, and corpus/clubb_solve pins the shapes CLUBB's variance step hands its solver

- corpus/clubb_solve: the shapes CLUBB's variance step hands its solver, as a shipped tree both recipes run in CI
- The JAX port reads the ravelled spelling of a reshaped actual, lays the copy-out on the array's own cells, and refuses what it cannot call
- The copy-out lands on a section too, the anchor spells a section's copy-out through the runtime, and the plain frontend takes CLUBB's buffer convention
- A recorded sample is compared however long the candidate takes; corpus/clubb_solve holds its loop bounds the way CLUBB's does

Signed-off-by: lewisychen <yueqichen.0x0@gmail.com>

Carried-From: 1f7fdb8850e036ee6d497146e7deed6e27eeeb81
The lab merge (b9e3baf) handed every caller-buffer OUT array to the
reference, where the gate had handed those with an axis of no declared
extent (_passed_buffer, the f2py wrapper's own rule: those it spells
inout, every other OUT array it sizes and returns). Under CLUBB's
convention every OUT array is the caller's buffer, so each explicit-shape
output was one keyword argument more than the wrapper took --
advance_helper_module's calc_ri_zm and calc_stability_correction at
tier1, bit-exact at 1555d42, "takes at most 6 keyword arguments (7
given)" from d7b97c5 on. Found by the full CLUBB re-verification on
1f7fdb8.

_reference_takes is the wrapper's rule (no declared extent, or
allocatable), for the f2py convention; a reference emitted the way the
candidate was (a NumPy anchor) takes every buffer, as the candidate does.
corpus/clubb_solve's driver now hands back the step's tendency, an
explicit-shape OUT array under the all-buffers convention: the exact
TypeError on the merged gate, 425 points bit-exact with this.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Eu1peBeXAR3j6Z8oVMZaur
Signed-off-by: lewisychen <yueqichen.0x0@gmail.com>

Carried-From: f735a553b0b053b29e0c36b018f83fcb3a0456fd
…he way Python does; corpus/clubb_solve carries CLUBB's tridiagonal solver

Two more of the lab merge's (b9e3baf), found by the full CLUBB
re-verification on 1f7fdb8, bit-exact at 1555d42:

- _guarded_shapes started every axis at its upper bound alone, where
  _extent beside it reads ub - lb + 1. CLUBB's tridiagonal, pentadiagonal
  and BiCGSTAB solvers take lhs(-1:1, ...) / lhs(-2:2, ...): handed one
  row for three, every draw subscripted past it (tier0 tridiag_lu_solvers,
  penta_lu_solvers, bicgstab_solvers). Every axis now draws at its
  declared extent.
- The subscript guard on a drawn array (a negative index is a value
  outside the source's domain, not Python's last element) reached the
  operator's recast_inputs.py, which reads the draw the way Python does:
  CLUBB's interpolation profile takes the last altitude as xlist[-1], was
  refused, and the run died with no verdict (tier0 interpolation). The
  profile sees plain arrays; what it hands back is guarded again before
  the candidate sees it.

corpus/clubb_solve gains tridiag_lu_solver.f90, CLUBB's single-rhs LU
solve with its band at lhs(-1:1, ndim), and a recast_inputs.py that makes
the band diagonally dominant reading its last row as lhs[-1]. On the
merged gate the profile dies on a one-row band; with this, 140 points
bit-exact and within 14 ULP under JAX.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Eu1peBeXAR3j6Z8oVMZaur
Signed-off-by: lewisychen <yueqichen.0x0@gmail.com>

Carried-From: a877d83288efea586f5c1012cb4fec3239596f4b
@chenyueqi

Copy link
Copy Markdown
Member Author

Superseded by #15: the same four changes, recredited to the change's own author and with the tree-target corpus steps pruned from this edition's CI.

@chenyueqi chenyueqi closed this Sep 8, 2026
@chenyueqi
chenyueqi deleted the sync/clubb-solve branch September 8, 2026 22:43
@chenyueqi chenyueqi added engine Changes under src/recast: frontends, translation, verification corpus The shipped corpus trees, their summaries and the baseline sync Carried from the engine by tools/export sync; each commit names its origin superseded Closed unmerged; redone as a later pull request labels Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

corpus The shipped corpus trees, their summaries and the baseline engine Changes under src/recast: frontends, translation, verification superseded Closed unmerged; redone as a later pull request sync Carried from the engine by tools/export sync; each commit names its origin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant