Skip to content

Use shell scripts generated from config_machines.xml - #303

Merged
xylar merged 15 commits into
E3SM-Project:mainfrom
xylar:customize-generated-scripts
Oct 28, 2025
Merged

Use shell scripts generated from config_machines.xml#303
xylar merged 15 commits into
E3SM-Project:mainfrom
xylar:customize-generated-scripts

Conversation

@xylar

@xylar xylar commented Oct 2, 2025

Copy link
Copy Markdown
Collaborator

Rather than manually updating shell scripts for each machine, compiler and MPI library, we auto-generate them from config machines. The option remains to provide template scripts as before but these would be used to modify, rather than replace, the auto-generated version (with huge savings in maintenance burden). At the moment, this appears to only be needed for Perlmutter, where a small trick is needed to set $NERSC_HOST if it isn't defined.

The unneeded template scripts have been removed.

The unused yaml_template arguments to get_spack_script() and get_modules_env_vars_and_mpi_compilers() have been removed. This is an API breaking change and will mean the next version should be 2.0.0 (not 1.33.0).

The options modules_before and modules_after in the [spack] section of the config files have been removed and are no longer used. We never get modules from the YAML templates anymore, instead always getting them as part of the auto-generated scripts from config_machines.xml. The modules are always loaded after the spack environment. Three machines previously has modules_before = True: Compy, Dane and Ruby. I believe this was unused in Compy's case because the modules came from template scripts instead of the YAML files in any case. For Dane and Ruby, we will have to keep an eye on whether behavior changes unexpectedly in future E3SM-Unified testing.

Checklist

  • User's Guide has been updated if needed
  • Documentation builds cleanly and changes look as expected
  • Tests pass and new features are covered by tests
  • Testing comment, if appropriate, in the PR documents testing used to verify the changes

@xylar xylar mentioned this pull request Oct 2, 2025
27 tasks
Comment thread mache/spack/script.py Outdated
@xylar
xylar force-pushed the customize-generated-scripts branch from 969c899 to db32c1a Compare October 21, 2025 11:02
@xylar xylar self-assigned this Oct 24, 2025
@xylar xylar added the enhancement New feature or request label Oct 24, 2025
@xylar
xylar force-pushed the customize-generated-scripts branch from db32c1a to d04af42 Compare October 24, 2025 11:31
@xylar
xylar force-pushed the customize-generated-scripts branch from 7e5efa0 to 9b5a43f Compare October 24, 2025 11:42
@xylar

xylar commented Oct 24, 2025

Copy link
Copy Markdown
Collaborator Author

Testing

This branch has been used as part of #304 in deploying E3SM-Unified on various supported machines. Testing of spack dependency builds as well as packages such as MPAS-Analysis, zppy, e3sm_diags and zstash suggests that the auto-generated scripts are working as expected.

@xylar

xylar commented Oct 24, 2025

Copy link
Copy Markdown
Collaborator Author

@andrewdnolan, as soon as Aurora deployment has succeeded, could you review this so we can work our way to a 2.0.0 release candidate?

@andrewdnolan andrewdnolan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I've looked through and this all seems good to me.

Based on the testing as part of deploying e3sm-unified release candidates last week, I think this is ready to go.

@xylar

xylar commented Oct 28, 2025

Copy link
Copy Markdown
Collaborator Author

Thanks again, @andrewdnolan!

@xylar
xylar merged commit 6aa1cd0 into E3SM-Project:main Oct 28, 2025
5 checks passed
@xylar
xylar deleted the customize-generated-scripts branch October 28, 2025 09:09
@andrewdnolan andrewdnolan mentioned this pull request Nov 4, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants