Skip to content

Commit

Permalink
Merge PR #319 (Add benchmark scripts to scrape timing info)
Browse files Browse the repository at this point in the history
This merge brings PR #310 (Add benchmark scripts to scrape timing information
from log files, by @yantosca) into the GCPy 1.5.0 development stream.

This PR adds the functionality to produce timing tables of Ref & Dev
models from benchmark logfile output.

Signed-off-by: Bob Yantosca <[email protected]>
  • Loading branch information
yantosca committed May 13, 2024
2 parents f66e81e + e0bd4a7 commit 4be43b5
Show file tree
Hide file tree
Showing 13 changed files with 1,099 additions and 205 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Function `rename_speciesconc_to_speciesconcvv` in `gcpy/benchmark/modules/benchmark_utils.py`
- Function `copy_file_to_dir` in `gcpy/util.py`. This is a wrapper for `shutil.copyfile`.
- GitHub Action config file `.github/workflows/stale.yml`, which replaces StaleBot
- Example script `gcpy/examples/hemco/make_mask_file.py`
- Added `gcpy/community/format_hemco_data.py` from @hannahnesser
- Added `gcpy/examples/hemco/format_hemco_demo.py` from @hannahnesser
- Added HCl to `gcpy/benchmark/modules/emission_species.yml` and GTChlorine to `gcpy/benchmark/modules/emission_inventories.yml` for GEOS-Chem 14.4.0
- Example script `gcpy/examples/working_with_files/make_mask_file.py`
- Convenience function `replace_whitespace` in `gcpy/util.py`
- Benchmark script `gcpy/benchmark/modules/benchmark_scrape_gcclassic_timers.py`
- Benchmark script `gcpy/benchmark/modules/benchmark_scrape_gchp_timers.py`
- 1-year benchmark scripts now produce GCC vs GCC and GCHP vs GCHP timing tables
- Functions `gcc_vs_gcc_dirs`, `gchp_vs_gcc_dirs`, `gchp_vs_gchp_dirs`, and `get_log_filepaths` in `gcpy/benchmark/modules/benchmark_utils.py`

### Changed
- Bump pip from 23.2.1 to 23.3 (dependabot suggested this)
Expand All @@ -45,6 +50,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Create radionuclide, STE flux, and mass conservation tables for Ref and Dev versions in TransportTracers benchmarks
- Use new function `copy_file_to_dir` to copy the benchmark script and configuration file to the benchmark results folders
- Updated GitHub stalebot config file `stale.yml` with new issue/PR labels that should not go stale
- Updated benchmark driver scripts and config files to print GCClassic & GCHP timing information

