Skip to content

Bug fix for constituents e2e tests / add memory-sanitizer test in GH actions - #795

Merged
climbfuji merged 6 commits into
NCAR:feature/capgen-v1from
climbfuji:bugfix/multiinstance_constituents_host_consts
Nov 20, 2026
Merged

climbfuji merged 6 commits into
NCAR:feature/capgen-v1from
climbfuji:bugfix/multiinstance_constituents_host_consts

Conversation

@climbfuji

@climbfuji climbfuji commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Four additions, committed one after the other:

  1. Add memory-sanitizer end-to-end test to GitHub actions using gfortran-12. This test is expected to fail initially (fix in step 2) due to a bug in the multi-instance advection test setup. Commit e8134e6 (see below - end-to-end-test-asan fails).
  2. Fix the multi-instance advection test without changing the multi-instance constituents implementation in capgen v1. See Constituent registration aliases memory in both directions (host <-> framework; use-after-free bugs) #797 for a proposed change to the implementation in the future.
  3. Reverse the order of calling ccpp_deallocate_dynamic_constituents and ccpp_final in all tests that use constituents. With steps 2 and 3, the CI tests pass (commit 8f72632).
  4. Use the correct gfortran compiler in the job matrix in GitHub actions testing.

The changes in this pull request do not modify the current implementation of constituents in capgen v1. This work is deferred, see #797, section "Proposed solution". However, the bug fixes in this PR are required to unblock an update to LLVM 23.1.2 on one of NRL's HPCs.

Fixes #796
Working toward #797

Testing:

  • CI
  • Locally on the NRL HPC in question using LLVM 23.1.2 (see issue)

@climbfuji climbfuji self-assigned this Nov 3, 2026
!-----------------------------------------------------------------
! once and call ccpp_register_constituents per instance.
! host_consts must outlive the constituent tables, which keep
! pointers into it -- hence the deallocate after teardown.

@climbfuji climbfuji Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The deallocate is and remains at line 252.

…mentation fault detected on NRL's Atlantis system with LLVM 23.1.2
@climbfuji
climbfuji force-pushed the bugfix/multiinstance_constituents_host_consts branch from 065591e to 238475c Compare November 3, 2026 17:21
@climbfuji climbfuji changed the title Bug fix for multi-instance advection e2e test / add memory-sanitizer test in GH actions Bug fix for constituents e2e tests / add memory-sanitizer test in GH actions Nov 3, 2026
@climbfuji

Copy link
Copy Markdown
Collaborator Author

Any chance for a review from NOAA/DTC @dustinswales @scrasmussen? Thanks!

@climbfuji

Copy link
Copy Markdown
Collaborator Author

PR opened two weeks ago, reminder for reviews sent last week. Merging this with just @peverwhee's approval as agreed upon in the CCPP framework developer meetings a while back.

@climbfuji
climbfuji merged commit c2ea185 into NCAR:feature/capgen-v1 Nov 20, 2026
9 checks passed
@climbfuji
climbfuji deleted the bugfix/multiinstance_constituents_host_consts branch November 20, 2026 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

capgen bugs, requests, etc. that involve ccpp_capgen

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[capgen-v1] GitHub actions workflows always use gfortran-11

2 participants