Skip to content

Replace ccpp-prebuild and ccpp-capgen v0 with ccpp-capgen v1#762

Open
climbfuji wants to merge 75 commits into
developfrom
feature/capgen-v1
Open

Replace ccpp-prebuild and ccpp-capgen v0 with ccpp-capgen v1#762
climbfuji wants to merge 75 commits into
developfrom
feature/capgen-v1

Conversation

@climbfuji

@climbfuji climbfuji commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR replaces the two code generators ccpp-prebuild and ccpp-capgen (version 0) with the new, unified ccpp-capgen (version 1). It supports all host models (CAM-SIMA, CCPP-SCM, NEPTUNE, UFS) and combines the features from ccpp-capgen v0 with the performance and operational robustness of ccpp-prebuild.

This pull request will be updated continuously with links to updates of the CCPP technical documentation and additional information. See also #759 for background information and further materials.

User interface changes?: Yes (see documentation)

This feature branch feature/capgen-v1 will support the three ccpp-prebuild-based models CCPP-SCM, NEPTUNE, and UFS, which will transition to ccpp-capgen v1 before CAM-SIMA. Once CAM-SIMA transitions, this PR will be merged and feature/capgen-v1 will be locked.

Todo

  • The LLM-generated documentation and materials in doc/ need to be reviewed and used to update the existing CCPP technical documentation (https://github.com/ncar/ccpp-doc). Once that process is complete, we can remove or trim down the additional documentation in doc/.
  • The LLM-generated code should be reviewed file-by-file. LLMs are known for their verbosity, and we can likely remove or trim down sizeable part sof the code. Open question: Should we do the same for the unit tests?

Issues

To check/may not be implemented yet:

Testing

Python docstring tests, unit tests, end-to-end tests

Significantly expanded test coverage with Python docstring tests and 1500-ish unit tests (./unit-tests).

End-to-end tests cover:

  • Former ccpp-capgen v0 tests:
    • advection
    • advection_auto_clone (support legacy constituents auto-cloning from metadata)
    • capgen_ng
    • ddthost
    • nested_suite
    • var_compat
  • Former ccpp-prebuild tests:
    • chunked_data
    • blocked-data not supported in capgen v0 and capgen v1
    • opt_arg
  • Newly added features/tests:
    • multi-instances
    • multi-instances + constituents
    • suite_allocate (exercises suite-owned variables with various types of runtime-known dimensions)
    • constituents_dim (suite- and host-owned variables with dimensions from constituents objects)

CAM-SIMA

Python unit tests pass, system tests pass with Intel and GNU. The system tests are bit-for-bit identical with the reference baseline. Two tests fail that also fail on development.

Pull requests:

Status of pull requests: DRAFT

CCPP-SCM

All suites compile and all manual tests run (a sample of all permutations). CI testing/reproducibility: add info here

Pull requests:

Status of pull requests: UNDER REVIEW

NEPTUNE

All 500 tests compile and run. Results and performance are identical with the ccpp-prebuild code for regular (low-altitude), mid-altitude, and high-altitude physics.

Pull requests in NRL Enterprise GitHub cannot be referenced here.

Status of pull requests: UNDER REVIEW

UFS

ADD INFO AND LINKS TO PRS HERE

climbfuji added 30 commits May 13, 2026 06:40
…gen-ng: entire constituent state now per instance
climbfuji added 23 commits June 4, 2026 09:22
…on dimensions that are updated during the run
…ests for constituents dims and suite allocatable arrays
…constituent that defines the variable must provide a valid length
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment