Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake Chem and Chem+KPP Build #2018

Open
wants to merge 35 commits into
base: release-v4.6.1
Choose a base branch
from
Open

Conversation

islas
Copy link
Collaborator

@islas islas commented Mar 11, 2024

TYPE: enhancement

KEYWORDS: cmake, chem, kpp

SOURCE: internal

DESCRIPTION OF CHANGES:
Problem:
Current CMake build does not build chem or chem+kpp configurations

Solution:
Build kpp and associated tools, and cmake commands to facilitate simplified logic of the configure_wkc and compile_wkc scripts. As with all CMake builds, all auto-generated source code is placed in the out-of-source build directory.

Notable differences to make build :

  • Use of Bison instead of Yacc as it is more easily accessible for install and usage as well as backward compatible
  • Allow -j N parallel jobs to generate KPP sources up to a limit
  • Use KPP-generated source file original names (not renamed to module_kpp_*
  • Pass tuv_kpp a directory to locate where include file is to be generated, and allow control of file IO mode*
  • Allow integration decomp rewrite to specify file locations rather than hard-coded*
  • registry uses -DWRF_CHEM and -DWRF_KPP defines passed at command line instead of getenv() to match all other options*

*Affects make build in subtle ways but do not change user instructions

LIST OF MODIFIED FILES:
M CMakeLists.txt
M chem/CMakeLists.txt
A chem/KPP/CMakeLists.txt
M chem/KPP/compile_wkc
A chem/KPP/kpp/kpp-2.1/CMakeLists.txt
A chem/KPP/util/wkc/CMakeLists.txt
M chem/KPP/util/wkc/gen_kpp.c
M chem/KPP/util/wkc/protos_kpp.h
M chem/KPP/util/wkc/tuv_kpp.c
A chem/KPP/util/write_decomp/CMakeLists.txt
M chem/KPP/util/write_decomp/Makefile
M chem/KPP/util/write_decomp/integr_edit.c
M chem/chem_driver.F
M tools/CMakeLists.txt
M tools/data.h
M tools/registry.c

TESTS CONDUCTED:

  1. Reproduction of chem and chem+kpp regtests with cmake is possible now

RELEASE NOTE:
CMake Chem and Chem+KPP Build

@islas islas requested review from a team as code owners March 11, 2024 20:51
@weiwangncar
Copy link
Collaborator

The Jenkins test results:

Test Type              | Expected  | Received |  Failed
= = = = = = = = = = = = = = = = = = = = = = = =  = = = =
Number of Tests        : 23           24
Number of Builds       : 60           57
Number of Simulations  : 158           150        0
Number of Comparisons  : 95           86        0

Failed Simulations are: 
None
Which comparisons are not bit-for-bit: 
None

islas added 10 commits August 1, 2024 14:03
… value

This now mirrors the make build and allows the make build to supply
the WRF_CHEM and WRF_KPP option via defines/command line similar to
the make build. Likewise, while there are files that use
or
or any variation of this, these were never being used by the make build.
This may be a bug, but the priority of the cmake build is to acheive
parity with the make build in compile flags and overall effect.
@islas islas requested review from a team as code owners August 6, 2024 02:34
@islas islas changed the base branch from develop to release-v4.6.1 August 6, 2024 03:08
@islas
Copy link
Collaborator Author

islas commented Aug 6, 2024

Requires #2056, #2053, #2086, #2087, and #2088

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants