Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Spack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eic_tools
Spack
Commits
617c1a37
Commit
617c1a37
authored
6 years ago
by
Michael Kuhn
Committed by
Massimiliano Culpo
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix shell integration with environment-modules@4 (#10736)
parent
4e809775
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/spack/spack/cmd/bootstrap.py
+1
-1
1 addition, 1 deletion
lib/spack/spack/cmd/bootstrap.py
share/spack/setup-env.sh
+10
-4
10 additions, 4 deletions
share/spack/setup-env.sh
with
11 additions
and
5 deletions
lib/spack/spack/cmd/bootstrap.py
+
1
−
1
View file @
617c1a37
...
...
@@ -46,7 +46,7 @@ def bootstrap(parser, args, **kwargs):
# Define requirement dictionary defining general specs which need
# to be satisfied, and the specs to install when the general spec
# isn't satisfied.
requirement_dict
=
{
'
environment-modules
'
:
'
environment-modules
@3.2.10
~X
'
}
requirement_dict
=
{
'
environment-modules
'
:
'
environment-modules~X
'
}
for
requirement
in
requirement_dict
:
installed_specs
=
spack
.
store
.
db
.
query
(
requirement
)
...
...
This diff is collapsed.
Click to expand it.
share/spack/setup-env.sh
+
10
−
4
View file @
617c1a37
...
...
@@ -272,10 +272,16 @@ if [ "${need_module}" = "yes" ]; then
# _sp_module_prefix is set by spack --print-sh-vars
if
[
"
${
_sp_module_prefix
}
"
!=
"not_installed"
]
;
then
#activate it!
export
MODULE_PREFIX
=
${
_sp_module_prefix
}
_spack_pathadd PATH
"
${
MODULE_PREFIX
}
/Modules/bin"
module
()
{
eval
`
${
MODULE_PREFIX
}
/Modules/bin/modulecmd
${
SPACK_SHELL
}
$*
`
;
}
# activate it!
# environment-modules@4: has a bin directory inside its prefix
MODULE_PREFIX_BIN
=
"
${
_sp_module_prefix
}
/bin"
if
[
!
-d
"
${
MODULE_PREFIX_BIN
}
"
]
;
then
# environment-modules@3 has a nested bin directory
MODULE_PREFIX_BIN
=
"
${
_sp_module_prefix
}
/Modules/bin"
fi
export
MODULE_PREFIX_BIN
_spack_pathadd PATH
"
${
MODULE_PREFIX_BIN
}
"
module
()
{
eval
`
${
MODULE_PREFIX_BIN
}
/modulecmd
${
SPACK_SHELL
}
$*
`
;
}
fi
;
else
eval
`
spack
--print-shell-vars
sh
`
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment