Raise the SOCRATES and AGNI pins for GCC 16 symbol export - #863
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #863 +/- ##
=======================================
Coverage 93.45% 93.46%
=======================================
Files 113 113
Lines 16797 16797
Branches 2992 2992
=======================================
+ Hits 15698 15699 +1
+ Misses 1093 1092 -1
Partials 6 6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@nichollsh Tests on this fail because AGNI declares SOCVER_minimum as a float and so it sees 2603.10 as smaller than the declared minimum of 2603.6. How shall we fix this? |
|
I noticed this last night, actually, and implemented a fix in the most recent AGNI commit: nichollsh/AGNI@f94940b It should work fine if you pull changes to your local AGNI repo and update the hash pinned by PROTEUS here. |
GCC 16.2 gives a PRIVATE Fortran module procedure hidden ELF visibility even where its bind(C) label grants external linkage, so dlsym cannot resolve it. The generated Julia wrapper modules and SOCRATES_C.f90 each declared their contents private, which left 125 of the 128 PS_ entry points local in libSOCRATES_C.so and stopped AGNI at PS_create_StrDim. SOCRATES 2603.10 declares them public. The previous pin carried only the earlier fix for real_kind_bytes, which cleared the precision probe but none of the wrapper or radiative transfer entry points. Bumping the pin invalidates the cached CI SOCRATES build, whose key derives from [tool.proteus.modules].
AGNI compared SOCRATES versions by parsing the whole version string as a float, so the YYMM.minor spelling 2603.10 read as 2603.1, below the declared floor of 2603.6, and AGNI refused the library as out of date. Grey-gas runs were unaffected because the check guards only the branch selecting the SOCRATES radiative transfer scheme. AGNI 1.12.4 splits the version string and compares major and minor as integers, and raises the floor to 2603.9. The module version table is regenerated for both pins.
7d9eeab to
f740368
Compare
|
@nichollsh Thanks, that works. Pinned AGNI at f94940b6 here alongside the SOCRATES bump to 2603.10, and the version check now accepts it. Three of the four AGNI integration tests pass. The fourth, |
|
Interesting. One of my recent PRs did introduce some changes to ensure that the interior radius/gravity are robustly passed to AGNI from the helpfile. So maybe the blackbody calculation uses a different radius (in the test) compared to what AGNI is being provided with? This would lead to different fluxes. |
Keep AGNI pinned at 8a494d7c (main's banded-OLR nightly fix) and take the PR's SOCRATES bump to c3296586 (2603.10, GCC 16.2 symbol-export fix, SOCRATES#30). The PR's own AGNI pin (f94940b6) is an ancestor of main's and would revert the banded-OLR fix, so it is dropped in favor of main's newer pin; the SOCRATES bump is a clean forward move with main as an ancestor. Regenerated docs/Reference/module_versions.md for the new pins.
|
Sorry for the churn here, Patrick. The conflict is my doing: the banded-OLR nightly fix (#866) bumped AGNI on main to 8a494d7c while this PR was open. I merged current main in and reconciled the two pins:
Linux CI is green: SOCRATES 2603.10 builds and links against AGNI 8a494d7c and the full suite passes. The macOS tier failed earlier on a Zenodo outage and is green again on the re-run. Ready to merge from your side whenever suits. |
timlichtenberg
left a comment
There was a problem hiding this comment.
Reconciled onto current main. SOCRATES 2603.10 is the GCC 16 symbol-export fix; I kept main's AGNI pin (8a494d7c) since it is already past 1.12.4 and includes the banded-OLR fix. CI is green. Approving to unblock the merge.
Description
Raises two pins that must move together:
43b86d4d(2603.8) toc3296586(2603.10), the current SOCRATESmain.c7ffdf00(1.12.3) tof94940b6(1.12.4), the current AGNImain.GCC 16.2 gives a
PRIVATEFortran module procedure hidden ELF visibility even where itsbind(C)label grants external linkage, sodlsymcannot resolve it. The generated Julia wrapper modules andjulia/src/SOCRATES_C.f90each declared their contents private, which left 125 of the 128PS_entry points local inlibSOCRATES_C.soand stopped AGNI atPS_create_StrDim. SOCRATES 2603.10 declares them public (FormingWorlds/SOCRATES#30). The previous pin carried only the earlier fix forreal_kind_bytes(FormingWorlds/SOCRATES#29), which cleared the precision probe but none of the wrapper or radiative transfer entry points.The SOCRATES pin cannot move on its own. AGNI compared SOCRATES versions by parsing the whole version string as a float, and 2603.10 is the first SOCRATES release whose minor number reaches two digits, so
"2603.10"read as 2603.1: below the declared floor of 2603.6, and numerically identical to the real earlier release 2603.1. AGNI reported the library as out of date and setup failed. AGNI 1.12.4 splits the version string and compares major and minor as integers, and raises the floor to 2603.9.The module version table in
docs/Reference/module_versions.mdis regenerated for both pins, which thegenerate_version_badges.py --checkjob requires.No linked issue exists for this.
Bumping the SOCRATES pin invalidates the cached CI SOCRATES build, whose key derives from
[tool.proteus.modules].Validation of changes
Test configuration: macOS 15 arm64 (Darwin 25.6.0), GCC 16.2.0 (Homebrew), netCDF-Fortran 4.6.4, Julia 1.12.7, Python 3.12.14, both modules checked out at the refs pinned by this branch, SOCRATES cloned fresh and compiled with
./configure && ./build_codefollowed by the Julia wrapper build.Symbol export, measured with
nmonjulia/lib/libSOCRATES_C.so:T)t)c329658643b86d4d, same tree and compilerThe second row is a control: only the two wrapper source files were reverted, everything else held fixed. At the previous pin
PS_create_StrDim,PS_radiance_calcandPS_read_spectrumare all local, andPS_real_kind_bytesis the single exported entry point. Restoring the new pin and rebuilding returns the count to 128 exported and 0 local. The compiler is therefore ruled out as the variable.Coupled behaviour,
pytest tests/integration/test_integration_agni_transparent_limit.py tests/integration/test_integration_agni_greygas_interior.pywithPROTEUS_CI_NIGHTLY=1:test_transparent_greygas_olr_equals_blackbody_emissiontest_transparent_greygas_olr_scales_with_surface_emissivitytest_agni_greygas_dummy_interior_couplingtest_transparent_banded_olr_recovers_blackbody_emissionAll four tests reach
AGNI.atmosphere.setup!, which allocatesSOCRATES.StrDim()and so callsPS_create_StrDim, the exact symbol that could not be resolved before the fix. Against the previous SOCRATES pin these tests fail at that call. The banded test additionally exercises the full spectral-file path through the SOCRATES two-stream solver, which the grey-gas tests do not touch.Unit tier,
pytest -m "unit and not skip and not slow and not integration" --ignore=tests/examples: 2987 passed, 41 skipped (optional dependencies absent), 0 failed.Lint, structure and docs:
ruff check src/ tests/clean,ruff format --check src/ tests/reports 343 files already formatted,bash tools/validate_test_structure.shpasses,python tools/generate_version_badges.py --checkreports the table up to date.Pre-existing failure in the banded test
test_transparent_banded_olr_recovers_blackbody_emissionfails, and it fails identically without this change. Running it against the pins currently onmain(AGNIc7ffdf00with a SOCRATES build of the same vintage) produces the same value to the last digit, 287271.5671661585, so neither pin in this pull request moves the result.The observed outgoing longwave flux sits slightly above the Stefan-Boltzmann limit rather than below it:
The test tolerance is 5e-4, so 1000 K passes and 1500 K does not. Worth noting for whoever picks this up: the test also asserts
F_olr < sigma T^4on the grounds that band truncation and midpoint evaluation can only lose flux against the exact integral, and the measured values violate that in the same direction at both temperatures. That points at something other than tolerance calibration.This is out of scope here. The SOCRATES change cannot be responsible: the diff from the previously pinned SOCRATES to
c3296586touches onlyjulia/srcwrapper files, docs and the version file, leaving the radiative transfer core untouched. Integration tests run nightly rather than on pull requests, so this does not gate the checks on this branch.Checklist
docs/Reference/module_versions.mdregenerated