Skip to content

Commit

Permalink
Update Environment Modules installation doc
Browse files Browse the repository at this point in the history
Update installation guidelines to use latest Environment Modules
version.

Fixes #263
  • Loading branch information
xdelaruelle committed Sep 3, 2024
1 parent bbfa3ab commit ac99513
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 28 deletions.
2 changes: 1 addition & 1 deletion docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ Additional notes:
(`lua-posix`, `lua-filesystem`) to be available
* Tcl (`tclsh`) must also be available for Lmod to support module files in `Tcl` syntax
* a guide to installing Tcl/C environment modules without having root
permissions is available at [Installing environment modules without root permissions][installing_env_mod_c].
permissions is available at [Installing environment modules without root permissions][installing_env_mod].
* a guide to installing Lmod without having root permissions is available at
[Installing Lmod without root permissions][installing_lmod].

Expand Down
50 changes: 23 additions & 27 deletions docs/installing-environment-modules-without-root-permissions.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
# Installing environment modules without root permissions {: #installing_env_mod_c }
# Installing Environment Modules without root permissions {: #installing_env_mod }

This short guide will explain how to install the standard environment
modules Tcl/C software package without root permissions on a Linux or
This short guide will explain how to install the standard Environment
Modules software package without root permissions on a Linux or
Mac OS X system, together with Tcl on which it depends.

## Tcl

1. Go to <https://www.tcl-lang.org> and download the latest Tcl sources. At
the time of writing, the latest available Tcl version was 8.5.15,
the time of writing, the latest available Tcl version was 8.6.14,
which can be downloaded from
[here](https://prdownloads.sourceforge.net/tcl/tcl8.5.15-src.tar.gz).
The remainder of these commands will assume Tcl v8.5.15 is being
installed, you may need to adjust them accordingly. **Note**: Stick
to Tcl v8.5.x, don't consider using the more recent v8.6.x or
higher, since the environment modules package is not compatible with
those Tcl versions.
[here](https://prdownloads.sourceforge.net/tcl/tcl8.6.14-src.tar.gz).
The remainder of these commands will assume Tcl v8.6.14 is being
installed, you may need to adjust them accordingly.

1. Unpack the Tcl source tarball:

``` shell
tar xfvz tcl8.5.15-src.tar.gz
tar xfvz tcl8.6.14-src.tar.gz
```

1. Pick a location where you will install Tcl. It should be a directory
Expand All @@ -30,12 +27,12 @@ Mac OS X system, together with Tcl on which it depends.
the `configure` script using the `--prefix` option:

``` shell
cd tcl8.5.15/unix
cd tcl8.6.14/unix
./configure --prefix=$HOME/.local/Tcl
```

If you're building Tcl and environment modules on Mac, you should
run `configure` in the `tcl8.5.15/macosx` directory instead.
If you're building Tcl and Environment Modules on Mac, you should
run `configure` in the `tcl8.6.14/macosx` directory instead.
1. Next, build Tcl using the `make` command. If the system you are
building on has multiple cores, running make in parallel will speed
Expand All @@ -54,38 +51,37 @@ Mac OS X system, together with Tcl on which it depends.
make install
```
**All done!** Now you are ready to build the environment modules
**All done!** Now you are ready to build the Environment Modules
package, which requires Tcl.
## Environment Modules
1. Download the latest source tarball for the environment modules tools
1. Download the latest source tarball for the Environment Modules tools
from <https://modules.sourceforge.net>. At the time of writing, the
latest available version is 3.2.10 which can be downloaded [from
here](https://prdownloads.sourceforge.net/modules/modules-3.2.10.tar.gz).
latest available version is 5.4.0 which can be downloaded [from
here](https://prdownloads.sourceforge.net/modules/modules-5.4.0.tar.gz).
1. Unpack the downloaded source tarball:
``` shell
tar xfvz modules-3.2.10.tar.gz
tar xfvz modules-5.4.0.tar.gz
```
1. Configure the build, again use `--prefix` to specify where to
install the environment modules tool in the end. If you needed to
install the Environment Modules tool in the end. If you needed to
install Tcl by hand as outlined in the previous section, you'll also
need to specify where it was installed using the `--with-tcl`
option:

``` shell
cd modules-3.2.10
cd modules-5.4.0
./configure --prefix=$HOME/.local/environment-modules --with-tcl=$HOME/.local/Tcl/lib
```

1. Build with `make`, consider parallel build if your system is recent
enough:
1. Build with `make`:

``` shell
make -j 4
make
```

1. Install:
Expand All @@ -98,17 +94,17 @@ Alright, now just one more thing...

## Set up your environment

Because you've installed environment modules and Tcl in a non-default
Because you've installed Environment Modules and Tcl in a non-default
location, you need to make sure your environment is setup up correctly
to use them.
To make a long story short, these are the commands you need to execute:
``` shell
export PATH=$HOME/.local/environment-modules/Modules/3.2.10/bin:$PATH
export PATH=$HOME/.local/environment-modules/bin:$PATH
export LD_LIBRARY_PATH=$HOME/.local/Tcl/lib:$LD_LIBRARY_PATH
# adjust line below if you're using a shell other than bash, check with 'echo $SHELL'
source $HOME/.local/environment-modules/Modules/3.2.10/init/bash
source $HOME/.local/environment-modules/init/bash
```

!!! tip
Expand Down

0 comments on commit ac99513

Please sign in to comment.