summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorcitibeth <rpf2116@columbia.edu>2016-04-01 16:00:58 -0400
committercitibeth <rpf2116@columbia.edu>2016-04-01 16:00:58 -0400
commit459aab628d73c7f6f1d4eecbf64b34ca334e0ada (patch)
treec67505f3f53a8429ca30be6ff37e9c81a2792f22 /lib
parentcfd5e69b816eaca1a4d6d4467d5f1113fa0af407 (diff)
downloadspack-459aab628d73c7f6f1d4eecbf64b34ca334e0ada.tar.gz
spack-459aab628d73c7f6f1d4eecbf64b34ca334e0ada.tar.bz2
spack-459aab628d73c7f6f1d4eecbf64b34ca334e0ada.tar.xz
spack-459aab628d73c7f6f1d4eecbf64b34ca334e0ada.zip
Added documentation for installing Environment Modules with Spack.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/docs/basic_usage.rst28
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/spack/docs/basic_usage.rst b/lib/spack/docs/basic_usage.rst
index accf09cc2a..0727e12f6e 100644
--- a/lib/spack/docs/basic_usage.rst
+++ b/lib/spack/docs/basic_usage.rst
@@ -774,6 +774,34 @@ Environment modules
Spack provides some limited integration with environment module
systems to make it easier to use the packages it provides.
+
+Installing Environment Modules
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+In order to use Spack's generated environment modules, you must have
+installed the *Environment Modules* package. On many Linux
+distributions, this can be installed from the vendor's repository.
+For example: ```yum install environment-modules``
+(Fedora/RHEL/CentOS). If your Linux distribution does not have
+Environment Modules, you can get it with Spack:
+
+1. Install with::
+
+ spack install environment-modules
+
+2. Activate with::
+
+ MODULES_HOME=`spack location -i environment-modules`
+ MODULES_VERSION=`ls -1 $MODULES_HOME/Modules | head -1`
+ ${MODULES_HOME}/Modules/${MODULES_VERSION}/bin/add.modules
+
+This adds to your ``.bashrc`` (or similar) files, enabling Environment
+Modules when you log in. It will ask your permission before changing
+any files.
+
+Spack and Environment Modules
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
You can enable shell support by sourcing some files in the
``/share/spack`` directory.