Skip to content

Changed default behavior for module generation#43

Open
jirudaya wants to merge 2 commits intoARCHER2-HPC:v1.0.2from
jirudaya:v1.0.2
Open

Changed default behavior for module generation#43
jirudaya wants to merge 2 commits intoARCHER2-HPC:v1.0.2from
jirudaya:v1.0.2

Conversation

@jirudaya
Copy link

@jirudaya jirudaya commented Feb 12, 2026

This is a similar change the PR for Cirrus-ex (EPCCed/cirrus-ex-spack#39) enabling users to create module files in their local spack environment.

Following is an example flow the users can follow:

module load other-software
module load spack
spack env create -d my_test_env
spack env activate my_test_env
spack add gromacs %gcc
spack install 
spack module lmod refresh --delete-tree -y
module use $SPACK_USER_CONFIG_PATH/share/spack/modules/Core
module load gromacs

By default the module files are created in $SPACK_USER_CONFIG_PATH/share/spack/modules/Core. To change this, the user can use the following command and create the module files again:

spack config add "modules:default:roots:lmod:<full_path_to_modulefiles>"
spack module lmod refresh --delete-tree -y

To verify the path:

spack config get modules | grep "lmod: "

Signed-off-by: jirudaya <j.irudayasamy@epcc.ed.ac.uk>
@jirudaya jirudaya changed the title feat(archer2-user-cfg): Changed default behaviors for module generation Changed default behavior for module generation Feb 12, 2026
- setting $env causes error when user install packages without an environment
- the default is changed to $user_cache_path to avoid this error

Signed-off-by: jirudaya <j.irudayasamy@epcc.ed.ac.uk>
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.

1 participant