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

Fixed error in CMake logic that attempted to build the KPP standalone for mechanisms other than fullchem and custom #79

Merged

Conversation

yantosca
Copy link
Contributor

@yantosca yantosca commented Dec 16, 2024

Name and Institution (Required)

Name: Bob Yantosca
Institution: Harvard + GCST

Describe the update

This PR fixes the error described by @msulprizio in #78. We have reworked the logic in the CMakeLists.txt to disable building the KPP standalone executable for simulations other than fullchem & custom, even if the CMake commands are given separately.

Expected changes:

These commands now configure GEOS-Chem Classic correctly:

cmake ../CodeDir
cmake . -DMECH=custom -DRUNDIR=..

Related Github Issue

src/CMakeLists.txt
- Defined the KPPSA_FILE_NAME variable for all mechanisms
- Call "add_executable(KPPSA_FILE_NAME ...) for all mechanisms
- Added an else block to disable the KPPSA_FILE_NAME executable
  from being built except for fullchem & custom mechanisms
- Wrapped the installation command for the KPPSA_FILE_NAME executable
  in an if block to ensure it is only built for fullchem & custom
  mechanisms.

CHANGELOG.md
- Updated accordingly

Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
@yantosca yantosca added topic: Build Related to CMake and/or the build sequence category: Bug Fix Fixes a bug that was previously reported labels Dec 16, 2024
@yantosca yantosca added this to the 14.5.1 milestone Dec 16, 2024
@yantosca yantosca requested a review from msulprizio December 16, 2024 16:48
@yantosca yantosca assigned msulprizio and yantosca and unassigned yantosca Dec 16, 2024
Copy link
Contributor

@msulprizio msulprizio left a comment

Choose a reason for hiding this comment

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

Thanks for this fix @yantosca. Looks good to merge. I also confirmed this fixes the error reported in #78.

@yantosca yantosca merged commit f9c3ea7 into dev/no-diff-to-benchmark Dec 16, 2024
4 checks passed
@yantosca yantosca deleted the feature/cmake-fix-for-kpp-standalone branch December 16, 2024 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: Bug Fix Fixes a bug that was previously reported topic: Build Related to CMake and/or the build sequence
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CMake error pertaining to kpp_standalone when compiling with MECH=carbon
2 participants