Skip to content

Do not generate lmod modules for implicit spack installs - #131

Open
bartgol wants to merge 4 commits into
mainfrom
bartgol/busy-ritchie-7qxrot
Open

bartgol wants to merge 4 commits into
mainfrom
bartgol/busy-ritchie-7qxrot

Conversation

@bartgol

@bartgol bartgol commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Replace hide_implicits: true with exclude_implicits: true in the spack modules.yaml, so only the packages we explicitly install get an lmod module.

With hide_implicits, implicit dependencies (ncurses, readline, libedit, ...) still had modules, which were autoloaded and put spack's libraries on LD_LIBRARY_PATH, just hidden from ml. Spack's ncurses 6.6 then shadowed the system one, and system tools linked against the system ncurses crash, e.g. watch ls segfaults in the intel image. Spack binaries find their dependencies through RPATH, so those modules are not needed at runtime.

Also updates a Dockerfile comment that said implicit modules are hidden.

Things to check in CI, since this is untested:

  • ml lists only explicit packages (no (H) entries) and watch ls no longer crashes.
  • Smoke tests and the E3SM/Omega case builds still link. The most likely failure is something that relied on an implicit module's LIBRARY_PATH at link time (e.g. the bare -lz in MOAB's MOAB_PACKAGE_LIBS, see the comment in modules.yaml) or on Eigen being findable. The fix would be an include: entry in modules.yaml for the package that fails.

Generated by Claude Code

Loaded implicit modules put spack libraries (e.g. ncurses) on LD_LIBRARY_PATH
ahead of the system ones, which crashes system tools such as watch. Spack
binaries find their dependencies through RPATH, so they are not needed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019UTqLbGRYU1XZe4KojRT8p
Copilot AI balanced review requested due to automatic review settings November 18, 2026 03:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The module configuration removes the zlib provider’s LIBRARY_PATH, which MOAB’s explicit -lz flag needs at link time, potentially breaking the smoke-test link unless zlib and zlib-ng are preserved as include exceptions.

1 open issue
What changed in this PR

Stops generating Lmod modules for implicit Spack dependencies in GHCI
images to prevent their libraries from shadowing system libraries.

Changes:

  • Replaces hide_implicits with exclude_implicits in Spack configuration.
  • Updates comments to explain the exclusion and its purpose.
File Description
ghci/​env/​spack-configuration/​modules.yaml Excludes implicit dependency modules.
ghci/​env/​Dockerfile Updates a comment; no functional change.

Review effort: Balanced

bartgol and others added 3 commits November 18, 2026 18:49
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019UTqLbGRYU1XZe4KojRT8p
The apptainer .deb depends on libfuse3-3, which is not installable on
the runner image ubuntu-latest now points to.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019UTqLbGRYU1XZe4KojRT8p
@bartgol
bartgol requested a review from mahf708 November 18, 2026 23:52
@bartgol
bartgol enabled auto-merge November 18, 2026 23:52
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.

2 participants