### Fixed
- CS inquiry functions in `gcpy/cstools.py` now work properly for `xr.Dataset` and `xr.DataArray` objects
Expand Down
9 changes: 9 additions & 0 deletions gcpy/benchmark/cloud/template.1hr_benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,17 @@ data:
dir: ref-gcc/run-directory
outputs_subdir: OutputDir
restarts_subdir: Restarts
logs_subdir: .
logs_template: runlog.txt
bmk_start: "2019-07-01T00:00:00"
bmk_end: "2019-07-01T01:00:00"
gchp:
version: ${GEOSCHEM_BENCHMARK_REF_PRIMARY_KEY}
dir: ref-gchp/run-directory
outputs_subdir: OutputDir
restarts_subdir: Restarts
logs_subdir: .
logs_template: runlog.txt
bmk_start: "2019-07-01T00:00:00"
bmk_end: "2019-07-01T01:00:00"
is_pre_14.0: False
Expand All @@ -64,13 +68,17 @@ data:
dir: dev-gcc/run-directory
outputs_subdir: OutputDir
restarts_subdir: Restarts
logs_subdir: .
logs_template: runlog.txt
bmk_start: "2019-07-01T00:00:00"
bmk_end: "2019-07-01T01:00:00"
gchp:
version: ${GEOSCHEM_BENCHMARK_DEV_PRIMARY_KEY}
dir: dev-gchp/run-directory
outputs_subdir: OutputDir
restarts_subdir: Restarts
logs_subdir: .
logs_template: runlog.txt
bmk_start: "2019-07-01T00:00:00"
bmk_end: "2019-07-01T01:00:00"
is_pre_14.0: False
Expand Down Expand Up @@ -117,6 +125,7 @@ options:
ops_budget_table: False
OH_metrics: True
ste_table: True # GCC only
timing_table: True
summary_table: True
plot_options:
by_spc_cat: True
Expand Down
9 changes: 9 additions & 0 deletions gcpy/benchmark/cloud/template.1mo_benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,17 @@ data:
dir: ref-gcc/run-directory
outputs_subdir: OutputDir
restarts_subdir: Restarts
logs_subdir: .
logs_template: runlog.txt
bmk_start: "2019-07-01T00:00:00"
bmk_end: "2019-08-01T00:00:00"
gchp:
version: ${GEOSCHEM_BENCHMARK_REF_PRIMARY_KEY}
dir: ref-gchp/run-directory
outputs_subdir: OutputDir
restarts_subdir: Restarts
logs_subdir: .
logs_template: runlog.txt
bmk_start: "2019-07-01T00:00:00"
bmk_end: "2019-08-01T00:00:00"
is_pre_14.0: False
Expand All @@ -64,13 +68,17 @@ data:
dir: dev-gcc/run-directory
outputs_subdir: OutputDir
restarts_subdir: Restarts
logs_subdir: .
logs_template: runlog.txt
bmk_start: "2019-07-01T00:00:00"
bmk_end: "2019-08-01T00:00:00"
gchp:
version: ${GEOSCHEM_BENCHMARK_DEV_PRIMARY_KEY}
dir: dev-gchp/run-directory
outputs_subdir: OutputDir
restarts_subdir: Restarts
logs_subdir: .
logs_template: runlog.txt
bmk_start: "2019-07-01T00:00:00"
bmk_end: "2019-08-01T00:00:00"
is_pre_14.0: False
Expand Down Expand Up @@ -117,6 +125,7 @@ options:
ops_budget_table: False
OH_metrics: True
ste_table: True # GCC only
timing_table: True
summary_table: True
plot_options:
by_spc_cat: True
Expand Down
9 changes: 9 additions & 0 deletions gcpy/benchmark/config/1mo_benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,17 @@ data:
dir: GCC_ref
outputs_subdir: OutputDir
restarts_subdir: Restarts
logs_subdir: .
logs_template: "GC.log"
bmk_start: "2019-07-01T00:00:00"
bmk_end: "2019-08-01T00:00:00"
gchp:
version: GCHP_ref
dir: GCHP_ref
outputs_subdir: OutputDir
restarts_subdir: Restarts
logs_subdir: .
logs_template: "gchp.%Y%m%d_0000z.log"
bmk_start: "2019-07-01T00:00:00"
bmk_end: "2019-08-01T00:00:00"
is_pre_14.0: False
Expand All @@ -64,13 +68,17 @@ data:
dir: GCC_dev
outputs_subdir: OutputDir
restarts_subdir: Restarts
logs_subdir: .
logs_template: "GC.log"
bmk_start: "2019-07-01T00:00:00"
bmk_end: "2019-08-01T00:00:00"
gchp:
version: GCHP_dev
dir: GCHP_dev
outputs_subdir: OutputDir
restarts_subdir: Restarts
logs_subdir: Logs
logs_template: "gchp.%Y%m%d_0000z.log"
bmk_start: "2019-07-01T00:00:00"
bmk_end: "2019-08-01T00:00:00"
is_pre_14.0: False
Expand Down Expand Up @@ -117,6 +125,7 @@ options:
ops_budget_table: False
OH_metrics: True
ste_table: True # GCC only
timing_table: True
summary_table: True
plot_options:
by_spc_cat: True
Expand Down
9 changes: 9 additions & 0 deletions gcpy/benchmark/config/1yr_fullchem_benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,17 @@ data:
dir: GCC_ref
outputs_subdir: OutputDir
restarts_subdir: Restarts
logs_subdir: Logs
logs_template: "log.%Y%m%d"
bmk_start: "2019-01-01T00:00:00"
bmk_end: "2020-01-01T00:00:00"
gchp:
version: GCHP_ref
dir: GCHP_ref
outputs_subdir: OutputDir
restarts_subdir: Restarts
logs_subdir: Logs
logs_template: "gchp.%Y%m%d_0000z.log"
bmk_start: "2019-01-01T00:00:00"
bmk_end: "2020-01-01T00:00:00"
is_pre_14.0: False
Expand All @@ -76,13 +80,17 @@ data:
dir: GCC_dev
outputs_subdir: OutputDir
restarts_subdir: Restarts
logs_subdir: Logs
logs_template: "log.%Y%m%d"
bmk_start: "2019-01-01T00:00:00"
bmk_end: "2020-01-01T00:00:00"
gchp:
version: GCHP_dev
dir: GCHP_dev
outputs_subdir: OutputDir
restarts_subdir: Restarts
logs_subdir: Logs
logs_template: "gchp.%Y%m%d_0000z.log"
bmk_start: "2019-01-01T00:00:00"
bmk_end: "2020-01-01T00:00:00"
is_pre_14.0: False
Expand Down Expand Up @@ -130,6 +138,7 @@ options:
Ox_budget_table: True
ste_table: True # GCC only
OH_metrics: True
timing_table: True
plot_models_vs_obs: True
plot_options:
by_spc_cat: True
Expand Down
9 changes: 9 additions & 0 deletions gcpy/benchmark/config/1yr_tt_benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,17 @@ data:
dir: GCC_ref
outputs_subdir: OutputDir
restarts_subdir: Restarts
logs_subdir: Logs
logs_template: "log.%Y%m%d"
bmk_start: "2019-01-01T00:00:00"
bmk_end: "2020-01-01T00:00:00"
gchp:
version: GCHP_ref
dir: GCHP_ref
outputs_subdir: OutputDir
restarts_subdir: Restarts
logs_subdir: Logs
logs_template: "gchp.%Y%m%d_0000z.log"
bmk_start: "2019-01-01T00:00:00"
bmk_end: "2020-01-01T00:00:00"
is_pre_14.0: False
Expand All @@ -65,13 +69,17 @@ data:
dir: GCC_dev
outputs_subdir: OutputDir
restarts_subdir: Restarts
logs_subdir: Logs
logs_template: "log.%Y%m%d"
bmk_start: "2019-01-01T00:00:00"
bmk_end: "2020-01-01T00:00:00"
gchp:
version: GCHP_dev
dir: GCHP_dev
outputs_subdir: OutputDir
restarts_subdir: Restarts
logs_subdir: Logs
logs_template: "gchp.%Y%m%d_0000z.log"
bmk_start: "2019-01-01T00:00:00"
bmk_end: "2020-01-01T00:00:00"
is_pre_14.0: False
Expand Down Expand Up @@ -115,6 +123,7 @@ options:
mass_table: True
ste_table: True
cons_table: True
timing_table: False
#
# n_cores: Specify the number of cores to use.
# -1: Use $OMP_NUM_THREADS cores
Expand Down
Loading

0 comments on commit 4be43b5

Please sign in to comment.