Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update spack submodule from spack/develop as of 2024/01/26 #977

Merged

Conversation

climbfuji
Copy link
Collaborator

@climbfuji climbfuji commented Jan 29, 2024

Summary

Required updates in spack-stack for JCSDA/spack#401 (merge spack/develop as of 2024/01/26 into jcsda_emc_spack_stack). Unpin some package versions that we don't really care about (i.e. take the latest as long as it works for us).

Reviewers: Some core spack functionality changed that we use in our spack extension, therefore please take a close look at spack-ext/lib/*.

Testing

  • CI
  • Build complete spack-stack unified-dev environment on @climbfuji's macOS Monterey with [email protected] and [email protected]. Build and run a c12 GEOS-GCM test case!
  • Build JEDI-Skylab on @climbfuji's macOS Monterey with [email protected] and [email protected] and run small tests
  • Test on Discover Intel with GEOS and JEDI-Skylab
  • Test on Discover GNU with GEOS and JEDI-Skylab
    • GEOS doesn't run - presumably due to a too old GNU compiler? Issue recorded here: GEOS-GCM on Discover with GNU - segfault in yafyaml #985
    • Issues running skylab-trace-gas experiment unrelated to this PR (reported with spack-stack-1.6.0 since last week), other Skylab experiments tested ran fine
  • Test on AWS ParallelCluster GNU with GEOS and JEDI-Skylab
  • Test on AWS ParallelCluster Intel with GEOS and JEDI-Skylab
    • GEOS skipped because of known problems of running GEOS with Intel on AWS ParallelCluster
    • JEDI-Skylab works
  • Test on Gaea with UFS WM (@AlexanderRichert-NOAA)

Applications affected

All

Systems affected

Potentially all (although the changes are small) - but check in particular chained environments when using our spack stack create env --upstream functionality.

Dependencies

Issue(s) addressed

This is the last part of compiling JEDI+GEOS with spack-stack (i.e. not using Baselibs) on more than just Discover. This PR resolves https://github.com/JCSDA-internal/AOP23/issues/33.

It also closes #918, because the update of eccodes to version 2.33.0 is done in this PR (and the update from spack develop brings the new version to our fork).

Checklist

  • This PR addresses one issue/problem/enhancement, or has a very good reason for not doing so.
  • These changes have been tested on the affected systems and applications.
  • All dependency PRs/issues have been resolved and this PR can be merged.

@climbfuji climbfuji changed the title WIP Feature/update spack from dev 20240126 Update spack submodule from spack/develop as of 2024/01/26 Jan 31, 2024
@climbfuji climbfuji marked this pull request as ready for review January 31, 2024 18:53
Copy link
Collaborator Author

@climbfuji climbfuji left a comment

Choose a reason for hiding this comment

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

Self-review

configs/common/packages.yaml Outdated Show resolved Hide resolved
configs/common/packages.yaml Show resolved Hide resolved
configs/common/packages.yaml Outdated Show resolved Hide resolved
configs/common/packages.yaml Outdated Show resolved Hide resolved
@@ -271,7 +271,8 @@ def write(self):
os.makedirs(env_pkgs_path, exist_ok=False)
with open(os.path.join(env_repo_path, "repo.yaml"), "w") as f:
f.write("repo:\n namespace: envrepo")
repo_paths = spack.config.get("repos", scope=spack.config.default_list_scope())
# DH* ???
repo_paths = spack.config.get("repos", scope=None) # scope=spack.config.default_list_scope())
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think this works - need to test chained environments (use spack stack create env --upstream ...).

Copy link
Collaborator

Choose a reason for hiding this comment

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

This looks okay (remember to test with --modify-pkg option). Just using repo_paths = spack.config.get("repos") with no scope argument seems to give the right behavior when I tested it just now.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Then let me change it to that, thanks!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done in 05d44b4 - CI does test chained environments, so we will see.

.github/workflows/macos-ci-x86_64.yaml Outdated Show resolved Hide resolved
@@ -285,5 +285,3 @@ modules:
- PKG_CONFIG_PATH
lib64/pkgconfig:
- PKG_CONFIG_PATH
'':
- CMAKE_PREFIX_PATH
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was a duplicate, spack sets this variable automatically

@@ -284,5 +284,3 @@ modules:
- PKG_CONFIG_PATH
lib64/pkgconfig:
- PKG_CONFIG_PATH
'':
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ditto

Copy link
Collaborator

@srherbener srherbener left a comment

Choose a reason for hiding this comment

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

I am building unified-env on my arm64 based Mac, and when I ran the list of spack find commands, I got this in my site/packages.yaml file:

python:
     externals:
     - spec: [email protected]+bz2+crypt+ctypes+dbm+lzma+nis+pyexpat~pythoncmd+readline+sqlite3+ssl+t    ix+tkinter+uuid+zlib
       prefix: /usr

It didn't impact the python spec/requirement in that after concretizing spack decided to build [email protected] with no duplicates of the python spec. However, when I commented out the above section from the site/packages.yaml file, the spec for fms changed from 32-bit to 64-bit. Very strange, but I thought I would bring it to your attention in case it is of significance.

configs/common/packages.yaml Show resolved Hide resolved
@@ -249,7 +249,7 @@ Remember to activate the ``lua`` module environment and have MacTeX in your sear
# Check your clang version then add it to your site compiler config.
clang --version
spack config add "packages:all:compiler:[apple-clang@YOUR-VERSION]"
spack config add "packages:all:providers:mpi:[openmpi@4.1.6]"
spack config add "packages:all:providers:mpi:[openmpi@5.0.1]"
Copy link
Collaborator

Choose a reason for hiding this comment

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

This looks like a good update too. Perhaps this will help with the MacOS build issue #971?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

maybe

.github/workflows/macos-ci-x86_64.yaml Outdated Show resolved Hide resolved
@climbfuji
Copy link
Collaborator Author

I am building unified-env on my arm64 based Mac, and when I ran the list of spack find commands, I got this in my site/packages.yaml file:

python:
     externals:
     - spec: [email protected]+bz2+crypt+ctypes+dbm+lzma+nis+pyexpat~pythoncmd+readline+sqlite3+ssl+t    ix+tkinter+uuid+zlib
       prefix: /usr

It didn't impact the python spec/requirement in that after concretizing spack decided to build [email protected] with no duplicates of the python spec. However, when I commented out the above section from the site/packages.yaml file, the spec for fms changed from 32-bit to 64-bit. Very strange, but I thought I would bring it to your attention in case it is of significance.

We shouldn't be finding any external Python. If that's the case, then we need to exclude that from the spack external find command or ask spack external find to find explicitly listed packages only.

Regarding gettext, if you look further down in the CI script we still find it, but we need to use the full path to it on the Intel Macs. Otherwise, spack sanitizes the path because it thinks it is a system path. I think this only applies to the CI runner, though.

@climbfuji
Copy link
Collaborator Author

And as discussed yesterday, I've tested JEDI-Skylab with [email protected] extensively.

Copy link
Collaborator

@srherbener srherbener left a comment

Choose a reason for hiding this comment

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

Thanks for the quick responses. All looks good!

@climbfuji
Copy link
Collaborator Author

Thanks for the quick responses. All looks good!

Thanks for your review. I am going to add the --exclude python in the documentation and CI builds, because I am seeing external Python packages being found on new sites, too. Thanks for spotting that!

@climbfuji
Copy link
Collaborator Author

Thanks for the quick responses. All looks good!

Thanks for your review. I am going to add the --exclude python in the documentation and CI builds, because I am seeing external Python packages being found on new sites, too. Thanks for spotting that!

Done in 0ade34d

@climbfuji
Copy link
Collaborator Author

CI passed. I am going to merge this and then work on removing mysql from the default requirements on the HPCs and non-JCSDA user systems next.

@climbfuji climbfuji merged commit b7b36e0 into JCSDA:develop Feb 7, 2024
7 checks passed
@climbfuji climbfuji deleted the feature/update_spack_from_dev_20240126 branch February 7, 2024 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
INFRA JEDI Infrastructure
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Update eccodes to latest version 2.33.0
4 participants