Introduction
This section contains details about the user application environment and how it can be controlled via the module command.
Module structure
Modules are organised by categories such as applications, compilers and libraries, with a number of applications and software packages in each category.
Available module classes | |
---|---|
base | Default module class |
bio | Bioinformatics, biology and biomedical |
cae | Computer Aided Engineering (incl. CFD) |
chem | Chemistry, Computational Chemistry and Quantum Chemistry |
compiler | Compilers |
data | Data management & processing tools |
debugger | Debuggers |
devel | Development tools |
geo | Earth Sciences |
ide | Integrated Development Environments (e.g. editors) |
lang | Languages and programming aids |
lib | General purpose libraries |
math | High-level mathematical software |
mpi | MPI stacks |
numlib | Numerical Libraries |
perf | Performance tools |
phys | Physics and physical systems simulations |
system | System utilities (e.g. highly depending on system OS and hardware) |
toolchain | EasyBuild toolchains |
tools | General purpose tools |
vis | Visualization, plotting, documentation and typesetting |
Working with modules
The name of each module is composed of three parts: i) the module class, ii) the name of the application, ii) the application version number and compiler toolchain used to build the application. For example the module name:
lang/Python/3.7.0-foss-2018b
refers to version 3.7.0 of the Python language interpreter, which has been built using version 2018b of the foss compiler toolchain.
This structure of modules allows us to support many permutations of application versions, built with different compiler versions and technologies. We can thus support new application versions, or optimised builds, without disruption to users who still require earlier editions.
Toolchains
EasyBuild employs so-called compiler toolchains or, toolchains for short, which are a major concept in handling the application build and installation processes.
A typical toolchain consists of one or more compilers (gcc, icc), usually coupled with a number of libraries for specific functionality (e.g., an MPI stack for distributed computing), or optimised routines for commonly used math operations (e.g., the well-known BLAS/LAPACK APIs for linear algebra routines).
The majority of software available on Viking uses one of two common toolchains, foss and intel:
toolchain | description |
---|---|
foss | The This toolchain consists of:
|
intel | The intel common compiler toolchain consists of the Intel compilers and libraries, i.e.:
|
module avail
Use the command module avail to list available modules.
$ module avail
---------- /usr/local/pkg/EasyBuild/config-files-york/modules/all/bio ----------
ABySS/2.0.2-foss-2018b ABySS/2.1.0-foss-2018b (D)
------- /usr/local/pkg/EasyBuild/config-files-york/modules/all/compiler --------
GCC/8.1.0-2.30 GCCcore/8.1.0
--------- /usr/local/pkg/EasyBuild/config-files-york/modules/all/data ----------
HDF5/1.8.20-foss-2018b
--------- /usr/local/pkg/EasyBuild/config-files-york/modules/all/devel ---------
Autoconf/2.69-foss-2018b M4/1.4.17
Autoconf/2.69-GCCcore-8.1.0 (D) M4/1.4.18-GCCcore-8.1.0
Automake/1.15-foss-2018b M4/1.4.18 (D)
Automake/1.16.1-GCCcore-8.1.0 (D) SQLite/3.24.0-GCCcore-8.1.0
Autotools/20150215-foss-2018b ncurses/6.0-foss-2018b
Autotools/20180311-GCCcore-8.1.0 (D) ncurses/6.0
Boost/1.66.0-foss-2018b ncurses/6.1-GCCcore-8.1.0 (D)
M4/1.4.17-foss-2018b sparsehash/2.0.3-foss-2018b
--------- /usr/local/pkg/EasyBuild/config-files-york/modules/all/lang ----------
Bison/3.0.4-GCCcore-8.1.0 flex/2.6.0
Bison/3.0.4 (D) flex/2.6.3-GCCcore-8.1.0
Python/2.7.15-foss-2018b flex/2.6.3
Python/3.6.1-foss-2018b flex/2.6.4-GCCcore-8.1.0
Python/3.7.0-foss-2018b (D) flex/2.6.4 (D)
Tcl/8.6.8-GCCcore-8.1.0
In the above example, we have two versions of the application ABySS (2.0.2, 2.1.0) built with the same foss toolchain.
The following example lists the available versions of Bison.
$ module avail Bison ------------ /usr/local/pkg/EasyBuild/config-files-york/modules/all ------------ lang/Bison/3.0.4-GCCcore-8.1.0 lang/Bison/3.0.4 (D) --------- /usr/local/pkg/EasyBuild/config-files-york/modules/all/lang ---------- Bison/3.0.4-GCCcore-8.1.0 Bison/3.0.4 (D) Where: D: Default Module Use "module spider" to find all possible modules. Use "module keyword key1 key2 ..." to search for all possible modules matching any of the "keys".
There are two versions of Bison in the lang module class which can be loaded. The default one (marked by '(D)') is the one built with the default toolchain. The other is built with version 8.1.0 of the GCC compiler suite.
module spider <module>
The module spider string command allows you to search for modules matching the string.
$ module spider bison ---------------------------------------------------------------------------- Bison: ---------------------------------------------------------------------------- Description: Bison is a general-purpose parser generator that converts an annotated context-free grammar into a deterministic LR or generalized LR (GLR) parser employing LALR(1) parser tables. Versions: Bison/3.0.4-GCCcore-8.1.0 Bison/3.0.4 ---------------------------------------------------------------------------- For detailed information about a specific "Bison" module (including how to load the modules) use the module's full name. For example: $ module spider Bison/3.0.4 ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- lang/Bison: ---------------------------------------------------------------------------- Description: Bison is a general-purpose parser generator that converts an annotated context-free grammar into a deterministic LR or generalized LR (GLR) parser employing LALR(1) parser tables. Versions: lang/Bison/3.0.4-GCCcore-8.1.0 lang/Bison/3.0.4 ---------------------------------------------------------------------------- For detailed information about a specific "lang/Bison" module (including how to load the modules) use the module's full name. For example: $ module spider lang/Bison/3.0.4 ----------------------------------------------------------------------------
module load
To load a module type module load <module name>. You can append a version number to load a specific instance of a package. Note the <tab> key can be used to complete the command.
$ module load lang/Bison <tab> <tab>
lang/Bison Bison/3.0.4-GCCcore-8.1.0
lang/Bison/3.0.4
$ module load lang/Bison
In this example we have the option of the default version of Bison, Bison built with eith the GCCcore or default toolchains. If no version is specified, then the default module is loaded.
$ module load lang/Bison/3.0.4 <tab> <tab>
lang/Bison/3.0.4 Bison/3.0.4-GCCcore-8.1.0
$ module load lang/Bison/3.0.4-GCCcore-8.1.0
$ module list
Currently Loaded Modules:
1) compiler/GCCcore/8.1.0 2) lang/Bison/3.0.4-GCCcore-8.1.0
Notice how the GCCcore compiler is loaded as Bison is dependent on this.
module list
To list currently loaded modules type module list
$ module list
Currently Loaded Modules:
1) lang/Bison/3.0.4
module purge
module purge unloads all loaded modules.
module unload
To unload a module use the module unload command
$ module unload lang/Bison/3.0.4-GCCcore-8.1.0
$ module list
Currently Loaded Modules:
1) compiler/GCCcore/8.1.0
Notice how the compiler toolchain is not unloaded.
Other useful commands
Command | Description |
---|---|
module whatis <module> | Gives a short description of the module |
module show <module> | Gives a long description of the module and displays what environment variables a module will modify |
module help <module> | Gives a long description of the module (e.g. website, license) |
Command syntax
$ module help
Usage: module [options] sub-command [args ...]
Options:
-h -? -H --help This help message
-s availStyle --style=availStyle Site controlled avail style: system
(default: system)
--regression_testing Lmod regression testing
-D Program tracing written to stderr
--debug=dbglvl Program tracing written to stderr
--pin_versions=pinVersions When doing a restore use specified version, do not follow defaults
-d --default List default modules only when used with avail
-q --quiet Do not print out warnings
--topic=topic help topics: modfuncs envvars
--expert Expert mode
-t --terse Write out in machine readable format for commands: list, avail, spider, savelist
--initial_load loading Lmod for first time in a user shell
--latest Load latest (ignore default)
--ignore_cache Treat the cache file(s) as out-of-date
--novice Turn off expert and quiet flag
--raw Print modulefile in raw output when used with show
-w twidth --width=twidth Use this as max term width
-v --version Print version info and quit
-r --regexp use regular expression match
--gitversion Dump git version in a machine readable way and quit
--dumpversion Dump version in a machine readable way and quit
--localvar=localvarA local variables needed to be set after this commands execution
--check_syntax --checkSyntax Checking module command syntax: do not load
--config Report Lmod Configuration
--mt Report Module Table State
--timer report run times
--force force removal of a sticky module or save an empty collection
--redirect Send the output of list, avail, spider to stdout (not stderr)
--no_redirect Force output of list, avail and spider to stderr
--show_hidden Avail and spider will report hidden modules
--spider_timeout=timeout a timeout for spider
module [options] sub-command [args ...]
Help sub-commands:
------------------
help prints this message
help module [...] print help message from module(s)
Loading/Unloading sub-commands:
-------------------------------
load | add module [...] load module(s)
try-load | try-add module [...] Add module(s), do not complain if not found
del | unload module [...] Remove module(s), do not complain if not found
swap | sw | switch m1 m2 unload m1 and load m2
purge unload all modules
refresh reload aliases from current list of
modules.
update reload all currently loaded modules.
Listing / Searching sub-commands:
---------------------------------
list List loaded modules
list s1 s2 ... List loaded modules that match the pattern
avail | av List available modules
avail | av string List available modules that contain "string".
spider List all possible modules
spider module List all possible version of that module file
spider string List all module that contain the "string".
spider name/version Detailed information about that version of the module.
whatis module Print whatis information about module
keyword | key string Search all name and whatis that contain "string".
Searching with Lmod:
--------------------
All searching (spider, list, avail, keyword) support regular expressions:
spider -r '^p' Finds all the modules that start with `p' or `P'
spider -r mpi Finds all modules that have "mpi" in their name.
spider -r 'mpi$ Finds all modules that end with "mpi" in their name.
Handling a collection of modules:
--------------------------------
save | s Save the current list of modules to a user defined "default" collection.
save | s name Save the current list of modules to "name" collection.
reset The same as "restore system"
restore | r Restore modules from the user's "default" or system default.
restore | r name Restore modules from "name" collection.
restore system Restore module state to system defaults.
savelist List of saved collections.
describe | mcc name Describe the contents of a module collection.
Deprecated commands:
--------------------
getdefault [name] load name collection of modules or user's "default" if no name given.
===> Use "restore" instead <====
setdefault [name] Save current list of modules to name if given, otherwise save as the default list for you the user.
===> Use "save" instead. <====
Miscellaneous sub-commands:
---------------------------
show modulefile show the commands in the module file.
use [-a] path Prepend or Append path to MODULEPATH.
unuse path remove path from MODULEPATH.
tablelist output list of active modules as a lua table.
Important Environment Variables:
--------------------------------
LMOD_COLORIZE If defined to be "YES" then Lmod prints
properties and warning in color.
--------------------------------------------------------------------------
Lmod Web Sites
Documentation: http://lmod.readthedocs.org
Github: https://github.com/TACC/Lmod
Sourceforge: https://lmod.sf.net
TACC Homepage: https://www.tacc.utexas.edu/research-development/tacc-projects/lmod
To report a bug please read http://lmod.readthedocs.io/en/latest/075_bug
_reporting.html
--------------------------------------------------------------------------
Modules based on Lua: Version 6.5.1 2016-08-17 15:44
by Robert McLay mclay@tacc.utexas.edu
Saving and loading collections of modules
You can save and restore collections of modules you currently have loaded. The saved module file can be found in /users/abc123/.lmod.d/filename.
[abs4@login2(viking) tests]$ module list Currently Loaded Modules: 1) compiler/GCCcore/7.3.0 2) tools/binutils/2.30-GCCcore-7.3.0 3) compiler/GCC/7.3.0-2.30 4) system/CUDA/9.2.88-GCC-7.3.0-2.30 5) toolchain/gcccuda/2018b [abs4@login2(viking) tests]$ module save lotsofmods Saved current collection of modules to: "lotsofmods" [abs4@login2(viking) tests]$ module savelist Named collection list : 1) lotsofmods [abs4@login2(viking) tests]$ module purge [abs4@login2(viking) tests]$ module list No modules loaded [abs4@login2(viking) tests]$ module restore lotsofmods Restoring modules from user's lotsofmods [abs4@login2(viking) tests]$ module list Currently Loaded Modules: 1) compiler/GCCcore/7.3.0 2) tools/binutils/2.30-GCCcore-7.3.0 3) compiler/GCC/7.3.0-2.30 4) system/CUDA/9.2.88-GCC-7.3.0-2.30 5) toolchain/gcccuda/2018b
Installing modules
If you do not find the application you need or you would like a different version to what is available, please get in touch by emailing itsupport@york.ac.uk
Please send the following information if you can
- Name of software
- URL to either the git repository or software page.