summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Delaruelle <xavier.delaruelle@cea.fr>2023-03-23 07:49:17 +0100
committerGitHub <noreply@github.com>2023-03-23 07:49:17 +0100
commit47d710dc4dc091551b7d6bb559b0301e1e55db43 (patch)
tree9172682f50ed6ad54965f76f72d76344e3f04890
parent101c5b51bb6f9e05c4ac64a112326b806e76a966 (diff)
downloadspack-47d710dc4dc091551b7d6bb559b0301e1e55db43.tar.gz
spack-47d710dc4dc091551b7d6bb559b0301e1e55db43.tar.bz2
spack-47d710dc4dc091551b7d6bb559b0301e1e55db43.tar.xz
spack-47d710dc4dc091551b7d6bb559b0301e1e55db43.zip
modules tcl: switch default all:autoload from none to direct (#36269)
Since environment-modules has support for autoloading since 4.2, and Spack-builds of it enable it by default, use the same autoload default for tcl as lmod.
-rw-r--r--etc/spack/defaults/modules.yaml2
-rw-r--r--lib/spack/docs/module_file_support.rst11
2 files changed, 8 insertions, 5 deletions
diff --git a/etc/spack/defaults/modules.yaml b/etc/spack/defaults/modules.yaml
index 27450b4259..d53e05b2c8 100644
--- a/etc/spack/defaults/modules.yaml
+++ b/etc/spack/defaults/modules.yaml
@@ -46,7 +46,7 @@ modules:
tcl:
all:
- autoload: none
+ autoload: direct
# Default configurations if lmod is enabled
lmod:
diff --git a/lib/spack/docs/module_file_support.rst b/lib/spack/docs/module_file_support.rst
index f92583246f..216c4998b8 100644
--- a/lib/spack/docs/module_file_support.rst
+++ b/lib/spack/docs/module_file_support.rst
@@ -629,8 +629,9 @@ by its dependency; when the dependency is autoloaded, the executable will be in
PATH. Similarly for scripting languages such as Python, packages and their dependencies
have to be loaded together.
-Autoloading is enabled by default for Lmod, as it has great builtin support for through
-the ``depends_on`` function. For Environment Modules it is disabled by default.
+Autoloading is enabled by default for Lmod and Environment Modules. The former
+has builtin support for through the ``depends_on`` function. The latter uses
+``module load`` statement to load and track dependencies.
Autoloading can also be enabled conditionally:
@@ -654,8 +655,10 @@ The allowed values for the ``autoload`` statement are either ``none``,
In the ``tcl`` section of the configuration file it is possible to use
the ``prerequisites`` directive that accepts the same values as
``autoload``. It will produce module files that have a ``prereq``
- statement, which can be used to autoload dependencies in some versions
- of Environment Modules.
+ statement, which autoloads dependencies on Environment Modules when its
+ ``auto_handling`` configuration option is enabled. If Environment Modules
+ is installed with Spack, ``auto_handling`` is enabled by default starting
+ version 4.2. Otherwise it is enabled by default since version 5.0.
------------------------
Maintaining Module Files