Skip to content

Update config_machines.xml to upstream E3SM revision ec75ebef#419

Merged
xylar merged 4 commits intomainfrom
copilot/update-cime-machine-config-another-one
May 7, 2026
Merged

Update config_machines.xml to upstream E3SM revision ec75ebef#419
xylar merged 4 commits intomainfrom
copilot/update-cime-machine-config-another-one

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 7, 2026

Syncs mache/cime_machine_config/config_machines.xml with upstream E3SM commit ec75ebef661bf4c7ecf72bdcc1710eebdb257d43.

pm-cpu (affected machine):

  • Generic <modules> block split: craype-accel-host moved into a compiler="!nvidia" block (non-nvidia compilers only), while craype/2.7.35, cray-mpich/9.0.1, and cmake/3.30.2 remain in an unrestricted block
  • mache/spack/templates/pm-cpu_nvidia_mpich.yaml: removed craype-accel-host from the nvidia compiler's modules list to match the upstream change

Other upstream changes:

  • ghci-oci machine definition removed
  • Trailing whitespace cleaned in a few other machine sections

Bug fix in mache/spack/config_machines.py:

  • _matches_selector now supports CIME's negation syntax (e.g. compiler="!nvidia"). Previously, patterns beginning with ! were treated as literal regexes that never matched any compiler string, causing modules tagged compiler="!nvidia" to be silently excluded for all compilers (including intel, gnu, amdclang). The fix detects the leading ! and negates the regex match.
  • Added test_extract_machine_config_negation_selector in tests/test_spack_config_machines.py to cover the nvidia / !nvidia selector pair.

Checklist

  • User's Guide has been updated if needed
  • Developer's Guide has been updated if needed
  • API documentation lists any new or modified class, method, or function
  • Documentation builds cleanly and changes look as expected
  • Tests pass and new features are covered by tests
  • PR description includes a summary and any relevant issue references
  • Testing comment, if appropriate, in the PR documents testing used to verify the changes

Copilot AI linked an issue May 7, 2026 that may be closed by this pull request
…bdcc1710eebdb257d43

Affected machine: pm-cpu
- Add compiler="!nvidia" attribute to generic modules block
- Add separate nvidia-specific modules block

Also removes ghci-oci machine definition from upstream.

Agent-Logs-Url: https://github.com/E3SM-Project/mache/sessions/dc91e26c-df1b-480b-b52d-47c42275de4b

Co-authored-by: xylar <4179064+xylar@users.noreply.github.com>
Copilot AI changed the title [WIP] Update cime machine configuration due to upstream changes Update config_machines.xml to upstream E3SM revision ec75ebef May 7, 2026
Copilot finished work on behalf of xylar May 7, 2026 09:01
Copilot AI requested a review from xylar May 7, 2026 09:01
@xylar
Copy link
Copy Markdown
Collaborator

xylar commented May 7, 2026

@copilot, are changes likely to be needed to mache/spack/templates/pm-cpu_nvidia_mpich.yaml and mache/spack/templates/pm-cpu_nvidia_mpich.yaml as a result of the updates to mache/cime_machine_config/config_machines.xml?

The upstream config_machines.xml change moved craype-accel-host into a
compiler="!nvidia" block, meaning it should no longer be loaded for
the nvidia compiler on pm-cpu. Update the Spack template to match.

Agent-Logs-Url: https://github.com/E3SM-Project/mache/sessions/754cdfd0-1f19-4cdc-8e93-29b874b3f614

Co-authored-by: xylar <4179064+xylar@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 7, 2026

@copilot, are changes likely to be needed to mache/spack/templates/pm-cpu_nvidia_mpich.yaml and mache/spack/templates/pm-cpu_nvidia_mpich.yaml as a result of the updates to `mache/cime_machine_con...

Yes — the upstream config_machines.xml change moved craype-accel-host into a compiler="!nvidia" block, meaning it should no longer be loaded for the nvidia compiler on pm-cpu. pm-cpu_nvidia_mpich.yaml had craype-accel-host in the compiler's modules list, so I've removed it in commit 6235d0a.

Copilot finished work on behalf of xylar May 7, 2026 09:11
@xylar
Copy link
Copy Markdown
Collaborator

xylar commented May 7, 2026

@copilot, do the modules mache/spack/*.py already understand compiler="!nvidia" or is that something we need to add support for?

CIME uses compiler="!nvidia" to mean "all compilers except nvidia".
The previous regex-only implementation never matched any compiler for
negation patterns (since no compiler name begins with "!"), causing
modules tagged compiler="!nvidia" to be silently excluded for all
compilers.

Fix _matches_selector to detect the leading "!" and negate the match.
Add a test covering the nvidia / !nvidia selector pair.

Agent-Logs-Url: https://github.com/E3SM-Project/mache/sessions/b8451d98-ede3-41a4-a2a8-c4052408e879

Co-authored-by: xylar <4179064+xylar@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 7, 2026

@copilot, do the modules mache/spack/*.py already understand compiler="!nvidia" or is that something we need to add support for?

They did not — _matches_selector was using re.fullmatch(pattern, value) directly, so compiler="!nvidia" (a CIME negation pattern) was treated as a literal regex that never matches any compiler string. This meant modules tagged compiler="!nvidia" were silently excluded for all compilers, including intel and gnu.

I've fixed _matches_selector to detect the leading ! and negate the match (commit 792329d), and added a test covering the nvidia / !nvidia selector pair.

Copilot finished work on behalf of xylar May 7, 2026 09:17
@xylar xylar marked this pull request as ready for review May 7, 2026 09:18
Copy link
Copy Markdown
Collaborator

@xylar xylar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@xylar xylar merged commit f7c37a5 into main May 7, 2026
10 checks passed
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.

Daily config_machines drift detected

2 participants