Skip to content

Feat drop ifort - #413

Closed
jmccreight wants to merge 2 commits into
DOI-USGS:developfrom
jmccreight:feat_drop_ifort
Closed

Feat drop ifort#413
jmccreight wants to merge 2 commits into
DOI-USGS:developfrom
jmccreight:feat_drop_ifort

Conversation

@jmccreight

Copy link
Copy Markdown
Collaborator
  • Closes #xxxx
  • Tests added
  • Performance benchmarks added
  • Performance regression benchmarks run
  • User visible changes (including notable bug fixes) are documented in whats-new.rst
  • New functions/methods are listed in api.rst or it's sub rsts?

Docs

Look for this PR number in our read-the-docs builds where you can browse on-line.

You can alternatively get a CI-build of the docs by entering the PR number for the ### in https://github.com/DOI-USGS/pywatershed/pull/###/checks then clicking on Documentation Build and finally looking for the documentation-html artifact which will download as a zip file.

jmccreight and others added 2 commits August 24, 2026 16:34
The feedstock PR DOI-USGS#14 upload landed (pyprms >=0.10.0 replaces
packaging <26.3), so the last packaging <26.3 pin anywhere is gone.
Move the item from Open to Done.
The PRMS binaries are no longer checked in to bin/. They are compiled
from prms_src/ with gfortran (supplied by environment.yml) the first
time they are needed, by pywatershed.utils.compile_prms(), which
ci.yaml, autotest/ci_local.sh, and the test-data fixtures all call.
That removes ~16 MB of binaries and the duplicate platform/binary-name
tables that autotest/utils.py and ci_local.sh each carried.

PRMS 5.2.1 did not build with the current conda toolchain. Its
mmf/read_params.c declares

    static char *open_parameter_file();

and then calls it with an argument. Under C23, the default since gcc
15, an empty parameter list means "takes no arguments", so that call is
a hard error; 5.2.1.1 only ever calls it with no argument, which is why
5.2.1 alone failed. The prms_src makelists now pass -std=gnu17 to gcc.
5.2.1 then builds to a native arm64 binary, roughly 4x faster than the
x86_64 one it replaces.

The retired mac binaries were x86_64 despite their "m1"/"apple_silicon"
names, so they ran under Rosetta 2, including on the macos-latest
runners. Apple Silicon binaries are now tagged mac_arm, and Intel MacOS
is no longer detected.

compile_prms() takes a file lock, because generate_test_data.py runs
pytest with -n=auto and workers would otherwise run "make clean" in the
same source tree while another was compiling. filelock is a test-only
dependency, so it is imported lazily.

GSFLOW binaries stay checked in: their source is not part of this
repository, so they cannot be compiled on demand. Retiring the last
ifort artifact among them is tracked in MAINTENANCE.md.

Three notebooks referenced the deleted binary by name and now call
get_or_compile_prms_exe(). Touching them made the pre-commit ruff hook
lint them (it passes .ipynb paths explicitly, which overrides
[tool.ruff] include, so `ruff check .` and CI never saw them), which
surfaced pre-existing errors in cells unrelated to this change: unused
imports, long lines, bare excepts, and a stray paren that made one cell
a syntax error. Those are fixed here too.

Verified on macOS arm64: hru_1 nhm (109 passed), hru_1 transp_frost,
and drb_2yr nhm (137 passed, exercising both 5.2.1 and 5.2.1.1), plus
on-demand compilation under 14 xdist workers.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@jmccreight

Copy link
Copy Markdown
Collaborator Author

superceeded by #414

@jmccreight jmccreight closed this Aug 26, 2026
jmccreight added a commit that referenced this pull request Aug 27, 2026
PRMSCanopy: gate grass rain interception on pkwater_ante (carries #413's ifort retirement)
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.

1 participant