Conversation
gcpy/benchmark/modules/benchmark_scrape_gchp_timers.py
- Now import ENCODING from gcpy.constants and use that instead of
the hardwired "utf-8" in open statements
- Added routine "check_file_for_timing_info", which tests if a text
file has GCHP timing info. If not it returns the file path to
"allPEs.log". This is necessary due to an update in behavior
in MAPL 2.59.
- In routine "read_one_text_file"
- Now call "check_file_for_timing_info"before reading the file.
- Strip out MAPL text that is usually placed into allPEs.log.
- Skip all lines between after the GCHPchem section until
the Summary section.
- Change the marker for the Summary section to "Report on process:"
(i.e. without a number).
- Changed the break-out-of-loop command for cloud benchmark log files
to "++", which occurs after the timers section. This is only for
MAPL versions prior to 2.59.
msulprizio
approved these changes
Dec 18, 2025
Contributor
msulprizio
left a comment
There was a problem hiding this comment.
Looks good. Thanks @yantosca!
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Describe the update
This PR fixes an issue caused by the update to MAPL v2.59 in GCHP 14.7..0 and later. MAPL v2.59 now sends the GCHP timers output to the
allPEs.logfile instead of the regular GCHP log file. This had caused the GCHP benchmark timing table to show up as blank when reading logs from simulations using MAPL v2.59:In this PR we have updated module
gcpy/benchmark/modules/benchmark_scrape_gchp_timers.py:Added a new function
check_file_for_timing_info. This checks if the input file has GCHP timing info (e.g. has a string such asTimes for component <GCHPchem>. If it finds timing info in the given input file, it will return the same file name it was given. If not, it will return the path toallPEs.login the same folder.Modified routine
read_one_text_fileto callcheck_file_for_timing_infoso as to be sure we are reading the file with GCHP timers output. Also modified the parsing to strip out prefixes (such as0000: MAPL.profiler: INFO:that are added by MAPL toallPEs.log) as each line is read in.Imported the
ENCODINGconstant fromgcpy.constants. This is used inopencommands instead of e.g. hardwiredencoding="utf-8".Expected changes
Module
gcpy/benchmark/modules/benchmark_scrape_gchp_timers.pywill now generate timing comparisons regardless of whether the GCHP timers output is in the log file or is inallPEs.log, such as: