Skip to content

feat(build): support Depends.OS.COMPILER (e.g. Depends.Darwin.gnu) in configure and Makefile - #5026

Open
johnpaulalex wants to merge 1 commit into
ESMCI:masterfrom
johnpaulalex:build/darwinize-depends
Open

feat(build): support Depends.OS.COMPILER (e.g. Depends.Darwin.gnu) in configure and Makefile#5026
johnpaulalex wants to merge 1 commit into
ESMCI:masterfrom
johnpaulalex:build/darwinize-depends

Conversation

@johnpaulalex

@johnpaulalex johnpaulalex commented Aug 12, 2026

Copy link
Copy Markdown

Description of changes

Enhances CIME's Depends file resolution to automatically detect and load OS-level Depends files (e.g., Depends.Darwin.gnu or Depends.Darwin):

  1. CIME/BuildTools/configure.py: Adds os_name as a required 5th positional argument to copy_depends_files so it checks for Depends.<OS>.<COMPILER> and Depends.<OS> in machines_dir and copies them to <CASEROOT>.
  2. CIME/case/case_setup.py: Passes os_ as the 5th positional argument during _create_macros_cmake.
  3. CIME/Tools/Makefile: Adds $(CASEROOT)/Depends.$(OS) and $(CASEROOT)/Depends.$(OS).$(COMPILER) to the Makefile -include list.

Specific notes

Contributors other than yourself, if any:

Linked issues addressed, if any:

  • None

Description of generative AI usage:

  • Google Antigravity was used to write the code and tests, followed by human-guided verification.

Answer Changes & Scientific Impact

  • Bit-for-Bit (B4B) with baseline master
  • Roundoff-level differences only
  • Expected Answer Changes (ECA)

User Interface & Namelist Changes

  • Namelist / Defaults modified? No
  • XML / Build script changes? Yes (CIME/BuildTools/configure.py, CIME/case/case_setup.py, CIME/Tools/Makefile)

Testing planned or performed, if any:

  • Executed python unit tests (python3 -m unittest CIME/tests/test_unit_case_setup.py).
  • Executed build and verified cmake macro compilation under debug configurations on macOS.

CTSM / CESM baseline hash-tag: 8961a1142
PR branch hash-tag: a24867cb2

Requirements before merge:

  • The code in this PR branch builds with no errors.
  • The code in this PR branch runs with no errors.
  • In-code documentation and Fortran docstrings updated.
  • This PR either (a) does not create a need to update documentation or (b) includes required documentation updates. Which?: (a) Build infrastructure modification; no documentation updates required.

@johnpaulalex
johnpaulalex force-pushed the build/darwinize-depends branch from 9d963f7 to a24867c Compare August 12, 2026 16:54
@billsacks
billsacks requested a review from fischer-ncar August 12, 2026 17:26
@billsacks

Copy link
Copy Markdown
Member

This seems like a very useful feature - thank you @johnpaulalex

@jgfouca / @jasonb5 - is this something in a code path that E3SM also uses? If so, can one of you review it?

@fischer-ncar I am tentatively assigning you as reviewer from the CESM side.

@jgfouca

jgfouca commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

@billsacks , we don't (and probably won't) use this feature. It should be harmless for you guys to add this though.

@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 37.16%. Comparing base (37d5018) to head (a24867c).
⚠️ Report is 192 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5026      +/-   ##
==========================================
+ Coverage   28.47%   37.16%   +8.69%     
==========================================
  Files         262      134     -128     
  Lines       38446    19629   -18817     
  Branches     8138     4161    -3977     
==========================================
- Hits        10948     7296    -3652     
+ Misses      26237    11503   -14734     
+ Partials     1261      830     -431     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

4 participants