-
Notifications
You must be signed in to change notification settings - Fork 35
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
Remove computational bottlenecks in hco_calc_mod.F90 #201
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
src/Core/hco_calc_mod.F90 - Remove ELSE blocks by use of "never-nesting" technique - Abstract reused code into subroutines - Collapse parallel DO loops - Add Dynamic scaling to DO loops where expedient Signed-off-by: Bob Yantosca <[email protected]>
src/Core/hco_calc_mod.F90 - Fixed incorrect function calls to Get_Value_From_DataCont - Added missing commas to arguments in Get_Value_From_DataCont - Renamed return value to dataVal in Get_Value_From_DataCont - Fixed incorrect data container names (BaseDct -> Dct) in Get_Value_From_DataCont Signed-off-by: Bob Yantosca <[email protected]>
src/Core/hco_calc_mod.F90 - In routine Get_Current_Emissions - Renamed LOC -> thisLoc - Added whitespace to function calls for better readability - Edited comments for clarity - Replaced placeholder error messages with actual error messages - Indented code to proper indentation levels - Trimmed trailing whitespace - In routine Get_Value_From_Datacont - Update comments and comment header - In routine Apply_Scale_Factor - Update comments and comment header - In routine Apply_Dilution_Factor - Update comments and comment header - Routine Get_Current_Emisisons_B - Now removed, this was not used
yantosca
added
the
topic: Performance
Related to HEMCO performance, parallelization, or memory issues
label
Mar 14, 2023
I forgot to mention that the above changes were shown to be zero-diff w/r/t 14.2.0-alpha.1: Using configuration file rst.yml
... Printing totals and differences
... Only showing variables with |absolute difference| > 0.0
Variable Ref=14.2.0-alpha.1 Dev=hco-cleanup Dev - Ref Integration tests are in progress. |
yantosca
added
topic: Structural Modifications
Related to HEMCO structural modifications (as opposed to scientific updates)
no-diff-to-benchmark
This update will have no impact on benchmark simulations
labels
Mar 14, 2023
CHANGELOG.md - Added a sentence about the removal of computational bottlenecks from hco_calc_mod.F90 (PR #201) Signed-off-by: Bob Yantosca <[email protected]>
The |
All GEOS-Chem Classic integration tests have passed: ==============================================================================
GEOS-Chem Classic: Execution Test Results
GCClassic #c9de6c9 Merge 14.1.1 into dev/14.2.0
GEOS-Chem #d104cebfe Merge 14.1.1 into dev/14.2.0
HEMCO #e5cf011 Further code cleanup in hco_calc_mod.F90
Using 24 OpenMP threads
Number of execution tests: 26
Submitted as SLURM job: 46051178
==============================================================================
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! %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
msulprizio
approved these changes
Apr 10, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
no-diff-to-benchmark
This update will have no impact on benchmark simulations
topic: Performance
Related to HEMCO performance, parallelization, or memory issues
topic: Structural Modifications
Related to HEMCO structural modifications (as opposed to scientific updates)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Name and Institution (Required)
Name: Bob Yantosca
Institution: Harvard + GCST
Confirm you have reviewed the following documentation
Describe the update
This PR improves the performance of routine
Get_Current_Emissions
insrc/Core/hco_calc_mod.F90
. We have refactored code to remove severalELSE
blocks following the "never-nesting" coding strategy (see this link for more info.We have also abstracted some code in
Get_Current_Emissions
into separate routines both for clarity and for improved computational efficiency.Expected changes
We have run profiling tests with TAU (Tuning and Analysis Utilities) on the GEOS-Chem carbon simulation using a single CH4 species. The reference simulation, based on 14.2.0-alpha.1, shows that the 2 parallel loops in
Get_Current_Emissions
are near the top of the list of routines taking the longest time to execute, taking about 22 seconds combined. (Seehco_calc_mod_MOD_get_current_emissions_omp_fn.0
andhco_calc_mod_MOD_get_current_emissions_omp_fn.1
in the table below.)With the updates contained in this PR, we have managed to cut this time down to about 7 seconds: