geoschem / GCClassic

This repository contains the "superproject" wrapper for the "Classic" configuration of the GEOS-Chem model of atmospheric chemistry and composition.
https://geos-chem.readthedocs.io
Other
16 stars 36 forks source link

Throw a CMake error if FAST-JX is used for any KPP mechanism except Hg #62

Closed yantosca closed 4 months ago

yantosca commented 4 months ago

Name and Institution (Required)

Name: Bob Yantosca Institution: Harvard + GCST

Describe the update

This PR adds an error trap that causes CMake to throw an error if the FASTJX compile option is selected for any mechanism except Hg.

Expected changes

Configuring with the -DFASTJX=y option now throws an error message such as:

CMake Error: The source directory "/n/holyscratch01/jacob_lab/ryantosca/tests/nodiff/gc237x/test_fullchem" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
[holy8a24501 build]$ cmake ../CodeDir -DFASTJX=y
-- The Fortran compiler identification is GNU 10.2.0
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /n/sw/helmod-rocky8/apps/Core/gcc/10.2.0-fasrc01/bin/gfortran - skipped
=================================================================
GCClassic 14.4.1 (superproject wrapper)
Current status: 14.4.1-6-gdb89d20
=================================================================
-- Found NetCDF: /n/sw/helmod-rocky8/apps/MPI/gcc/10.2.0-fasrc01/openmpi/4.1.0-fasrc01/netcdf-fortran/4.5.3-fasrc01/lib/libnetcdff.so  
-- Useful CMake variables:
  + CMAKE_PREFIX_PATH:    /n/sw/helmod-rocky8/apps/MPI/gcc/10.2.0-fasrc01/openmpi/4.1.0-fasrc01/netcdf-c/4.8.0-fasrc01
  ...             /n/sw/helmod-rocky8/apps/MPI/gcc/10.2.0-fasrc01/openmpi/4.1.0-fasrc01/netcdf-fortran/4.5.3-fasrc01
  ...             /n/sw/helmod-rocky8/apps/MPI/gcc/10.2.0-fasrc01/openmpi/4.1.0-fasrc01/netcdf-c/4.8.0-fasrc01
  ...             /n/sw/helmod-rocky8/apps/MPI/gcc/10.2.0-fasrc01/openmpi/4.1.0-fasrc01/netcdf-fortran/4.5.3-fasrc01
  + CMAKE_BUILD_TYPE:     Release
-- Run directory setup:

-- Threading:
  * OMP:          ON  OFF
-- Found OpenMP_Fortran: -fopenmp (found version "4.5") 
-- Found OpenMP: TRUE (found version "4.5")  
-- 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
CMake Error at CMakeScripts/GC-ConfigureClassic.cmake:204 (message):
  FASTJX can only be used with the Hg mechanism!
Call Stack (most recent call first):
  CMakeLists.txt:226 (configureGCClassic)

-- Configuring incomplete, errors occurred!
See also "/n/holyscratch01/jacob_lab/ryantosca/tests/nodiff/gc237x/test_fullchem/build/CMakeFiles/CMakeOutput.log".

Related Github Issue

yantosca commented 4 months ago

Integration tests are in progress.

yantosca commented 4 months ago

All GEOS-Chem integration tests passed:

==============================================================================
GEOS-Chem Classic: Execution Test Results

GCClassic #655527d Merge PR #62 (Throw error if FAST-JX is used w/ non-Hg mechanisms)
GEOS-Chem #03287a67a Merge PR #2372 (Turn off MEGAN extension for non-benchmark sims)
HEMCO     #2192e0e HEMCO 3.9.1 release

Using 24 OpenMP threads
Number of execution tests: 28

Submitted as SLURM job: 39695010
==============================================================================

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%  All execution tests passed!  %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

All tests were identical to PR #2372 except:

yantosca commented 4 months ago

Thanks @lizziel. I can do that.