You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to create a modulefile using lmod for a site-based spack deployment. I seem to have hit a snag and I'm trying to figure out the issue. I'm hoping you could help.
Before you get into it I'd just like to thank you for lmod and all the work done on it. It's a great piece of software and we really appreciate it's usage here @ NERSC.
Also I'm happy to help debug in any way (I'm doing this on Perlmutter, our production system) you think would be useful, including patches, experiments, etc. Don't hesitate to ask!
Thanks for any help and time you can offer on this!
Describe the bug
I created the a basic modulefile for spack that essentially only does one thing:
==> Error: `spack env activate` requires Spack's shell support. To set up shell support, run the command below for your shell. For bash/zsh/sh: . /global/common/software/nersc9/spack/0.23.0/share/spack/setup-env.sh For csh/tcsh: source /global/common/software/nersc9/spack/0.23.0/share/spack/setup-env.csh For fish: source /global/common/software/nersc9/spack/0.23.0/share/spack/setup-env.fish For Windows batch: /global/common/software/nersc9/spack/0.23.0/bin\spack_cmd.bat For PowerShell: /global/common/software/nersc9/spack/0.23.0/share/spack\setup-env.ps1 Or, if you do not want to use shell support, run one of these instead: eval `spack env activate --sh [...]` # bash/zsh/sh eval `spack env activate --csh [...]` # csh/tcsh eval `spack env activate --fish [...]` # fish eval `spack env activate --bat [...]` # batch eval `spack env activate --pwsh [...]` # powershell If you have already set up Spack's shell support but still receive
this message, please make sure to call Spack via the `spack`command
without any path components (such as `bin/spack`).
Expected behavior
If you were to source the file instead of using the modulefile, you would get the following output when you try to activate the spack environment:
These are not present when I source the script via source_sh in a modulefile. I'm not sure that is the culprit, but maybe a helpful tip?
Desktop (please complete the following information):
OS: Linux
Linux distribution: SUSE Linux Enterprise Server 15 SP4
Lmod Version: 8.7.31
Modules based on Lua: Version 8.7.31 2023-08-09 12:41 -05:00
by Robert McLay mclay@tacc.utexas.edu
Changes from Default Configuration
----------------------------------
Name Where Set Default Value
---- --------- ------- -----
LFS_VERSION D 1.6.3 1.8.0
LMOD_ADMIN_FILE E /opt/cray/pe/lmod/etc/admin.list /opt/nersc/pe/etc/lmod/admin.list
LMOD_AVAIL_STYLE E <system> grouped:system
LMOD_CASE_INDEPENDENT_SORTING E no yes
LMOD_IGNORE_CACHE E false yes
LMOD_MODULERCFILE E /opt/cray/pe/lmod/etc/rc /opt/nersc/pe/etc/lmod/modulerc.lua
LMOD_PACKAGE_PATH D nil /opt/nersc/pe/etc/lmod/sitepackages
LMOD_PAGER C less /usr/bin/less
LMOD_RC E /opt/nersc/pe/etc/lmod/lmodrc.lua
LMOD_SITEPACKAGE_LOCATION Other /opt/cray/pe/lmod/8.7.31/libexec/SitePackage.lua /opt/nersc/pe/etc/lmod/sitepackages/SitePackage.lua
LMOD_SITE_NAME E false NERSC
LMOD_SYSHOST E false perlmutter
LMOD_SYSTEM_DEFAULT_MODULES E __unknown__ craype-x86-milan:craype-network-ofi:perftools-base:xpmem:PrgEnv-gnu:cpe:gpu:sqs:darshan
LMOD_SYSTEM_NAME E false perlmutter
LMOD_TCLSH C tclsh /usr/bin/tclsh
MODULEPATH_ROOT E /opt/cray/pe/modulefiles
PATH_TO_LUA C lua /usr/bin/lua5.3
Where Set -> D: default, E: environment, C: configuration
lmod_cfg: lmod_config.lua SitePkg: SitePackage StdPkg: StandardPackage
Other: Set somewhere outside of normal locations
The text was updated successfully, but these errors were encountered:
Hello!
I'm trying to create a modulefile using
lmod
for a site-basedspack
deployment. I seem to have hit a snag and I'm trying to figure out the issue. I'm hoping you could help.Before you get into it I'd just like to thank you for
lmod
and all the work done on it. It's a great piece of software and we really appreciate it's usage here @ NERSC.Also I'm happy to help debug in any way (I'm doing this on Perlmutter, our production system) you think would be useful, including patches, experiments, etc. Don't hesitate to ask!
Thanks for any help and time you can offer on this!
Describe the bug
I created the a basic modulefile for
spack
that essentially only does one thing:This works great for most of the
spack
things with a littlespack
configuration tweaking!However, when I try to use
spack
environments, things don't seem to be working.To Reproduce
spack
to your system.spack.lua
that contains the following:spack
environment:spack
environment:Expected behavior
If you were to source the file instead of using the modulefile, you would get the following output when you try to activate the
spack
environment:So no output, but with the new prompt from the environment name. To deactivate you can do the following:
Something of note?
When I look at the environment when I source the shell script manually instead of via a modulefile, I see the two following entries:
These are not present when I source the script via
source_sh
in a modulefile. I'm not sure that is the culprit, but maybe a helpful tip?Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: