geoschem / GCHP

The "superproject" wrapper repository for GCHP, the high-performance instance of the GEOS-Chem chemical-transport model.
https://gchp.readthedocs.io
Other
23 stars 27 forks source link

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

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:

%%% Arguments: -DFASTJX=y 
-- The Fortran compiler identification is GNU 10.2.0
-- The CXX compiler identification is GNU 10.2.0
-- The C 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
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /n/sw/helmod-rocky8/apps/Core/gcc/10.2.0-fasrc01/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /n/sw/helmod-rocky8/apps/Core/gcc/10.2.0-fasrc01/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- 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  
-- Found ESMF: /n/jacob_lab/Lab/RockyLinux/ESMF/ESMF_8_4_2/INSTALL_gnu10_openmpi4/include (found version "8.4.2") 
-- Found MPI_C: /n/sw/helmod-rocky8/apps/Comp/gcc/10.2.0-fasrc01/openmpi/4.1.0-fasrc01/lib64/libmpi.so (found version "3.1") 
-- Found MPI_CXX: /n/sw/helmod-rocky8/apps/Comp/gcc/10.2.0-fasrc01/openmpi/4.1.0-fasrc01/lib64/libmpi_cxx.so (found version "3.1") 
-- Found MPI_Fortran: /n/sw/helmod-rocky8/apps/Comp/gcc/10.2.0-fasrc01/openmpi/4.1.0-fasrc01/lib64/libmpi_usempif08.so (found version "3.1") 
-- Found MPI: TRUE (found version "3.1")  
-- Found Git: /usr/bin/git (found version "2.43.5") 
-- Performing Test C_FLAG_TEST_1
-- Performing Test C_FLAG_TEST_1 - Success
-- Performing Test CXX_FLAG_TEST_1
-- Performing Test CXX_FLAG_TEST_1 - Success
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of void*
-- Check size of void* - done
-- Check size of off_t
-- Check size of off_t - done
-- Performing Test FORTRAN_COMPILER_SUPPORTS_ASSUMED_TYPE
-- Performing Test FORTRAN_COMPILER_SUPPORTS_ASSUMED_TYPE: SUCCESS
-- Performing Test FORTRAN_COMPILER_SUPPORTS_FINDLOC
-- Performing Test FORTRAN_COMPILER_SUPPORTS_FINDLOC: SUCCESS
-- Found OpenMP_C: -fopenmp (found version "4.5") 
-- Found OpenMP_CXX: -fopenmp (found version "4.5") 
-- Found OpenMP_Fortran: -fopenmp (found version "4.5") 
-- Found OpenMP: TRUE (found version "4.5")  
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE  
-- Could NOT find MKL (missing: MKL_LIBRARIES MKL_INCLUDE_DIRS) 
-- Looking for Fortran sgemm
-- Looking for Fortran sgemm - not found
-- Looking for Fortran sgemm
-- Looking for Fortran sgemm - found
-- Found BLAS: /usr/lib64/libopenblas.so  
-- Looking for Fortran cheev
-- Looking for Fortran cheev - found
-- Found LAPACK: /usr/lib64/libopenblas.so;-pthread;-lm;-ldl  
-- Found ImageMagick: /usr/bin/convert (found version "6.9.12-93") 
-- Found LATEX: /usr/bin/latex   
-- Found LATEX: pdflatex   
-- Found UnixCommands: /usr/bin/bash  
-- I could not find the biber command.
-- I could not find the latex2html command.
-- Found MPI: TRUE (found version "3.1") found components: C CXX Fortran 
-- Performing Test _LOGICAL_DEFAULT_KIND: SUCCESS (value=4)
-- Performing Test _INT_DEFAULT_KIND: SUCCESS (value=4)
-- Performing Test _ISO_INT8: SUCCESS (value=1)
-- Performing Test _ISO_INT16: SUCCESS (value=2)
-- Performing Test _ISO_INT32: SUCCESS (value=4)
-- Performing Test _ISO_INT64: SUCCESS (value=8)
-- Performing Test _REAL_DEFAULT_KIND: SUCCESS (value=4)
-- Performing Test _DOUBLE_DEFAULT_KIND: SUCCESS (value=8)
-- Performing Test _ISO_REAL32: SUCCESS (value=4)
-- Performing Test _ISO_REAL64: SUCCESS (value=8)
-- Performing Test _ISO_REAL128: SUCCESS (value=16)
-- Using submodule /n/holyscratch01/jacob_lab/ryantosca/tests/nodiff/gc237x/gchp_test_fullchem/CodeDir/src/gFTL-shared/extern/gFTL
-- cpp is /n/sw/helmod-rocky8/apps/Core/gcc/10.2.0-fasrc01/bin/cpp
-- /n/holyscratch01/jacob_lab/ryantosca/tests/nodiff/gc237x/gchp_test_fullchem/CodeDir/src/yaFyaml
-- Performing Test SUPPORT_FOR_ASSUMED_TYPE
-- Performing Test SUPPORT_FOR_ASSUMED_TYPE: SUCCESS
-- Performing Test SUPPORT_FOR_C_LOC_ASSUMED_SIZE
-- Performing Test SUPPORT_FOR_C_LOC_ASSUMED_SIZE: FAILURE
-- Performing Test SUPPORT_FOR_MPI_ALLOC_MEM_CPTR
-- Performing Test SUPPORT_FOR_MPI_ALLOC_MEM_CPTR: SUCCESS
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- Building MAPL as STATIC libraries
-- Building with ExtData2G
-- Found MPI: TRUE (found version "3.1")  
-- Found HDF5: /n/sw/helmod-rocky8/apps/Comp/gcc/10.2.0-fasrc01/hdf5/1.10.7-fasrc01/lib/libhdf5.so;/n/sw/helmod-rocky8/apps/Core/szip/2.1.1-fasrc01/lib64/libsz.so;/n/sw/helmod-rocky8/apps/Core/zlib/1.2.11-fasrc01/lib/libz.so;/usr/lib64/libdl.so;/usr/lib64/libm.so (found version "1.10.7")  
-- Found Perl: /usr/bin/perl (found version "5.26.3") 
-- Could NOT find Python2 (missing: Python2_EXECUTABLE Interpreter) 
-- Could NOT find F2PY2 (missing: F2PY2_EXECUTABLE F2PY2_SUFFIX) 
-- Could NOT find Python2 (missing: Python2_EXECUTABLE Interpreter) 
-- Could NOT find F2PY2 (missing: F2PY2_EXECUTABLE F2PY2_SUFFIX) 
-- Could NOT find Python2 (missing: Python2_EXECUTABLE Interpreter) 
-- Could NOT find F2PY2 (missing: F2PY2_EXECUTABLE F2PY2_SUFFIX) 
-- Could NOT find Python2 (missing: Python2_EXECUTABLE Interpreter) 
-- Could NOT find F2PY2 (missing: F2PY2_EXECUTABLE F2PY2_SUFFIX) 
-- Settings:
=================================================================
Cloud-J 7.7.1
Current status: 7.7.1-19-g5eabcbe
=================================================================
=================================================================
HETP 1.0
=================================================================
=================================================================
HEMCO 3.9.1
Current status: 3.9.1
=================================================================
=================================================================
GEOS-Chem 14.4.1 (science codebase)
Current status: 14.4.1-16-g7e4001658
=================================================================
-- Settings:
  * MECH:         fullchem  carbon  custom
  * OMP:          ON  OFF
  * USE_REAL8:    ON  OFF
  * APM:          ON  OFF
  * TOMAS:        ON  OFF
  * RRTMG:        ON  OFF
  * GTMM:         ON  OFF
  * LUO_WETDEP:   ON  OFF
  * FASTJX:       ON  OFF
