Skip to content

Migrate KIM special functions to fortnum (1/8)#140

Draft
krystophny wants to merge 2 commits into
mainfrom
fortnum/k1-kim-special-funcs
Draft

Migrate KIM special functions to fortnum (1/8)#140
krystophny wants to merge 2 commits into
mainfrom
fortnum/k1-kim-special-funcs

Conversation

@krystophny

@krystophny krystophny commented Jun 14, 2026

Copy link
Copy Markdown
Member

Migrate KIM special functions to fortnum (1/8)

Replaces the GSL special-function calls in KIM with the fortnum core. First branch of the cumulative k1..k8 then z1..z3 migration stack; every later branch builds on this one.

Pins the fortnum FetchContent GIT_TAG to main 974dcf1, which carries all kernel fixes plus the two new integrators.

Golden-record CI timeout fix

ql-balance_golden_record ran ensure_golden() at pytest collection time. That clones KAMEL main and does a full from-scratch cmake build of main_ref inside the 600 s timed test, so the comparison only began near 600 s and the test timed out even though the numerics were fine.

The build of main_ref and the reference run now live in a separate CMake setup fixture, ql-balance_golden_setup (timeout 1800 s), wired via FIXTURES_SETUP ql-balance_golden. ql-balance_golden_record requires that fixture and runs only the comparison. test_golden_record.py locates golden.h5 directly and falls back to ensure_golden() only for a bare pytest invocation outside CTest.

Verification

This branch reproduces main bit-for-bit on the golden record:

RESULT: 114/114 pass, 0 fail
worst rel=0.000e+00 abs=0.000e+00

(uv venv: pytest numpy scipy h5py f90nml matplotlib; golden generated from main 428a708; bar rtol=1e-8 atol=1e-15, unchanged.)

Merge order

#140 k1 -> #141 k2 -> #142 k3 -> #143 k4 -> #144 k5 -> #145 k6 -> #146 k7 -> #147 k8 -> #148 z1 -> #149 z2 -> #150 z3.

Note: fortnum pin updated to current main (92de6e9) after a fortnum history rewrite; old shas no longer resolve.

@krystophny krystophny force-pushed the fortnum/k1-kim-special-funcs branch from a64da2f to 79861f2 Compare June 15, 2026 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant