RLT-ROMS-001 — Numerical stability and scientific software verification
Independent research into numerical accuracy, compilation compatibility and benchmark correspondence in UCLA-ROMS, related to [C]Worthy ocean modeling research.
Upstream contribution: UR-3
UCLA-ROMS PR #112 — Fix GNU Fortran continuation errors in flux initialization was submitted. Five allocation and initialization statements in src/flux_frc.F were separated, preserving their order. The operator reproduced five continuation errors at the pinned baseline, then reported successful compilation, execution and exact aggregate benchmark agreement for Rivers_ana with UR-3 alone. The history-output marker check passed; no benchmark was modified. Maintainer review and upstream CI acceptance remain pending.
UR-2: numerical stability
Two active SM09 stretching functions replace cancellation-prone expressions with the algebraically equivalent sinh ratio and expm1 expressions, retaining the existing zero-parameter branches. In operator-reported standalone tests against an 80-digit reference, each original function produced 6,868 nonfinite results in 29,189 cases; each candidate produced zero. Maximum finite absolute error decreased from approximately 0.178 to 7.77e-16. These are bounded tests, not a proof of universal numerical accuracy. The later Linux experiment reproduced 6,868 nonfinite results per baseline and zero per candidate, with maximum candidate absolute error 9.68624644174491142e-16 against the unrounded high-precision reference. See RLT-ROMS-002 for the saved harness; operator replay PASS with sixteen verified evidence checksums; independent reproduction remains pending. The six real-valued mathematical claims are now kernel-verified; see RLT-ROMS-003.
Integration-001: UR-2 + UR-3
UR-2 and UR-3 were combined on a separate branch. The GNU build and model execution completed; the history-output marker check passed. The unchanged UCLA test compares sums of four diagnostics using exact equality. It returned exit 1. The following differences are reported by the preserved operator log.
| Diagnostic | Benchmark sum | Candidate sum | Signed difference | ULPs |
|---|---|---|---|---|
| KINETIC_ENRG | 9.547483823506483e-05 | 9.547483823506482e-05 | -1.3552527156068805e-20 | 1 |
| BAROTR_KE | 8.753838660241482e-05 | 8.753838660241481e-05 | -1.3552527156068805e-20 | 1 |
| MAX_ADV_CFL | 0.9787589334604757 | 0.978758933460476 | 3.3306690738754696e-16 | 3 |
| MAX_VERT_CFL | 0.7141421940571133 | 0.7141421940571135 | 2.220446049250313e-16 | 2 |
ULP means unit in the last place at the aggregate magnitude. Matching parsed timestep identifiers and finite values were reported; individual timestep error magnitudes were not supplied for this report. Aggregate differences cannot establish per-timestep agreement.
UR-4: failure propagation and Integration-002
The independent UR-4 candidate (3813529) adds explicit exit-status checks for compilation cleanup, compilation, MPI and Slurm execution. Six operator-reported simulated control-flow tests passed. UCLA-ROMS PR #113 — Propagate ROMS compilation and execution failures was submitted separately; maintainer review and upstream CI acceptance remain pending. The real GNU baseline compilation failure was reproduced with UR-4: five continuation errors, explicit compilation failure message, no subsequent execution or diagnostic comparison, and pipeline exit 2. The operator verified the failure-log checksum.
Integration-002 combines UR-3 and UR-4, excluding UR-2. The operator reported exact Rivers_ana diagnostic agreement, history-output marker success and pipeline exit 0, then verified SHA-256 checks for all seven retained evidence files. GitHub comparison confirms two commits and two changed files relative to the baseline. Independent replay remains pending.
The six-case reusable regression harness is adapted from the operator-run inline test; the operator subsequently replayed the saved version against the Integration-002 script, reporting all six tests passed with expected stage traces and exit codes 17, 18, 19, 20, 21 and 0, respectively. Run with Python 3 on a trusted Unix host, passing the candidate script path as the sole argument. It checks simulated stage order and exit codes, not scientific correctness, setup-copy failures or stale artifacts.
python3 test_ur004.py /path/to/Examples/code_check/do_test_roms.sh
Source identities and evidence
GNU container: ghcr.io/dafyddstephenson/roms_gfortran_build_env@sha256:461bc586f351f1b6f8121f910f0e35571f22fcdbfd2d6104b3c66d52684a6eea. Operator reported matching SHA-256 checks for seven integration evidence files and a separate timestep comparison file. Raw logs and checksum manifests remain on the operator VPS; they are not included here. Remote branch scopes were checked via GitHub; experiments have not been independently replayed.
Verification boundaries and next steps
UR-3 and Integration-002 benchmark PASS; Integration-001 exact benchmark FAIL. No acceptance tolerance has been adopted. The measured differences are at rounding scale, but causation and scientific acceptability require further investigation. History-output marker detection is not complete NetCDF content validation. Intel compatibility, other CI examples, individual timestep error magnitudes and physical validation remain open. Floating-point underflow and denormal notices were reported and remain uninvestigated.
UR-4 upstream submission is complete (PR #113); acceptance remains pending. Setup-copy failures, stale-artifact handling and cleanup after early exits remain outside the current correction. Preserve independent branches and investigate per-timestep diagnostic differences and seek maintainer guidance on numerical acceptance before UR-2 upstream submission.