...
Table of Contents | ||
---|---|---|
|
Loading and Unloading modules
module load
Load a module into the current environment of the session or job.
...
No Format |
---|
$ module unload git unload git 2.25.1 (git_DIR, GIT_VERSION, PATH) |
module
...
purge
Unload all modulesRun this to see what a module would do without loading it. It is very useful to discover what environment variables will be defined so you can use them later on.
No Format |
---|
$ module list
Currently Loaded Modules:
1) git/2.20.1 2) cmake/3.16.5
$ module purge
unload cmake 3.16.5 (CMAKE_DIR, CMAKE_VERSION, PATH
unload git 2.20.1 (git_DIR, GIT_VERSION, PATH)
|
Listing and Searching
module list
See what modules are loaded at any point.
No Format |
---|
$ module list
Currently Loaded Modules:
1) git/2.20.1 |
Tip |
---|
Note that Lmod will also mark what modules are loaded when running module avail (with an L next to them) |
Tip | ||
---|---|---|
Module list can take an argument to list only those module that match an argument
|
module avail
List all modules that can be loaded at any point.
Warning |
---|
module avail will not show all the possible modules, but only those that can be loaded in the current environment. To see all possible modules and their versions, use module spider |
No Format |
---|
$ module avail show git ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- /usr/local/apps/modulefiles/lmod/core/git/2.20.1.lua: ---------------------------------------------------------------------------------------------- Global Aliases --------------------------------------------------------------------------------------- pa -> prgenv/amd pe -> prgenv/expert pg -- setenv("git_DIR","/usr/local/apps/git/2.20.1") setenv("git_VERSION","2.20.1") setenv("GIT_VERSION","2.20.1") prepend_path("PATH","> prgenv/gnu pi -> prgenv/intel pp -> prgenv/pgi ------------------------------------------------------------------------- /usr/local/apps/git/2.20.1/bin") LmodMessage("show git 2.20.1 (git_DIR, GIT_VERSION, PATH)") whatis("Git is a free and open source distributed version control system.") help([[Git is a free and open source distributed version control system. It is designed to handle everything from small to very large projects with speed and efficiency. For more information on all the available commands run git --help or visit https://git-scm.com/ ]]) |
module list
See what modules are loaded at any point.
No Format |
---|
$ module list
Currently Loaded Modules:
1) git/2.20.1 |
Tip |
---|
Note that Lmod will also mark what modules are loaded when running module avail (with an L next to them) |
...
Module list can take an argument to list only those module that match an argument
No Format |
---|
$ module list
Currently Loaded Modules:
1) git/2.20.1 2) cmake/3.16.5
$ module list git
Currently Loaded Modules Matching: git
1) git/2.20.1 |
module avail
List all modules that can be loaded at any point.
Warning |
---|
module avail will not show all the possible modules, but only those that can be loaded in the current environment. To see all possible modules and their versions, use module spider |
No Format |
---|
$ module avail modulefiles/lmod/prgenvs -------------------------------------------------------------------------- prgenv/amd (a) prgenv/expert (E,e) prgenv/gnu (D:g) prgenv/intel (i) prgenv/pgi ------------------------------------------------------------------------ /usr/local/apps/modulefiles/lmod/compilers ------------------------------------------------------------------------- aocc/2.1.0 gcc/4.8.5 gcc/8.4.0 (D) gcc/9.3.0 (new) intel/18.0.4 intel/19.0.5 (D) pgi/19.10 --------------------------------------------------------------------------- /usr/local/apps/modulefiles/lmod/core ------------------------------ Global Aliases --------------------------------------------------------------------------------------- pa -> prgenv/amd aec/1.0.3 pe -> prgenv/experteigen/3.3.7 pg -> prgenv/gnugit/2.20.1 pi -> prgenv/intel (L,D) pp intel-> prgenv/pgi ------------------------------------------------------------------------- /usr/local/apps/modulefiles/lmod/prgenvs -------------------------------------------------------------------------- prgenv/amd (a) prgenv/expert (E,e) prgenv/gnu (D:g) prgenv/intel (i) prgenv/pgi ------------------------------------------------------------------------ /usr/local/apps/modulefiles/lmod/compilers ------------------------------------------------------------------------- aocc/2.1.0 gcc/4.8.5 gcc/8.4.0 (D) gcc/9.3.0 (new) intel/18.0.4 intel/19.0.5 (D) pgi/19.10 --------------------------------------------------------------------------- /usr/local/apps/modulefiles/lmod/core --------------------------------------------------------------------------- aec/1.0.3mkl/18.0.4 lua/5.3.5 nco/4.7.8 proj/6.1.1 valgrind/3.14.0 antlr/2.7.7 fcm/2019.05.0 git/2.25.1 (new) intel-mkl/19.0.5 (D) maven/3.6.3 ninja/1.10.0 proj4/5.2.0 cmake/3.13.4 ferret/7.5.0 gnuparallel/20190122 jasper/2.0.14 modulemgr/2.0 openjpeg/2.3.0 python3/3.6.8-01 cmake/3.16.5 (D) geos/3.7.1 gsl/2.5 java/11.0.6 eigennccmp/31.8.32.71 gitpatchelf/20.20.110 udunits/2.2.26 Where: (L,D): intel-mkl/18.0.4 Module is lua/5.3.5loaded E: nco/4.7.8 Experimental Aliases: Aliases exist: projfoo/6.1.2.3 (1.12) means that "module load foo/1.2" will load valgrindfoo/31.142.03 antlr/2.7.7D: fcm/2019.05.0 git/2.25.1 (new) intel-mkl/19.0.5 (D) maven/3.6.3 ninja/1.10.0 proj4/5.2.0 cmake/3.13.4 ferret/7.5.0 gnuparallel/20190122 jasper/2.0.14 modulemgr/2.0 openjpeg/2.3.0 python3/3.6.8-01 cmake/3.16.5 (D) geos/3.7.1 gsl/2.5 java/11.0.6 nccmp/1.8.2.1 patchelf/0.10 udunits/2.2.26 Where: L: Module is loaded E: ExperimentalDefault Module Use "module spider" to find all possible modules and extensions. Use "module keyword key1 key2 ..." to search for all possible modules matching any of the "keys". |
Tip | ||
---|---|---|
You may filter the output by providing a search pattern
|
Tip | ||
---|---|---|
You may filter the output by providing a search patternuse the -d option to only list the default version for each module
| ||
Tip | ||
You may use the -d option to only list the default version for each module
|
module whatis
Show a short description of the module
No Format |
---|
$ module whatis git
git/2.20.1 : Git is a free and open source distributed version control system. |
module help
Show a longer description and useful information of the module.
|
module spider (new)
List all possible modules, including those that are not visible because they belong to other environments.
No Format |
---|
$ module spider
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
The following is a list of the modules and extensions currently available:
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
aec: aec/1.0.3
antlr: antlr/2.7.7
aocc: aocc/2.1.0
boost: boost/1.61.0:gnu:4.8.5, boost/1.61.0:gnu:8.4, boost/1.61.0:gnu:9.3, boost/1.61.0:intel:19.0, boost/1.61.0
... |
You may also enquire for a particular module to see all the versions:
No Format |
---|
$ module spider fftw
---- |
No Format |
$ module help git --------------------------------------------------------------------------- Module Specific Help for "git/2.20.1" ------------------------------------------------------------------------------ Git is a free and open source distributed version control system. It is designed to handle everything from small to very large projects with speed and efficiency. For more information on all the available commands run git --help or visit https://git-scm.com/ |
module spider (new)
List all possible modules, including those that are not visible because they belong to other environments.
No Format |
---|
$ module spider ---------------------------- fftw: ------------------------------------------------------------------------------------------------------------------------------------------------------------------ The following is a list of the modules and extensions currently available: ----------------------- Versions: fftw/3.3.8:gnu:4.8 fftw/3.3.8:gnu:8.4 fftw/3.3.8:gnu:9.3 fftw/3.3.8:intel:19.0 fftw/3.3.8 ... |
And even more detailed information about a package version in particular:
No Format |
---|
$ module spider fftw/3.3.8 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- aec: aec/1.0.3 antlr: antlr/2.7.7 aocc: aocc/2.1.0 boost: boost/1.61.0:gnu:4.8.5, boost/1.61.0:gnu:8.4, boost/1.61.0:gnu:9.3, boost/1.61.0:intel:19.0, boost/1.61.0 ... |
You may also enquire for a particular module to see all the versions:
No Format |
---|
$ module spider fftw ---------------------------------------------------------------------------------------------------------------- fftw: fftw/3.3.8 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- fftw: ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Versions: fftw/3.3.8:gnu:4.8 You will need to load all module(s) on any one of the lines below before the "fftw/3.3.8" module is available to load. gcc/4.8.5 gcc/8.4.0 gcc/9.3.0 intel/19.0.5 Help: A fast, free C FFT library; includes real-complex, multidimensional, and parallel transforms. For more information visit http://www.fftw.org/ |
Discovery
module whatis
Show a short description of the module
No Format |
---|
$ module whatis git git/2.20.1 fftw/3.3.8:gnu:8.4 : Git is a free fftw/3.3.8:gnu:9.3 fftw/3.3.8:intel:19.0 fftw/3.3.8 ...and open source distributed version control system. |
module help
Show a longer description and useful information of the module.And even more detailed information about a package version in particular:
No Format |
---|
$ module spider fftw/3.3.8help git ---------------------------------------------------------------------------------------- Module Specific Help for "git/2.20.1" --------------------------------------------------------------------------- Git is a free and open source distributed version control system. It is designed to handle everything from small to very large projects with speed and efficiency. For more information on all the available commands run git --help or visit https://git-scm.com/ |
module show
Run this to see what a module would do without loading it. It is very useful to discover what environment variables will be defined so you can use them later on.
No Format |
---|
$ module show git --------------------------------------------- fftw: fftw/3.3.8 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- You will need to load all module(s) on any one of the lines below before the "fftw/3.3.8" module is available to load. gcc/4.8.5 gcc/8.4.0 gcc/9.3.0 intel/19.0.5 Help: A fast, free C FFT library; includes real-complex, multidimensional, and parallel transforms. For more information visit http://www.fftw.org/ |
module purge
Unload all modules
No Format |
---|
$ module list
Currently Loaded Modules:
1) git/2.20.1 2) cmake/3.16.5
$ module purge
unload cmake 3.16.5 (CMAKE_DIR, CMAKE_VERSION, PATH
unload git 2.20.1 (git_DIR, GIT_VERSION, PATH)
|
----------------------------
/usr/local/apps/modulefiles/lmod/core/git/2.20.1.lua:
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
setenv("git_DIR","/usr/local/apps/git/2.20.1")
setenv("git_VERSION","2.20.1")
setenv("GIT_VERSION","2.20.1")
prepend_path("PATH","/usr/local/apps/git/2.20.1/bin")
LmodMessage("show git 2.20.1 (git_DIR, GIT_VERSION, PATH)")
whatis("Git is a free and open source distributed version control system.")
help([[Git is a free and open source distributed version control system. It is designed to handle everything from small to very large projects with speed and efficiency. For more information on all the available commands run git --help or visit https://git-scm.com/ ]]) |
Collections
Tip |
---|
The default collection is great to define your default modules you want loaded when you start your session or job. |
Lmod introduces the concept of collections. A user can define groups of modules that can be saved and easily restored by name. If no name is specified when saving or restoring a collection, it will use a default collection.
module save
Tip |
---|
If you want to save not only modules but their specific versions or tags, you must load those modules with their full name or tag. |
Save the current list of modules as a collection.
If you want to create a new collection, make sure you start from a clean set with module purge and load only those modules you require before you save them.
No Format |
---|
$ module purge
$ module load git cmake
load git 2.20.1 (git_DIR, GIT_VERSION, PATH)
load cmake 3.16.5 (CMAKE_DIR, CMAKE_VERSION, PATH
$ module save
Saved current collection of modules to: "default", for system: "tems" |
Those modules will be loaded automatically for any new session or job.
And to create a named collection:
No Format |
---|
$ module load git
load git 2.20.1 (git_DIR, GIT_VERSION, PATH)
$ module save mycollection
Saved current collection of modules to: "mycollection", for system: "tems" |
module restore
You can restore a collection at any point. It will unload the necessary modules and load the ones in the collection. If no argument is specified, it will reload your default collection.
No Format |
---|
$ module restore mycollection
Restoring modules from user's mycollection, for system: "tems"
load git 2.20.1 (git_DIR, GIT_VERSION, PATH) |
module savelist
See all the collections that are available for the user on this system
No Format |
---|
$ module savelist
Named collection list (For LMOD_SYSTEM_NAME = "tems"):
1) default 2) mycollection |
module describe
Show the contents of a collection
No Format |
---|
$ module describe
Collection "default" contains:
1) git 2) cmake 3) modulemgr 4) python3
$ module describe mycollection
Collection "mycollection" contains:
1) git
|
module disable
Disable a collection.
No Format |
---|
$ module disable mycollection
Disabling mycollection collection by renaming with a "~"
usxa@at1-11: ~ [2020-03-19 12:31:21 UTC] [0]
$ module savelist
Named collection list (For LMOD_SYSTEM_NAME = "tems"):
1) default |
The ml shortcut
...
Lmod provides a convenience shortcut command called ml that doubles up as module list or any other mode:
No Format |
---|
$ ml
Currently Loaded Modules:
1) git/2.20.1
$ ml git/new
unload git 2.20.1 (git_DIR, GIT_VERSION, PATH)
load git 2.25.1 (git_DIR, GIT_VERSION, PATH)
The following have been reloaded with a version change:
1) git/2.20.1 => git/2.25.1
$ ml
Currently Loaded Modules:
1) git/2.25.1
$ ml whatis git
git/2.25.1 : Git is a free and open source distributed version control system. |
It also provides shorter subcommands such as "av" for "avail". See the modules --help for more details.