Skip to content

Default to the WRF output and rank settings measured in #89 - #92

Merged
aethr merged 2 commits into
mainfrom
wrf-performance
Oct 11, 2026
Merged

aethr merged 2 commits into
mainfrom
wrf-performance

Conversation

@aethr

@aethr aethr commented Oct 9, 2026

Copy link
Copy Markdown

Closes #89. Takes the four settings #89 measured to pay off and makes them the defaults, directly on main. It replaces #91, and leaves out #90's experiment-only environment variables (namelist overrides, extra mpirun arguments, quilting rank accounting), because the settings they tested either became defaults here or made no difference. Measured results are in #89 (comment).

Changes

Setting Where Measured effect (aust10km, c8id.16xlarge) Output
history_begin_h = num_hours_spin_up setup_for_wrf.py −16%: 144 fewer frames written byte-identical
use_netcdf_classic = .true. setup_for_wrf.py −33%: 8.7 s → 2.5 s per frame byte-identical
debug_level = 0 (was 100) setup_for_wrf.py; removed from every domains/*/namelist.wrf −7% of compute byte-identical
Ranks = physical cores safe_mpi_tasks(), new physical_cpu_count() −13% on top of the above rounding-level differences (see #89)

Together: wrf-run 8,125 s → 4,163 s.

Notes

  • Where the settings live: the three output settings are set when the namelist is generated rather than in the domain namelists, because they describe how we run wrf.exe, not the domain. history_begin_h follows the config's spin-up length.
  • Physical cores: physical_cpu_count() counts distinct (physical id, core id) pairs in /proc/cpuinfo. It falls back to os.cpu_count() where those fields are missing, as on aarch64, which has no SMT anyway. NCPUS still overrides the default.
  • Rank count by host: on the current 64-vCPU WrfStorageSpot hosts the default drops from 64 ranks to 32. A 96-vCPU host would get 48.
  • Classic output: this only affects the history frames wrf.exe writes. average_fields() still compresses the hourly WRFOUT files.

Testing

🤖 Generated with Claude Code

aethr added a commit that referenced this pull request Oct 9, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
aethr and others added 2 commits October 9, 2026 12:02
Measured on aust10km, together these take wrf-run from 2 h 15 min to
1 h 9 min:

- history_begin_h is set from the spin-up length, so wrf.exe no longer
  writes the spin-up output that cleanup deletes unread.
- use_netcdf_classic, so the 5-minute frames are not compressed on rank
  0 before being averaged and deleted.
- debug_level = 0, which drops the trace lines written on every halo
  exchange. debug_level = 100 comes out of the domain namelists: these
  describe how we run wrf.exe, not the domain, so all three are set when
  the namelist is generated.
- The default rank count is the number of physical cores, rather than
  every hardware thread.

The first three leave the hourly output byte-identical. The rank count
changes the decomposition, which changes the output at the level of
rounding, as moving between hosts already does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aethr
aethr merged commit 90a4476 into main Oct 11, 2026
7 checks passed
@aethr
aethr deleted the wrf-performance branch October 11, 2026 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

wrf.exe spends over half its run writing history output; cut that before sizing ranks

2 participants