Skip to content

New SPACK_BASE environment variable in Spack module#42

Open
welucas2 wants to merge 1 commit into
ARCHER2-HPC:v1.0.2from
welucas2:add-spack-base-env-var
Open

New SPACK_BASE environment variable in Spack module#42
welucas2 wants to merge 1 commit into
ARCHER2-HPC:v1.0.2from
welucas2:add-spack-base-env-var

Conversation

@welucas2

Copy link
Copy Markdown
Collaborator

While updating the documentation, Arno spotted that the given path to the ARCHER2 package repos didn't work. Using SPACK_ROOT, it would have needed

$SPACK_ROOT../repos/archer2/spack_repo/archer2

because SPACK_ROOT refers to the Spack installation itself, rather than our clone of archer2-spack which contains it.

I've fixed the module on ARCHER2 and the documentation to instead use a new environment variable SPACK_BASE which refers not to Spack itself but to that archer2-spack location, so users can now use the nicer

$SPACK_BASE/repos/archer2/spack_repo/archer2

If we ever need to work outside Lmod with anything else not in Spack itself but in our own configs, this also makes it that tiny bit easier to access it.

This PR makes the same change in the template modulefile, so any time that we automatically generate the modulefile from now on it will include the change to set SPACK_BASE.

@lucaparisi91 lucaparisi91 self-assigned this Mar 30, 2026
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