Skip to content

Conversation

@xylar
Copy link
Collaborator

@xylar xylar commented Oct 2, 2025

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 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
Copy link
Collaborator Author

xylar commented Oct 24, 2025

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
Copy link
Collaborator Author

xylar commented Oct 24, 2025

@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?

Copy link
Collaborator

@andrewdnolan andrewdnolan left a comment

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
Copy link
Collaborator Author

xylar commented Oct 28, 2025

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