Repository navigation
Conversation
TYPE: text only KEYWORDS: license, Apache-2.0, contributor license, doc/licenses SOURCE: Yoel Sevi (Google) DESCRIPTION OF CHANGES: Problem: Following the contributor-license mechanism established in PR wrf-model#2242 (doc/licenses/fraunhofer_license.txt), Google-authored code blocks in subsequent performance pull requests need a standalone permissive license file under doc/licenses/ while leaving WRF's root LICENSE.txt unmodified. Solution: Add doc/licenses/google_license.txt containing the Apache License, Version 2.0 (Copyright 2026 Google LLC), referenced by `! THE FOLLOWING LINES OF CODE ARE LICENSED UNDER doc/licenses/google_license.txt` and `! END LICENSE` comment markers around Google-authored code blocks. If maintainers prefer lower inline marker density on PRs with interleaved edits, I am happy to explore a lighter per-routine notice option. License: Notwithstanding anything else to the contrary set out in https://github.com/wrf-model/WRF, the material here is being released under the Apache 2.0 licence at https://www.apache.org/licenses/LICENSE-2.0 (see doc/licenses/google_license.txt). ISSUE: None LIST OF MODIFIED FILES: A doc/licenses/google_license.txt TESTS CONDUCTED: 1. Documentation-only addition under doc/licenses/; zero source, build, or runtime changes. 2. Pending upstream Jenkins CI. RELEASE NOTE: Add doc/licenses/google_license.txt (Apache-2.0) for Google-contributed performance patches.
TYPE: enhancement KEYWORDS: dyn_em, RK3, tendency zeroing, IEVA, scalar advection, module_em SOURCE: Yoel Sevi (Google) DESCRIPTION OF CHANGES: Problem: On every Runge-Kutta substep in dyn_em/module_em.F: - rk_tendency zeroes five 3D *_save arrays read by physics only on rk_step == 1 before small_step_prep overwrites them. - rk_tendency and rk_scalar_tend call WW_SPLIT to copy 3D ww into wwE even when implicit vertical advection (IEVA) is disabled. - rk_scalar_tend zeroes 3D h_tendency/z_tendency on inactive substeps and runs full advection over scalar species that are identically zero across the tile and its +-4 stencil halo. Solution: - Guard *_save zeroing in rk_tendency (rk_step == 1) and h_tendency/z_tendency zeroing in rk_scalar_tend on active substeps, marking them INTENT(INOUT) so unoverwritten substeps conform to the Fortran standard. - Bypass inactive WW_SPLIT calls via a CONTIGUOUS pointer ww_ptr pointing directly to ww when ieva is false (and when MONOTONIC is inactive on rk_step == rk_order in rk_scalar_tend). - Skip all-zero non-QV species in rk_scalar_tend across rk_step = 1..rk_order when explicit advection orders 2..6 and .NOT. tenddec apply, checking scalar_old only on rk_step == rk_order across the +-4 stencil halo. License: Notwithstanding anything else to the contrary set out in https://github.com/wrf-model/WRF, the material here is being released under the Apache 2.0 licence at https://www.apache.org/licenses/LICENSE-2.0 (see doc/licenses/google_license.txt). ISSUE: None LIST OF MODIFIED FILES: M dyn_em/module_em.F TESTS CONDUCTED: 1. On gfortran 15.2.0 (x86-64 Linux), verified nm -u module_em.o has zero _gfortran_internal_pack temporaries and passed standalone r4 and -r8 tests under -fcheck=all and sNaN FPE traps (including sNaN scalar_old on rk_step = 1, 2, IEVA on/off, tenddec T/F, and zero/non-zero tracers) with max_abs_diff = 0.0. Earlier 16-rank x86-64 isolated runs read 2.2% to 3.2% less solver time on smaller regional, storm, nested, and Noah-MP/MYNN proxy domains, which is within the run-to-run spread of those short runs. Built and verified as part of the full optimization series on x86-64 Linux (gfortran 15.2.0, MPICH, 4-core VMs, 5 interleaved repeats across 5 em_real workflows) across Make (serial, dmpar r4 and -r8, dm+sm), CMake (dmpar), and -DWRF_CHEM=1 with 0 new compiler warnings and bit-for-bit identical wrf.exe outputs (diffwrf = 0 with gfortran on x86-64 without fused multiply-add). 2. Pending upstream Jenkins CI (including Intel and non-x86 compilers). RELEASE NOTE: Skip inactive RK3 tendency zeroing, WW_SPLIT copies, and zero-species advection calls in dyn_em/module_em.F.
Comment punctuation tweak inside an existing Google-licensed block; no code or numerical change. License: Notwithstanding anything else to the contrary set out in https://github.com/wrf-model/WRF, the material here is being released under the Apache 2.0 licence at https://www.apache.org/licenses/LICENSE-2.0 (see doc/licenses/google_license.txt).
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.
Skip inactive RK3 big-step tendency zeroing, WW_SPLIT, and zero species.
TYPE: enhancement
KEYWORDS: dyn_em, RK3, tendency zeroing, IEVA, scalar advection, module_em
SOURCE: Yoel Sevi (Google)
DESCRIPTION OF CHANGES:
Problem:
On every Runge-Kutta substep in dyn_em/module_em.F:
before small_step_prep overwrites them.
implicit vertical advection (IEVA) is disabled.
full advection over scalar species that are identically zero across the tile
and its +-4 stencil halo.
Solution:
zeroing in rk_scalar_tend on active substeps, marking them INTENT(INOUT) so
unoverwritten substeps conform to the Fortran standard.
directly to ww when ieva is false (and when MONOTONIC is inactive on
rk_step == rk_order in rk_scalar_tend).
when explicit advection orders 2..6 and .NOT. tenddec apply, checking
scalar_old only on rk_step == rk_order across the +-4 stencil halo.
License: Notwithstanding anything else to the contrary set out in https://github.com/wrf-model/WRF, the material here is being released under the Apache 2.0 licence at https://www.apache.org/licenses/LICENSE-2.0 (see doc/licenses/google_license.txt).
LIST OF MODIFIED FILES:
A doc/licenses/google_license.txt
M dyn_em/module_em.F
TESTS CONDUCTED:
_gfortran_internal_pack temporaries and passed standalone r4 and -r8 tests
under -fcheck=all and sNaN FPE traps (including sNaN scalar_old on
rk_step = 1, 2, IEVA on/off, tenddec T/F, and zero/non-zero tracers) with
max_abs_diff = 0.0. Earlier 16-rank x86-64 isolated runs read 2.2% to 3.2%
less solver time on smaller regional, storm, nested, and Noah-MP/MYNN proxy
domains, which is within the run-to-run spread of those short runs.
Built and verified as part of the full optimization series on x86-64 Linux
(gfortran 15.2.0, MPICH, 4-core VMs, 5 interleaved repeats across 5 em_real
workflows) across Make (serial, dmpar r4 and -r8, dm+sm), CMake (dmpar),
and -DWRF_CHEM=1 with 0 new compiler warnings and bit-for-bit identical
wrf.exe outputs (diffwrf = 0 with gfortran on x86-64 without fused
multiply-add).
RELEASE NOTE: Skip inactive RK3 tendency zeroing, WW_SPLIT copies, and zero-species advection calls in dyn_em/module_em.F.
Part of the modular CPU performance series; combined multi-workflow benchmarks, hardware/compiler setup, and per-PR summary table are in the Series Overview comment on PR 01 (#2470).
Prepared with AI assistance (Google Gemini).