You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the latest dev/no-diff-to-benchmark branch, I get the following error when attempting to build GCClassic with the carbon mechanism using the commands cmake ../CodeDir; cmake . -DMECH=carbon -DRUNDIR=..; make -j install:
[msulprizio@holy8a24301 build]$ cmake . -DRUNDIR=.. -DMECH=carbon
=================================================================
GCClassic 14.5.0 (superproject wrapper)
Current status: 14.5.0-22-gf866ce2.dirty
=================================================================
-- Useful CMake variables:
+ CMAKE_PREFIX_PATH: /n/sw/helmod-rocky8/apps/MPI/gcc/12.2.0-fasrc01/openmpi/4.1.4-fa src01/netcdf-c/4.9.2-fasrc01
... /n/sw/helmod-rocky8/apps/MPI/gcc/12.2.0-fasrc01/openmpi/4.1.4-fasrc01/ne tcdf-fortran/4.6.0-fasrc02
... /n/sw/helmod-rocky8/apps/MPI/gcc/12.2.0-fasrc01/openmpi/4.1.4-fasrc01/ne tcdf-c/4.9.2-fasrc01
... /n/sw/helmod-rocky8/apps/MPI/gcc/12.2.0-fasrc01/openmpi/4.1.4-fasrc01/ne tcdf-fortran/4.6.0-fasrc02
+ CMAKE_BUILD_TYPE: Release
-- Run directory setup:
+ RUNDIR: /n/home05/msulprizio/RD/TestCarbon/gc_4x5_merra2_carbon
-- Threading:
* OMP: ON OFF
-- General settings:
* MECH: fullchem carbon Hg custom
* USE_REAL8: ON OFF
* SANITIZE: ON OFF
-- Components:
* TOMAS: ON OFF
* TOMAS_BINS: NA 15 40
* APM: ON OFF
* RRTMG: ON OFF
* GTMM: ON OFF
* HCOSA: ON OFF
* LUO_WETDEP: ON OFF
* FASTJX: ON OFF
=================================================================
HEMCO 3.10.0
Current status: 3.10.0-2-gd00af43
=================================================================
=================================================================
HETP 1.0
=================================================================
=================================================================
Cloud-J 8.0.1
Current status: 8.0.1
=================================================================
=================================================================
GEOS-Chem 14.5.0 (science codebase)
Current status: 14.6.0-alpha.0-116-g0fcf8c4af.dirty
=================================================================
Creating /n/home05/msulprizio/RD/TestCarbon/gc_4x5_merra2_carbon/CodeDir/src/GEOS-Chem/Int erfaces/GCClassic/gc_classic_version.H
CMake Error at src/CMakeLists.txt:101 (install):
install TARGETS given target "kpp_standalone" which does not exist.
-- Configuring incomplete, errors occurred!
The issue appears to be in GCClassic/src/CMakeLists.txt at these lines
# Installation path is a GEOS-Chem run directory,
# Therefore we will install the executable there.
install(TARGETS ${EXE_FILE_NAME} RUNTIME DESTINATION ${INSTALL_PATH})
install(TARGETS ${KPPSA_FILE_NAME} RUNTIME DESTINATION ${INSTALL_PATH})
It appears that the first execution of cmake ../CodeDir adds kpp_standalone to TARGETS using:
#-----------------------------------------------------------------------------
# Define the KPP standalone executable:
# 1. Specify a cache variable with the default target name
# 2. Specify the location of the main program
# 3. Specify libraries that the main program depends on
# 4. Store the binary exectuable file in the bin folder (pre-install)
#
# At present build KPP standalone only for fullchem or custom mechanisms.
#-----------------------------------------------------------------------------
if("${MECH}" STREQUAL fullchem OR "${MECH}" STREQUAL custom)
set(KPPSA_FILE_NAME kpp_standalone CACHE STRING
"Default name for the KPP standalone executable file")
mark_as_advanced(KPPSA_FILE_NAME)
add_executable(${KPPSA_FILE_NAME}
GEOS-Chem/KPP/standalone/kpp_standalone.F90
)
target_link_libraries(${KPPSA_FILE_NAME}
PUBLIC
KPPStandalone
)
set_target_properties(${KPPSA_FILE_NAME}
PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
)
endif()
However, for the second execution of cmake passing -DMECH=carbon kpp_standalone is not defined and returns the above error.
NOTE: This was not caught by integration tests because they use one cmake command (i.e. cmake [path/to/code] -DMECH=carbon).
Note that if I use a single command for cmake I do not get the error:
$ cmake ../CodeDir -DMECH=carbon -DRUNDIR=..
Please attach any relevant configuration and log files.
No response
What GCClassic version were you using?
dev/no-diff-to-benchmark (14.5.1)
What environment were you running GCClassic on?
Local cluster
What compiler and version were you using?
gcc 12
Will you be addressing this bug yourself?
No
Additional information
While this issue can be avoided using a single cmake command, we should provide a fix for the case of multiple cmake commands. The GEOS-Chem ReadTheDocs does not explicitly tell users to pass all compile options to cmake in a single command.
This merge brings PR #79 (Fixed error in CMake logic that
attempted to build the KPP standalone for mechanisms other
than fullchem and custom, by @yantosca) into the GEOS-Chem
"no-diff-to-benchmark" development stream.
This PR fixes a build issue that can occur when the CMake
commands are given separately instead of as a single command.
See issue #78 for details.
Signed-off-by: Bob Yantosca <[email protected]>
Your name
Melissa Sulprizio
Your affiliation
Harvard
What happened? What did you expect to happen?
Using the latest
dev/no-diff-to-benchmark
branch, I get the following error when attempting to build GCClassic with the carbon mechanism using the commandscmake ../CodeDir; cmake . -DMECH=carbon -DRUNDIR=..; make -j install
:The issue appears to be in
GCClassic/src/CMakeLists.txt
at these linesIt appears that the first execution of
cmake ../CodeDir
addskpp_standalone
toTARGETS
using:However, for the second execution of
cmake
passing-DMECH=carbon
kpp_standalone is not defined and returns the above error.NOTE: This was not caught by integration tests because they use one cmake command (i.e.
cmake [path/to/code] -DMECH=carbon
).What are the steps to reproduce the bug?
To build I used:
Note that if I use a single command for cmake I do not get the error:
Please attach any relevant configuration and log files.
No response
What GCClassic version were you using?
dev/no-diff-to-benchmark (14.5.1)
What environment were you running GCClassic on?
Local cluster
What compiler and version were you using?
gcc 12
Will you be addressing this bug yourself?
No
Additional information
While this issue can be avoided using a single cmake command, we should provide a fix for the case of multiple cmake commands. The GEOS-Chem ReadTheDocs does not explicitly tell users to pass all compile options to cmake in a single command.
Tagging @yantosca
The text was updated successfully, but these errors were encountered: