-
Notifications
You must be signed in to change notification settings - Fork 211
change ModulesTool.load
to not prepend path to $MODULEPATH
if that path is already listed in $MODULEPATH
#4987
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
xdelaruelle
wants to merge
2
commits into
easybuilders:develop
Choose a base branch
from
xdelaruelle:envmodules_hmns_build
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
test/framework/easyconfigs/test_ecs/g/GCCcore/GCCcore-12.3.0.eb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# should be EB_GCC, but OK for testing purposes | ||
easyblock = 'EB_toy' | ||
|
||
name = "GCCcore" | ||
version = '12.3.0' | ||
|
||
homepage = 'http://gcc.gnu.org/' | ||
description = """The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, Java, and Ada, | ||
as well as libraries for these languages (libstdc++, libgcj,...).""" | ||
|
||
toolchain = SYSTEM | ||
|
||
source_urls = [ | ||
'http://ftpmirror.gnu.org/%(namelower)s/%(namelower)s-%(version)s', # GCC auto-resolving HTTP mirror | ||
] | ||
|
||
#gcc_name = 'GCC' | ||
|
||
sources = [ | ||
SOURCELOWER_TAR_BZ2, | ||
] | ||
|
||
moduleclass = 'compiler' |
19 changes: 19 additions & 0 deletions
19
test/framework/easyconfigs/test_ecs/g/GLib/GLib-2.77.1-GCCcore-12.3.0.eb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
easyblock = 'EB_toy' | ||
|
||
name = 'GLib' | ||
version = '2.77.1' | ||
|
||
homepage = 'https://www.gtk.org/' | ||
description = """GLib is one of the base libraries of the GTK+ project""" | ||
|
||
toolchain = {'name': 'GCCcore', 'version': '12.3.0'} | ||
|
||
source_urls = [FTPGNOME_SOURCE] | ||
sources = [SOURCELOWER_TAR_XZ] | ||
|
||
dependencies = [ | ||
('gettext', '0.21.1'), | ||
('util-linux', '2.39'), | ||
] | ||
|
||
moduleclass = 'vis' |
20 changes: 20 additions & 0 deletions
20
test/framework/easyconfigs/test_ecs/g/gettext/gettext-0.21.1-GCCcore-12.3.0.eb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
easyblock = 'EB_toy' | ||
|
||
name = 'gettext' | ||
version = '0.21.1' | ||
|
||
homepage = 'https://www.gnu.org/software/gettext/' | ||
description = """GNU 'gettext' is an important step for the GNU Translation Project, as it is an asset on which we may | ||
build many other steps. This package offers to programmers, translators, and even users, a well integrated set of tools | ||
and documentation""" | ||
|
||
toolchain = {'name': 'GCCcore', 'version': '12.3.0'} | ||
|
||
source_urls = [GNU_SOURCE] | ||
sources = [SOURCE_TAR_GZ] | ||
|
||
dependencies = [ | ||
('ncurses', '6.4'), | ||
] | ||
|
||
moduleclass = 'tools' |
19 changes: 19 additions & 0 deletions
19
test/framework/easyconfigs/test_ecs/n/ncurses/ncurses-6.4-GCCcore-12.3.0.eb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
easyblock = 'EB_toy' | ||
|
||
name = 'ncurses' | ||
version = '6.4' | ||
|
||
homepage = 'https://www.gnu.org/software/ncurses/' | ||
description = """ | ||
The Ncurses (new curses) library is a free software emulation of curses in | ||
System V Release 4.0, and more. It uses Terminfo format, supports pads and | ||
color and multiple highlights and forms characters and function-key mapping, | ||
and has all the other SYSV-curses enhancements over BSD Curses. | ||
""" | ||
|
||
toolchain = {'name': 'GCCcore', 'version': '12.3.0'} | ||
|
||
source_urls = [GNU_SOURCE] | ||
sources = [SOURCE_TAR_GZ] | ||
|
||
moduleclass = 'devel' |
19 changes: 19 additions & 0 deletions
19
test/framework/easyconfigs/test_ecs/u/util-linux/util-linux-2.39-GCCcore-12.3.0.eb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
easyblock = 'EB_toy' | ||
|
||
name = 'util-linux' | ||
version = '2.39' | ||
|
||
homepage = 'https://www.kernel.org/pub/linux/utils/util-linux' | ||
|
||
description = "Set of Linux utilities" | ||
|
||
toolchain = {'name': 'GCCcore', 'version': '12.3.0'} | ||
|
||
source_urls = ['%s/v%%(version_major_minor)s' % homepage] | ||
sources = [SOURCELOWER_TAR_GZ] | ||
|
||
dependencies = [ | ||
('ncurses', '6.4'), | ||
] | ||
|
||
moduleclass = 'tools' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
test/framework/modules/HierarchicalMNS/Compiler/GCCcore/12.3.0/GLib/2.77.1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#%Module | ||
proc ModulesHelp { } { | ||
puts stderr { | ||
|
||
Description | ||
=========== | ||
GLib is one of the base libraries of the GTK+ project | ||
|
||
|
||
More information | ||
================ | ||
- Homepage: https://www.gtk.org/ | ||
} | ||
} | ||
|
||
module-whatis {Description: GLib is one of the base libraries of the GTK+ project} | ||
module-whatis {Homepage: https://www.gtk.org/} | ||
module-whatis {URL: https://www.gtk.org/} | ||
|
||
set root /tmp/software/GLib/2.77.1-GCCcore-12.3.0 | ||
|
||
conflict GLib | ||
|
||
module load gettext/0.21.1 | ||
|
||
module load util-linux/2.39 | ||
|
||
setenv EBROOTGLIB "$root" | ||
setenv EBVERSIONGLIB "2.77.1" | ||
setenv EBDEVELGLIB "$root/easybuild/Compiler-GCCcore-12.3.0-GLib-2.77.1-easybuild-devel" | ||
|
||
# Built with EasyBuild version 5.1.2.dev0-r5819168038d7bd74810f38f75acfced9fb41870e |
34 changes: 34 additions & 0 deletions
34
test/framework/modules/HierarchicalMNS/Compiler/GCCcore/12.3.0/gettext/0.21.1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#%Module | ||
proc ModulesHelp { } { | ||
puts stderr { | ||
|
||
Description | ||
=========== | ||
GNU 'gettext' is an important step for the GNU Translation Project, as it is an asset on which we may | ||
build many other steps. This package offers to programmers, translators, and even users, a well integrated set of tools | ||
and documentation | ||
|
||
|
||
More information | ||
================ | ||
- Homepage: https://www.gnu.org/software/gettext/ | ||
} | ||
} | ||
|
||
module-whatis {Description: GNU 'gettext' is an important step for the GNU Translation Project, as it is an asset on which we may | ||
build many other steps. This package offers to programmers, translators, and even users, a well integrated set of tools | ||
and documentation} | ||
module-whatis {Homepage: https://www.gnu.org/software/gettext/} | ||
module-whatis {URL: https://www.gnu.org/software/gettext/} | ||
|
||
set root /tmp/software/gettext/0.21.1-GCCcore-12.3.0 | ||
|
||
conflict gettext | ||
|
||
module load ncurses/6.4 | ||
|
||
setenv EBROOTGETTEXT "$root" | ||
setenv EBVERSIONGETTEXT "0.21.1" | ||
setenv EBDEVELGETTEXT "$root/easybuild/Compiler-GCCcore-12.3.0-gettext-0.21.1-easybuild-devel" | ||
|
||
# Built with EasyBuild version 5.1.2.dev0-r5819168038d7bd74810f38f75acfced9fb41870e |
36 changes: 36 additions & 0 deletions
36
test/framework/modules/HierarchicalMNS/Compiler/GCCcore/12.3.0/ncurses/6.4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#%Module | ||
proc ModulesHelp { } { | ||
puts stderr { | ||
|
||
Description | ||
=========== | ||
The Ncurses (new curses) library is a free software emulation of curses in | ||
System V Release 4.0, and more. It uses Terminfo format, supports pads and | ||
color and multiple highlights and forms characters and function-key mapping, | ||
and has all the other SYSV-curses enhancements over BSD Curses. | ||
|
||
|
||
More information | ||
================ | ||
- Homepage: https://www.gnu.org/software/ncurses/ | ||
} | ||
} | ||
|
||
module-whatis {Description: | ||
The Ncurses (new curses) library is a free software emulation of curses in | ||
System V Release 4.0, and more. It uses Terminfo format, supports pads and | ||
color and multiple highlights and forms characters and function-key mapping, | ||
and has all the other SYSV-curses enhancements over BSD Curses. | ||
} | ||
module-whatis {Homepage: https://www.gnu.org/software/ncurses/} | ||
module-whatis {URL: https://www.gnu.org/software/ncurses/} | ||
|
||
set root /tmp/software/ncurses/6.4-GCCcore-12.3.0 | ||
|
||
conflict ncurses | ||
|
||
setenv EBROOTNCURSES "$root" | ||
setenv EBVERSIONNCURSES "6.4" | ||
setenv EBDEVELNCURSES "$root/easybuild/Compiler-GCCcore-12.3.0-ncurses-6.4-easybuild-devel" | ||
|
||
# Built with EasyBuild version 5.1.2.dev0-r5819168038d7bd74810f38f75acfced9fb41870e |
30 changes: 30 additions & 0 deletions
30
test/framework/modules/HierarchicalMNS/Compiler/GCCcore/12.3.0/util-linux/2.39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#%Module | ||
proc ModulesHelp { } { | ||
puts stderr { | ||
|
||
Description | ||
=========== | ||
Set of Linux utilities | ||
|
||
|
||
More information | ||
================ | ||
- Homepage: https://www.kernel.org/pub/linux/utils/util-linux | ||
} | ||
} | ||
|
||
module-whatis {Description: Set of Linux utilities} | ||
module-whatis {Homepage: https://www.kernel.org/pub/linux/utils/util-linux} | ||
module-whatis {URL: https://www.kernel.org/pub/linux/utils/util-linux} | ||
|
||
set root /tmp/software/util-linux/2.39-GCCcore-12.3.0 | ||
|
||
conflict util-linux | ||
|
||
module load ncurses/6.4 | ||
|
||
setenv EBROOTUTILMINLINUX "$root" | ||
setenv EBVERSIONUTILMINLINUX "2.39" | ||
setenv EBDEVELUTILMINLINUX "$root/easybuild/Compiler-GCCcore-12.3.0-util-linux-2.39-easybuild-devel" | ||
|
||
# Built with EasyBuild version 5.1.2.dev0-r5819168038d7bd74810f38f75acfced9fb41870e |
31 changes: 31 additions & 0 deletions
31
test/framework/modules/HierarchicalMNS/Core/GCCcore/12.3.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#%Module | ||
proc ModulesHelp { } { | ||
puts stderr { | ||
|
||
Description | ||
=========== | ||
The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, Java, and Ada, | ||
as well as libraries for these languages (libstdc++, libgcj,...). | ||
|
||
|
||
More information | ||
================ | ||
- Homepage: https://gcc.gnu.org/ | ||
} | ||
} | ||
|
||
module-whatis {Description: The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, Java, and Ada, | ||
as well as libraries for these languages (libstdc++, libgcj,...).} | ||
module-whatis {Homepage: https://gcc.gnu.org/} | ||
module-whatis {URL: https://gcc.gnu.org/} | ||
|
||
set root /tmp/software/GCCcore/12.3.0 | ||
|
||
conflict GCCcore | ||
module use /tmp/modules/all/Compiler/GCCcore/12.3.0 | ||
|
||
setenv EBROOTGCCCORE "$root" | ||
setenv EBVERSIONGCCCORE "12.3.0" | ||
setenv EBDEVELGCCCORE "$root/easybuild/Core-GCCcore-12.3.0-easybuild-devel" | ||
|
||
# Built with EasyBuild version 5.1.2.dev0-r5819168038d7bd74810f38f75acfced9fb41870e |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is potentially problematic I think...
Imagine that EasyBuild is configured to install modules into
/apps/modules/all
, and thateb
is launched in an environment in which$MODULEPATH
is set to/apps/manual-modules:/apps/modules/all
.In that case, we would expect that the modules that EasyBuild loads as dependencies for an installation come from
/apps/modules/all
, and would only be picked up from/apps/manual-modules
if the required module is not found in/apps/modules/all
.Or at least, that's the current behavior: giving precedence to modules that were (assumed to be) installed with EasyBuild.
This changes that, since the order in
$MODULEPATH
as it was before launching EasyBuild would be retained, and that may surprise people depending on their setup, since it's a change in behavior...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the situation you describe,
eb
is changingMODULEPATH
to make its modulepaths at the top.eb
does not go throughModuleTool.load()
to do that.I have made the following test:
Then looking at the produced log file for instrumented
ModuleTool.set_mod_paths()
:So my external modulepath is moved at the back by
eb
.