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
Avoid compiler warning and compilation restart for KPP/fullchem/gckpp_Jacobian.F90 #1657
Conversation
KPP/fullchem/gckpp_Jacobian.F90 - Since the fullchem mechanism was rebuilt with KPP 3.0.0, a compiler warning is triggered that there are too many variables to keep track for certain debug information. We have added code to the CMakeLists.txt file in KPP/fullchem to disable this compilation feature when creating the "release" build with GNU Fortran. This should save compilation time, as when the warning is encountered, the compilatio of the KPP/fullchem code is restarted. Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
Compiling with make VERBOSE=1 shows that the proper flag ( ... etc not shown ...
-fdefault-real-8 -fdefault-double-8 -cpp -w -std=legacy -fautomatic -fno-align-commons -fconvert=big-endian
-fno-range-check -mcmodel=medium -fbacktrace -g -DLINUX_GFORTRAN -ffree-line-length-none -O3
-funroll-loops -fopenmp -fno-var-tracking-assignments
-c /local/ryantosca/GC/rundirs/epa-kpp/test_build/CodeDir/src/GEOS-Chem/KPP/fullchem/gckpp_Jacobian.F90
-o CMakeFiles/KPP.dir/gckpp_Jacobian.F90.o |
GEOS-Chem Classic integration tests all passed ==============================================================================
GEOS-Chem Classic: Execution Test Results
GCClassic #19bdf09 GEOS-Chem submod update: Merge PR #1643 and PR #1644 into 14.1.1
GEOS-Chem #6afa713f6 Avoid compiler warning and compilation restart for gckpp_Jacobian.F90
HEMCO #16541aa Update changelog for version release
Using 24 OpenMP threads
Number of execution tests: 26
Submitted as SLURM job: 42518927
==============================================================================
Execution tests:
------------------------------------------------------------------------------
gc_05x0625_NA_47L_merra2_CH4........................Execute Simulation....PASS
gc_05x0625_NA_47L_merra2_fullchem...................Execute Simulation....PASS
gc_4x5_47L_merra2_fullchem..........................Execute Simulation....PASS
gc_4x5_47L_merra2_fullchem_TOMAS15..................Execute Simulation....PASS
gc_4x5_47L_merra2_fullchem_TOMAS40..................Execute Simulation....PASS
gc_4x5_merra2_aerosol...............................Execute Simulation....PASS
gc_4x5_merra2_carbon................................Execute Simulation....PASS
gc_4x5_merra2_CH4...................................Execute Simulation....PASS
gc_4x5_merra2_CO2...................................Execute Simulation....PASS
gc_4x5_merra2_fullchem..............................Execute Simulation....PASS
gc_4x5_merra2_fullchem_aciduptake...................Execute Simulation....PASS
gc_4x5_merra2_fullchem_APM..........................Execute Simulation....PASS
gc_4x5_merra2_fullchem_benchmark....................Execute Simulation....PASS
gc_4x5_merra2_fullchem_complexSOA...................Execute Simulation....PASS
gc_4x5_merra2_fullchem_complexSOA_SVPOA.............Execute Simulation....PASS
gc_4x5_merra2_fullchem_LuoWd........................Execute Simulation....PASS
gc_4x5_merra2_fullchem_marinePOA....................Execute Simulation....PASS
gc_4x5_merra2_fullchem_RRTMG........................Execute Simulation....PASS
gc_4x5_merra2_Hg....................................Execute Simulation....PASS
gc_4x5_merra2_metals................................Execute Simulation....PASS
gc_4x5_merra2_POPs_BaP..............................Execute Simulation....PASS
gc_4x5_merra2_tagCH4................................Execute Simulation....PASS
gc_4x5_merra2_tagCO.................................Execute Simulation....PASS
gc_4x5_merra2_tagO3.................................Execute Simulation....PASS
gc_4x5_merra2_TransportTracers......................Execute Simulation....PASS
gc_4x5_merra2_TransportTracers_LuoWd................Execute Simulation....PASS
Summary of test results:
------------------------------------------------------------------------------
Execution tests passed: 26
Execution tests failed: 0
Execution tests not yet completed: 0
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% All execution tests passed! %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
run/GCHP/createRunDir.sh - The "Created ${rundir}" sentence was being printed out twice. This was causing issues in the GCHP integration tests because the "create_rundir" script in test/shared/commonFunctionsForTests.sh looks for this output to get the absolute path of the run directory. This was causing text replacement in the ./setCommonRunSettings.sh script not to be done correctly. Now fixed. Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
GCHP integration tests failed due to a bug in the |
KPP/fullchem/CMakeLists.txt
Outdated
@@ -61,3 +61,17 @@ target_compile_options(KPP | |||
$<$<STREQUAL:"${CMAKE_Fortran_COMPILER_ID}","Intel">:-r8> | |||
$<$<STREQUAL:"${CMAKE_Fortran_COMPILER_ID}","GNU">:-fdefault-real-8 -fdefault-double-8> | |||
) | |||
|
|||
# FOR GFORTRAN ONLY: Disable variable tracking for gckpp_Jacobian.F90 in the | |||
# KPP/fullchem mechanism generated with KPP 3.0.0. This will avoid a compiler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should remove the version number so that the text doesn't get outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @lizziel. I can do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a comment just as a suggestion. I tested this update out and my gfortran build no longer had the warning message.
GCHP execution tests all passed except tagO3. There is an outstanding issue in that simulation that we need to address, ==============================================================================
GCHP: Execution Test Results
GCClassic #646fce2 Fixed MAPL bug preventing restarting stretched grid simulations
GEOS-Chem #5cf1ae03a Remove duplicate "Created rundir" printout in run/GCHP/createRunDir.sh
HEMCO #cf7d4ed GEOS-only updates by Christoph Keller
Number of execution tests: 5
Submitted as SLURM job: 42707332
==============================================================================
Execution tests:
------------------------------------------------------------------------------
gchp_merra2_fullchem................................Execute Simulation....PASS
gchp_merra2_fullchem_benchmark......................Execute Simulation....PASS
gchp_merra2_fullchem_RRTMG..........................Execute Simulation....PASS
gchp_merra2_tagO3...................................Execute Simulation....FAIL
gchp_merra2_TransportTracers........................Execute Simulation....PASS
Summary of test results:
------------------------------------------------------------------------------
Execution tests passed: 4
Execution tests failed: 1
Execution tests not yet completed: 0 |
KPP/fullchem/CMakeLists.txt - Removed "3.0.0" from comment so as not to "peg" this modification to a specific version of KPP. CHANGELOG.md - Updated accordingly Signed-off-by: Bob Yantosca <yantosca@seas.harvard.edu>
When compiling the
KPP/fullchem
mechanism generated with KPP 3.0.0, we often get this compiler warning:This indicates that the compilation is being restarted because the optimizer cannot keep track of the number of variable definitions in
gckpp_Jacobian.F90
. This causes compilation to take longer.To avoid this, we have added code to the
KPP/fullchem/CMakeLists.txt
to prevent this compiler warning whenKPP/fullchem/gckpp_Jacobian.F90
is being compiled. The code is only activated when building theRelease
orRelWithDebugInfo
build types, as these options invoke the GNU Fortran optimizer, whereasDebug
does not.