Description | Installation of Module Environment |
---|---|
Related-course materials | HPC Administration Module1 |
Authors | Ndomassi TANDO (ndomassi.tando@ird.fr) |
Creation Date | 20/09/2019 |
Last Modified Date | 20/09/2019 |
Summary
- Definition
- Installation
- Configuration
- Create a personal modulefile repository
- Create a module file
- Module commands
- Links
- License
Definition
URL: https://github.com/cea-hpc/modules
Environment Modules: provides dynamic modification of a user’s environment http://modules.sourceforge.net/
It allows the user to switch between several version of a program
Installation:
Configuration:
Activate the Modules at shell startup:
Enable Modules initialization at shell startup. An easy way to get module function defined and its associated configuration setup
at shell startup is to make the initialization scripts part of the system-wide environment setup in /etc/profile.d
. To do so, make a
link in this directory to the profile scripts that can be found in your Modules installation init directory:
Define module path to enable by default:
Edit /usr/local/modules-4.2.1/modulerc
configuration file.
Add there all the modulefile directories you want to activate by default at Modules initialization time.
Add one line mentioning each modulefile directory prefixed by the module use
command:
Define the modulefiles to load by default
Edit /usr/local/modules-4.2.1/modulerc
configuration file.
Add one line mentioning each modulefile to load prefixed by the module load
command:
Define a personal module file repository:
Each user can create his personal module file repository
create your own repository
Add the repository in your shell:
In your /home/user/.bashrc
, add the following line:
Define the module to launch at shell startup:
In your /home/user/.bash_profile
, add the following line:
Create a modulefile:
We are going to split the modulefiles in two categories:
system: corresponding to the system programs
bioinfo: corresponding to the bioinformatics programs
For each program you will have to create a directory with the name of the program and a modulefile with the version number.
For example, the bioinformatics software ncbi-blast v 2.4.0+ will have the modulefile 2.4.0+ according to this path:
Module file template
Modulefiles are written in tcl language.
Here is a example for the program program 1.0
### Example of modulefile:
Module commands:
See the available modules :
Obtain infos on a particular module:
Load a module :
List the loaded module :
Unload a module :
Unload all modules :
Links
- Related courses : HPC Trainings