Access to installed software using Environment Modules¶
Applications, software, compilers, tools, communications libraries and math libraries of the cluster system are being keep up-to-date. Madhava HPC use the Environment Modules to dynamically set up environments for different applications. Module commands set, change, or delete environment variables that are needed for a particular application. The ‘module load‘ command will set PATH, LD_LIBRARY_PATH and other environment variables such that user may choose a desired version of applications or libraries more easily. More details can be found here. Finding out which modules (and hence which compilers, libraries and software) are available on the system is performed using the module avail command:
Module manipulation commands¶
Command | Description |
---|---|
module avail or ml avail | Show the available modules ready for loading |
module keyword [word1] [word2] | Search for available modules matching the keyword(s) |
module spider word | Show the details of any modules matching the keyword(s) |
module whatis [mod] or module help [mod] | Show description of a module |
module load [mod] or ml [mod] | Load the environment for the default version of the modulefile |
module load [modA] [modB] [modC] | Load the environment for the default version of modules named modA, modB and modC in corresponding order |
module load [mod]/[version] | Load the environment for the specified version of module |
module unload [mod] or module unload [modA] [modB] | Roll back configuration performed by the modulefile(s) |
module swap [modA] [modB] | Unload modulefile A and load modulefile B |
module list or ml | List any currently loaded module(s) |
module purge | Unload all modules currently loaded |
Info
As new versions of software get installed and others are deprecated, the default module version can change over time. It is best practice to note the specific module versions you are using for a project and load those explicitly, e.g. module load python3/3.8.9
not module load python
. This makes your work more reproducible and less likely to change unexpectedly in the future.
Module interoperability and dependency¶
When one module is in conflict with another (e.g different MPI libraries), the conflicting module may have to be unloaded before a desired one is loaded. Besides, some modules may depend on one another and hence they may be loaded/unloaded as a consequence of a subsequent module command in a dynamic fashion.