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

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

Closed
wants to merge 7 commits into from

Conversation

yantosca
Copy link
Contributor

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 and others added 7 commits July 8, 2024 13:34
This commit informs the GCHP superproject about the following
commits that were pushed to the GitHub geoschem/geos-chem repository:

8554d3a30 Merge PR #2363 (Update setCommonRunSettings.sh.template)

This PR implements a hotfix for an issue where GCHP simulations always
"thought" that they were using mass fluxes regardless of the met field
option chosen.

Signed-off-by: Bob Yantosca <[email protected]>
This commit informs the GCHP superproject about the following
commits that were pushed to the GitHub geoschem/geos-chem repository:

f78052f59 Merge PR #2342 (Read number of levels with clouds into Cloud-J)

and to the geoschem/Cloud-J repository:

2d75997 Merge pull request #17 from geoschem/feature/set_levels_with_cloud_from_parent_model
8a3b925 Update .zenodo.json; add license badge to README
d93a5aa Add Zenodo file for DOI generation
42b31ea Update version and add release date for 7.7.1
c9cbe9a Update README.md

These PRs allow you to specify the number of levels with cloud for
Cloud-J.  This number is different depending on which instance of
GEOS-Chem you are using (GCClassic, GCHP, CESM, WRF-GC, etc).

Signed-off-by: Bob Yantosca <[email protected]>
This commit informs the GCHP superproject about the following
commits that were pushed to the GitHub geoschem/geos-chem repository:

5b3987feb Merge PR #2353 (Cloud-J error handling)

And to the geoschem/Cloud-J repository:

5eabcbe Merge pull request #19 from geoschem/feature/error_handling

These PRs return the error code from Cloud-J all the way out to the
main program, where the simulation can be terminated gracefully.

Signed-off-by: Bob Yantosca <[email protected]>
… fix)

hflux is horizontal flux regridding.

Signed-off-by: Lizzie Lundgren <[email protected]>
This commit informs the GCHP superproject about the following
commits that were pushed to the GitHub geoschem/geos-chem repository:

7e4001658 Merge PR #2369 (Fix several issues with satellite diagnostics)

This PR resolves several outstanding issues with the GEOS-Chem Classic
satellite diagnostics.

Signed-off-by: Bob Yantosca <[email protected]>
src/GCHP_GridComp/GEOSChem_GridComp/CMakeLists.txt
- Add an if block to throw a fatal error if the FASTJX compile option
  is selected for fullchem, custom, or carbon simulations.  Fullchem
  and custom mechanisms use Cloud-J.  We still need to use the FAST-JX
  photolysis scheme with Hg pending input file updates.

CHANGELOG.md
- Updated accordingly

Signed-off-by: Bob Yantosca <[email protected]>
@yantosca yantosca added category: Feature Request New feature or request topic: Build Related to makefiles or the build sequence labels Jul 12, 2024
@yantosca yantosca added this to the 14.4.2 milestone Jul 12, 2024
@yantosca yantosca self-assigned this Jul 12, 2024
@yantosca
Copy link
Contributor Author

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 geoschem/geos-chem#2372.

@yantosca yantosca requested a review from lizziel July 12, 2024 21:24
@lizziel
Copy link
Contributor

lizziel commented Jul 15, 2024

See review of geoschem/GCClassic#62. I will review this PR once those comments are addressed.

@yantosca
Copy link
Contributor Author

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:

  • TOMAS15 (parallelization error?)

@yantosca
Copy link
Contributor Author

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.

1 similar comment
@yantosca
Copy link
Contributor Author

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 added a commit that referenced this pull request Jul 16, 2024
This merge brings PR #426 (Throw a CMake error if FAST-JX is used for
any KPP mechanism except Hg, by @yantosca) into the GCClassic
"no-diff-to-benchmark" development stream.

This PR adds an error trap that should prevent users of fullchem and
custom simulations from selecting the FAST-JX compile time option.

Signed-off-by: Bob Yantosca <[email protected]>
@yantosca yantosca closed this Jul 16, 2024
@yantosca yantosca deleted the dev/disable-fastjx-for-fullchem branch July 16, 2024 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: Feature Request New feature or request topic: Build Related to makefiles or the build sequence
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants