summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMichael Fink <Michael.Fink@uibk.ac.at>2023-07-12 20:58:43 +0200
committerGitHub <noreply@github.com>2023-07-12 13:58:43 -0500
commitc8026c3c87efe86b87913463708f076516d59328 (patch)
tree8a3cf1bbd198bb7eba30a329af6be7c0838d6466 /lib
parentf895f80bc26a8441ea28736577dd23072872afae (diff)
downloadspack-c8026c3c87efe86b87913463708f076516d59328.tar.gz
spack-c8026c3c87efe86b87913463708f076516d59328.tar.bz2
spack-c8026c3c87efe86b87913463708f076516d59328.tar.xz
spack-c8026c3c87efe86b87913463708f076516d59328.zip
Add path to MPI executables to ^mpi dependents (#35758)
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/docs/module_file_support.rst10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/spack/docs/module_file_support.rst b/lib/spack/docs/module_file_support.rst
index 3d4e53915c..53f172accc 100644
--- a/lib/spack/docs/module_file_support.rst
+++ b/lib/spack/docs/module_file_support.rst
@@ -275,10 +275,12 @@ of the installed software. For instance, in the snippet below:
set:
BAR: 'bar'
# This anonymous spec selects any package that
- # depends on openmpi. The double colon at the
+ # depends on mpi. The double colon at the
# end clears the set of rules that matched so far.
- ^openmpi::
+ ^mpi::
environment:
+ prepend_path:
+ PATH: '{^mpi.prefix}/bin'
set:
BAR: 'baz'
# Selects any zlib package
@@ -293,7 +295,9 @@ of the installed software. For instance, in the snippet below:
- FOOBAR
you are instructing Spack to set the environment variable ``BAR=bar`` for every module,
-unless the associated spec satisfies ``^openmpi`` in which case ``BAR=baz``.
+unless the associated spec satisfies the abstract dependency ``^mpi`` in which case
+``BAR=baz``, and the directory containing the respective MPI executables is prepended
+to the ``PATH`` variable.
In addition in any spec that satisfies ``zlib`` the value ``foo`` will be
prepended to ``LD_LIBRARY_PATH`` and in any spec that satisfies ``zlib%gcc@4.8``
the variable ``FOOBAR`` will be unset.