Skip to content

fix(ssp-batch): extents of at least one in the target data maps of the age sums (A100) - #144

Merged
elijahmathews merged 1 commit into
feat/hotpath-tour-operatorsfrom
fix/a100-reconcile
Nov 19, 2026
Merged

elijahmathews merged 1 commit into
feat/hotpath-tour-operatorsfrom
fix/a100-reconcile

Conversation

@elijahmathews

@elijahmathews elijahmathews commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

What

Verification of stack #112-#143 on an A100 (nvhpc 25.1, cc80, data-v4) against main (38d6e35). One defect found, fixed here; merge this after #143 (it is stacked on it).

Defect. On the A100 offload builds (FP64, FP32, FP32+cuBLAS), csp_batch, csp_batch_grad and c_batch_grad (and, in FP32, batch_equivalence) abort with variable in data clause is partially present on the device. CPU builds pass; main passes.

Cause. A set with no points, effective entries, segments or pieces (the groups of free isochrone modifications, #113) makes the age-sum scratch arrays zero-size. Under nvfortran 25.1 a zero-size array in a target data map(alloc:) leaves a stale present-table entry whose count is never released (it grows per call: 0+3, 0+63 in the reports). The next array that lands on that host address aborts. So the symptom moves with the allocator's layout (a test that passes at one commit fails at the next), which is why a bisect over the stack is not monotonic: the first failing PR head is #113 (a7bd9a5); #112 passes.

Fix. Extents of max(1, ...) for the set-dependent arrays of ssp_batch_age_sums_z and ssp_batch_age_sums_adjoint. No effect on the kernels' loop bounds.

Verification (A100, OMP_TARGET_OFFLOAD=MANDATORY)

  • Unit + regression suites, this branch: o64, o32, o32+cuBLAS: 70 OK, 0 failed, 1 skipped each. Tip of docs(hotpaths): the operator path in the tour #143 without the fix: 3-4 failures per offload build. CPU c64/c32 at the tip: 70 OK.
  • tools/compare_builds over param_cases.psv and stress_cases.psv, against CPU FP64: FP64 worst 4e-14 (pixels/mags), FP32 worst 5.9e-7 on spectra and magnitudes (indices up to 8e-6 absolute, values of order 100); only lib_mist_c3k fails (not in the data release). Identical FP32 numbers on main.
  • benchmark_csp_batch (FP32+cuBLAS), main vs this branch, min of 2-3 reps: forward N=1e4 5.35 vs 5.34 us/model; free IMF 30.6 vs 30.6; gradient 57.9 vs 57.0; free-IMF gradient 297 vs 297; FP64 forward N=1e4 7.84 vs 7.88. No regression.

🤖 Generated with Claude Code

…e age sums

A set with no points, effective entries, segments or pieces (the groups of free
isochrone modifications) made the age-sum scratch arrays zero-size. Under nvfortran 25.1
a zero-size array in a target data map(alloc:) leaves a stale present-table entry whose
count is never released; the next allocation on that host address then aborts with
'variable in data clause is partially present' (csp_batch, csp_batch_grad, c_batch_grad
and, in FP32, batch_equivalence on the A100). Clamp the extents with max(1, ...).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MXDRCtroonzsQBPSLzjyjz
@elijahmathews
elijahmathews added this pull request to stack #114 November 19, 2026 16:59
@codecov

codecov Bot commented Nov 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (feat/hotpath-tour-operators@1f66ab2). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/physics/opensps_ssp_batch.f90 0.00% 0 Missing and 5 partials ⚠️

❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (85.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@                      Coverage Diff                       @@
##             feat/hotpath-tour-operators     #144   +/-   ##
==============================================================
  Coverage                               ?   74.93%           
==============================================================
  Files                                  ?       51           
  Lines                                  ?    14481           
  Branches                               ?     6089           
==============================================================
  Hits                                   ?    10852           
  Misses                                 ?     1482           
  Partials                               ?     2147           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@elijahmathews
elijahmathews merged commit d71a83b into main Nov 19, 2026
28 of 30 checks passed
@elijahmathews
elijahmathews deleted the fix/a100-reconcile branch November 19, 2026 17:49
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