CMake Error at src/GCHP_GridComp/GEOSChem_GridComp/CMakeLists.txt:155 (message):
  FASTJX can only be used with the Hg mechanism!

-- Configuring incomplete, errors occurred!
See also "/n/holyscratch01/jacob_lab/ryantosca/tests/nodiff/gc237x/gchp_test_fullchem/build/CMakeFiles/CMakeOutput.log".
See also "/n/holyscratch01/jacob_lab/ryantosca/tests/nodiff/gc237x/gchp_test_fullchem/build/CMakeFiles/CMakeError.log".
%%% Failed configuration! %%%

Related Github Issue

yantosca commented 4 months ago

All GCHP integration tests passed:

==============================================================================
GCHP: Execution Test Results

GCHP      #8f8add6 Merge PR #426 (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     #

Number of execution tests: 11

Submitted as SLURM job: 39695708
==============================================================================

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

Also, all tests were zero-diff w/r/t PR https://github.com/geoschem/geos-chem/pull/2372.

lizziel commented 4 months ago

See review of https://github.com/geoschem/GCClassic/pull/62. I will review this PR once those comments are addressed.

yantosca commented 4 months ago

All GEOS-Chem Classic integration tests passed:

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

GCClassic #8c9d395 Updated CHANGELOG.md for clarity
GEOS-Chem #011885098 Change logic in FAST-JX error trap in gc_environment_mod.F90
HEMCO     #2192e0e HEMCO 3.9.1 release

Using 24 OpenMP threads
Number of execution tests: 28

Submitted as SLURM job: 40086888
==============================================================================

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

All tests were zero-diff with the previous PR #2372, except:

yantosca commented 4 months ago

All GCHP integration tests passed:

==============================================================================
GCHP: Execution Test Results

GCHP      #8f8add6 Merge PR #426 (Throw error if FAST-JX is used w/ non-Hg mechanisms)
GEOS-Chem #011885098 Change logic in FAST-JX error trap in gc_environment_mod.F90
HEMCO     #

Number of execution tests: 11

Submitted as SLURM job: 40087031
==============================================================================

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

All tests were zero-diff w/r/t the previous PR #2372.

yantosca commented 4 months ago

All GCHP integration tests passed:

==============================================================================
GCHP: Execution Test Results

GCHP      #8f8add6 Merge PR #426 (Throw error if FAST-JX is used w/ non-Hg mechanisms)
GEOS-Chem #011885098 Change logic in FAST-JX error trap in gc_environment_mod.F90
HEMCO     #

Number of execution tests: 11

Submitted as SLURM job: 40087031
==============================================================================

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

All tests were zero-diff w/r/t the previous PR #2372.