BwUniCluster3.0/Software Modules: Difference between revisions

From bwHPC Wiki
Jump to navigation Jump to search
(Created page with "<div id="top"></div> <br> = Introduction = '''Software (Environment) Modules''', or short '''Modules''' are the means by which most of the installed scientific software is provided on bwUniCluster 3.0. <br> The use of different compilers, libraries and software packages requires users to set up a specific session environment suited for the program they want to run. bwUniCluster 3.0 provides users with the possibility to load and unload complete environments for compiler...")
 
No edit summary
Line 1: Line 1:
<div id="top"></div>
<span id="introduction"></span>
<br>
= Introduction =
= Introduction =
'''Software (Environment) Modules''', or short '''Modules''' are the means by which most of the installed scientific software is provided on bwUniCluster 3.0.
<br>
The use of different compilers, libraries and software packages requires users to set up a specific session environment suited for the program they want to run. bwUniCluster 3.0 provides users with the possibility to load and unload complete environments for compilers, libraries and software packages by a single command.
<br>
<br>


'''Software (Environment) Modules''', or short '''modules''' are the means by which most of the installed scientific software is provided on ''bwUniCluster 3.0''.
= Description =
The Environment ''Modules'' package enables dynamic modification of your environment by the
use of so-called ''modulefiles''. A ''modulefile'' contains information to configure the shell
for a program/software . Typically, a modulefile contains instructions that alter or set shell
environment variables, such as PATH and MANPATH, to enable access to various installed
software.
<br>
One of the key features of using the Environment ''Modules'' software is to allow multiple versions of the same software to be used in your environment in a controlled manner.
For example, two different versions of the Intel C compiler can be installed on the system at the same time - the version used is based upon which Intel C compiler modulefile is loaded.
<br>
The software stack of bwUniCluster 3.0 provides a number of modulefiles. You can also
create your own modulefiles. ''Modulefiles'' may be shared by many users on a system, and
users may have their own collection of modulefiles to supplement or replace the shared
modulefiles.
<br>
A modulefile does not provide configuration of your environment until it is explicitly loaded,
i.e., the specific modulefile for a software product or application must be loaded in your environment before the configuration information in the modulefile is effective.
<br>
If you want to see which modules are loaded you must execute
''''module list''''.
<br>
<pre>
$ module list
Currently Loaded Modules:
1) compiler/intel/19.1 2) mpi/impi/2019 3) numlib/mkl/2019
</pre>
<br>


The use of different compilers, libraries and software packages requires users to set up a specific session environment suited for the program they want to run. ''bwUniCluster 3.0'' provides users with the possibility to load and unload complete environments for compilers, libraries and software packages using a single command.
= Usage =
Lmod on bwUniCluster 3.0: A New Environment Module System from http://lmod.readthedocs.org/en/latest/ is installed.
== Documentation ==
Execute ''''module help'''' or ''''man module'''' for help on how to use ''Modules'' software.
<pre>
$ module help
Usage: module [options] sub-command [args ...]


<span id="basics"></span>
Options:
= Basics =
-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 (where dbglvl is a number 1,2,3)
--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
--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
--check_syntax --checkSyntax Checking module command syntax: do not load
--config Report Lmod Configuration
--config_json Report Lmod Configuration in json format
--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
-T --trace


The Environment ''modules'' package enables dynamic modification of your environment. Typically, a modulefile contains instructions that alter or set shell environment variables, such as PATH and MANPATH, to enable access to various installed software.
module [options] sub-command [args ...]


One of the key features of using Environment ''Modules'' is to allow multiple versions of the same software to be used in your environment in a controlled manner. For example, two different versions of the Intel C compiler can be installed on the system at the same time - the version used is based upon which Intel C compiler modulefile is loaded.
Help sub-commands:
------------------
help prints this message
help module [...] print help message from module(s)


The software stack of bwUniCluster 3.0 provides a number of modules. Users can also create their own ''modules''. ''Modules'' may even be shared by users on a system, and users may have their own collection of ''modules'' to supplement or replace the global ''modules''.
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.


To see which modules are currently loaded/enabled one must execute
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".


<pre class="example">$ module list
Searching with Lmod:
No modules loaded
--------------------
</pre>
All searching (spider, list, avail, keyword) support regular expressions:
If the user has just logged in no ''modules'' should be loaded.


If a user has setup his/her environment for an Intel toolchain the output may look like this


<pre class="example">$ module list
-r spider '^p' Finds all the modules that start with `p' or `P'
-r spider mpi Finds all modules that have "mpi" in their name.
-r spider 'mpi$ Finds all modules that end with "mpi" in their name.


Currently Loaded Modules:
Handling a collection of modules:
1) compiler/intel/2023.1.0 2) numlib/mkl/2022.2.1 3) mpi/impi/2021.11
--------------------------------
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.
disable name Disable (i.e. remove) a collection.


</pre>
Deprecated commands:
<span id="usage"></span>
--------------------
= Usage =
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. <====


bwUniCluster 3.0 has been set up to use the ''Lmod'' module system. ''Lmod'' is a modern replacement of the older environment modules. The complete ''Lmod'' documentation can be found [[<nowiki/>http://lmod.readthedocs.org/en/latest/][here]].
Miscellaneous sub-commands:
---------------------------
is-loaded modulefile return a true status if module is loaded
is-avail modulefile return a true status if module can be loaded
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.


<span id="documentation"></span>
Important Environment Variables:
== Getting help ==
--------------------------------
LMOD_COLORIZE If defined to be "YES" then Lmod prints properties and warning in color.


The ''Lmod'' module command provides a manual page (man module) and a help command line option. Execute ''''module help'''' or ''''man module'''' for help on how to use ''Lmod'' software.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<pre class="example">$ module help
Usage: module [options] sub-command [args ...]

Options:
-h -? -H --help This help message
...
a lot of output
...
Lmod Web Sites
Lmod Web Sites


Documentation: http://lmod.readthedocs.org
Documentation: https://lmod.readthedocs.org
Github: https://github.com/TACC/Lmod
GitHub: https://github.com/TACC/Lmod
Sourceforge: https://lmod.sf.net
SourceForge: https://lmod.sf.net
TACC Homepage: https://www.tacc.utexas.edu/research-development/tacc-projects/lmod
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
To report a bug please read https://lmod.readthedocs.io/en/latest/075_bug_reporting.html
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Modules based on Lua: Version 8.2 (8.2-1-g9c98036c) 2019-10-30 11:17 -05:00
Modules based on Lua: Version 8.7.55 2024-12-13 12:24 -07:00
by Robert McLay mclay@tacc.utexas.edu
by Robert McLay mclay@tacc.utexas.edu



</pre>
</pre>
For help on particular version of ''Module'', e.g. Intel default compiler version, execute
To get help for a particular ''module'', e.g. the default GNU compiler, run
''''module help compiler/intel''''.
<pre>
$ module help compiler/intel
---------------------- Module Specific Help for "compiler/intel/19.1" ----------------------
Intel(R) Compilers 19.1 for Linux*
For details see: https://software.intel.com/en-us/intel-compilers
In case of problems, please contact: Hartmut Häfner <hartmut.haefner@kit.edu>
SCC support end: 2022-12-31
</pre>
<br>
=== Online Documentation ===
[http://lmod.readthedocs.org Lmod: A New Environment Module System]
<br>
<br>


<pre class="example">$ module help compiler/gnu

------------- Module Specific Help for &quot;compiler/gnu/14.2&quot; -------------------------------
This module provides the GNU compiler collection version 14.2.0 via commands
gcc, g++, gfortran and gccgo. The GNU compiler has been build with the libraries
gmp (6.3.0), mpfr (4.2.1), mpc (1.3.1) and isl (0.27).
This compiler supports offloating OpenACC and OpenMP to NVIDIA CUDA using -foffload.

cpp - GNU pre processor
gcc - GNU C compiler
g++ - GNU C++ compiler
gfortran - GNU Fortran compiler (Fortran 95/2003/2008 plus legacy Fortran 77)
gccgo - GNU Google's Go language

Libraries can be found in
\$GNU_HOME/lib64 = $env(GNU_HOME)/lib64
One may require additionally libraries installed in
\$GNU_HOME/lib = $env(GNU_HOME)/lib

Local documentation:
See commands 'man cpp', 'man gcc', 'man g++' and 'man gfortran'.

Online documentation:
https://gcc.gnu.org/onlinedocs/

For details on library and include dirs please call
module show

The man pages, environment variables and compiler commands
are available after loading '[module-info name]'.

In case of problems, submit a trouble ticket at 'https://bw-support.scc.kit.edu'.

The full version is: compiler/gnu/14.2.0
</pre>
<span id="displayallavailablemodules"></span>
== Display all available Modules ==
== Display all available Modules ==

Available ''Module'' are modulefiles that can be loaded by the user. A ''Module'' must be loaded before it provides changes to your environment, as described in the introduction to this section. You can display all available ''Modules'' on the system by executing:
bwUniCluster3.0 comes with a variety of modules pre-installed. Some of these modules may not be available for all users, due to licensing restrictions. You can display all available ''modules'' by running:
<pre>

$ module avail
<pre class="example">$ module avail
</pre>
</pre>
Due to the fact that some modules depend on other modules, some modules may not be shown as available all the time. To get a complete list of all possible modules use the [[#displayallmodules|module spider command]].
The short form the command is:
<pre>
$ module av
</pre>
Available ''Modules'' can be also displayed in different modes, such as
* each ''Module'' per one line
<pre>
$ module -t avail
</pre>
Some modules may not be available right now, because their requirements are not met. To get a complete list of all possible modules use the [[#Display all possible Modules|module spider command]].
<br>
<br>


<span id="module_categories_versions_and_defaults"></span>
== Module categories, versions and defaults ==
== Module categories, versions and defaults ==
The bwHPC clusters traditionally provide a large variety of software and software versions. Therefore ''Module'' are divided in category folders containing subfolders of modulefiles again containing modulefile versions, and must be addressed as follows:
category/softwarename/version
For instance all versions of the Intel compiler belong to the category of compilers, thus the corresponding modulefiles are placed under the category ''compiler'' and ''intel''.
<br>
In case of multiple software versions, one version will be always defined as the '''default'''
version. The ''Module'' of the default can be addressed by simply omitting the version number:
category/softwarename
<br>


The bwHPC clusters traditionally provide a large variety of software and software versions. Therefore ''modules'' are divided into category folders containing subfolders of modulefiles again containing modulefile versions, and must be addressed as follows:

<code>category/softwarename/version</code>

For instance all versions of the Intel compiler belong to the category compiler, thus the corresponding modulefiles are placed under the category ''compiler'' and ''intel''.

In case of multiple software versions, one version will be defined as the '''default''' version. The ''Module'' of the default can be addressed by simply omitting the version number:

<code>category/softwarename</code>

Please be aware, that the '''default''' version may change over time.

<span id="findingsoftwaremodules"></span>
== Finding software Modules ==
== Finding software Modules ==

Currently all bwUniCluster 3.0 software packages are assigned to the following ''Module'' categories (???):
Currently all bwUniCluster 3.0 software packages are assigned to the following ''Module'' categories (???):

<!-- add wiki category for each of those, possibly just as a link -->
<!--* [[:Category:Biology_software|bio]]-->
* bio
* bio
<!--* [[:Category:Engineering_software|cae]]-->
* cae
* cae
<!--* [[:Category:Chemistry_software|chem]]-->
* chem
* chem
<!--* [[:Category:Compiler_software|compiler]]-->
* compiler
* compiler
<!--* [[:Category:Debugger_software|devel]]-->
* devel
* devel
<!--* [[:Category:Libraries|lib]]-->
* lib
* lib
<!--* [[BwHPC_BPG_for_Mathematics|math]]-->
* math
* math
* mpi
* mpi
<!--* [[:Category:Numerical libraries|numlib]]-->
* numlib
* numlib
<!--* [[:Category:Physics software|phys]]-->
* phys
* phys
<!--* [[:Category:System software|system]]-->
* system
* system
<!--* [[:Category:Toolkit|toolkit]]-->
* toolkit
* toolkit
<!--* [[:Category:Visualization|vis]]-->
* vis
* vis

You can selectively list software in one of those categories using, e.g. for the category "compiler"
You can selectively list software in one of those categories using, e.g. for the category &quot;compiler&quot;
<pre>

$ module avail compiler/
<pre class="example">$ module avail compiler
</pre>
Searches are looking for a substring starting at the begin of the name, so this would list all software in categories starting with a "c"
<pre>
$ module avail c
</pre>
</pre>
Searches with module avail are substring searches and will return any module with the string in its name.
while this would find nothing
<pre>
$ module avail hem
</pre>
<br>


<span id="loadingmodules"></span>
== Loading Modules ==
== Loading Modules ==

You can load a ''Module'' software in to your environment to enable easier access to software that
To use a software provided through modules in your environment, run:
you want to use by executing:

<pre>
$ module load category/softwarename/version
<pre class="example">$ module load category/softwarename/version
</pre>
</pre>
or
or

<pre>
$ module add category/softwarename/version
<pre class="example">$ module add category/softwarename/version
</pre>
</pre>
Loading a ''Module'' in this manner affects ONLY your environment for the current session.
Loading a ''Module'' in this manner affects your environment only for the current session or until you [[#unloadingmodules|unload]] the module again
<br>
<br>
=== Loading conflicts ===
You can not load different versions of the same software at the same time! Loading the Intel compiler in version X while Intel compiler in version Y is loaded leads to an automatic unloading of Intel compiler in version Y.
<br>
<br>


<span id="module-conflicts"></span>
=== module conflicts ===

For some software, it doesn't make sense to provide multiple versions of the same software in the same environment. For this reason, module will automatically unload a conflicting version of the same software, e.g. loading the Intel compiler in version X while Intel compiler in version Y is loaded leads to an automatic unloading of Intel compiler in version Y.

<span id="showingchanges"></span>
=== Showing the changes introduced by a Module ===
=== Showing the changes introduced by a Module ===

Loading a ''Module'' will change the environment of the current shell session. For instance the $PATH variable will be expanded by the software's binary directory. Other ''Module'' variables may even change the behavior of the current shell session or the software program(s) in a more drastic way.
Loading a module will change the environment of the current shell session. For instance the $PATH variable will be expanded by the software's bin directory. Other module variables may even change the behavior of the current shell session or the software program(s) in a more drastic way.
<br>

<br>
All the changes to the current shell session to be invoked by loading the ''Module'' can be reviewed using
All the changes to the current shell session to be invoked by loading the module can be reviewed using 'module show category/softwarename/version', if version is omitted, information for the default version will be shown, e.g. for the default GNU compiler

<br>
<pre class="example">$ module show compiler/gnu
''''module show category/softwarename/version''''.
-------------------------------------------------------------------------------------------------------
<br>
/opt/bwhpc/common/modulefiles/Core/compiler/gnu/13.3.lua:
<br>
-------------------------------------------------------------------------------------------------------
'''Example (Intel compiler)'''
setenv(&quot;GNU_VERSION&quot;,&quot;13.3.0&quot;)
<pre>
setenv(&quot;GNU_HOME&quot;,&quot;/opt/bwhpc/common/compiler/gnu/13.3.0&quot;)
$ module show compiler/intel
setenv(&quot;GNU_BIN_DIR&quot;,&quot;/opt/bwhpc/common/compiler/gnu/13.3.0/bin&quot;)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/opt/bwhpc/common/modulefiles/Core/compiler/intel/19.1.lua:
setenv(&quot;GNU_LIB_DIR&quot;,&quot;/opt/bwhpc/common/compiler/gnu/13.3.0/lib64&quot;)
setenv(&quot;GNU_INC_DIR&quot;,&quot;/opt/bwhpc/common/compiler/gnu/13.3.0/include&quot;)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
setenv(&quot;GNU_MAN_DIR&quot;,&quot;/opt/bwhpc/common/compiler/gnu/13.3.0/share/man&quot;)
setenv("INTEL_LICENSE_FILE","28518@scclic1.scc.kit.edu")
prepend_path(&quot;PATH&quot;,&quot;/opt/bwhpc/common/compiler/gnu/13.3.0/bin&quot;)
setenv("AR","/opt/intel/compilers_and_libraries_2020/linux/bin/intel64/xiar")
prepend_path(&quot;LD_LIBRARY_PATH&quot;,&quot;/opt/bwhpc/common/compiler/gnu/13.3.0/lib64&quot;)
setenv("CC","/opt/intel/compilers_and_libraries_2020/linux/bin/intel64/icc")
prepend_path(&quot;MANPATH&quot;,&quot;/opt/bwhpc/common/compiler/gnu/13.3.0/share/man&quot;)
setenv("CXX","/opt/intel/compilers_and_libraries_2020/linux/bin/intel64/icpc")
conflict(&quot;compiler/intel&quot;)
setenv("F77","/opt/intel/compilers_and_libraries_2020/linux/bin/intel64/ifort")
conflict(&quot;compiler/pgi&quot;)
setenv("FC","/opt/intel/compilers_and_libraries_2020/linux/bin/intel64/ifort")
whatis(&quot;GNU compiler suite version 13.3.0 (gcc, g++, gfortran, gccgo) including LTO and JIT &quot;)
setenv("CFLAGS","-O2 -xCORE-AVX2")
help([[This module provides the GNU compiler collection version 13.3.0 via commands
setenv("CXXFLAGS","-O2 -xCORE-AVX2")
gcc, g++, gfortran and gccgo. The GNU compiler has been build with the libraries
setenv("FFLAGS","-O2 -xCORE-AVX2")
gmp (6.3.0), mpfr (4.2.1), mpc (1.3.1) and isl (0.26).
setenv("FCFLAGS","-O2 -xCORE-AVX2")
This compiler supports offloating OpenACC and OpenMP to NVIDIA CUDA using -foffload.
setenv("INTEL_VERSION","19.1.0.166")

setenv("INTEL_HOME","/opt/intel/compilers_and_libraries_2020/linux")
cpp - GNU pre processor
setenv("INTEL_BIN_DIR","/opt/intel/compilers_and_libraries_2020/linux/bin/intel64")
gcc - GNU C compiler
setenv("INTEL_LIB_DIR","/opt/intel/compilers_and_libraries_2020/linux/lib/intel64")
g++ - GNU C++ compiler
setenv("INTEL_INC_DIR","/opt/intel/compilers_and_libraries_2020/linux/include")
gfortran - GNU Fortran compiler (Fortran 95/2003/2008 plus legacy Fortran 77)
setenv("INTEL_MAN_DIR","/opt/intel/compilers_and_libraries_2020/linux/man/common")
gccgo - GNU Google's Go language
setenv("INTEL_DOC_DIR","/opt/intel/compilers_and_libraries_2020/linux/documentation/en")

setenv("GDB_VERSION","19.1.0.166")
Libraries can be found in
setenv("GDB_HOME","/opt/intel/debugger_2020/gdb/intel64")
\$GNU_HOME/lib64 = $env(GNU_HOME)/lib64
setenv("GDB_BIN_DIR","/opt/intel/debugger_2020/gdb/intel64/bin")
One may require additionally libraries installed in
setenv("GDB_LIB_DIR","/opt/intel/debugger_2020/libipt/intel64/lib")
\$GNU_HOME/lib = $env(GNU_HOME)/lib
setenv("GDB_INC_DIR","/opt/intel/debugger_2020/gdb/intel64/include")

setenv("GDB_INF_DIR","/opt/intel/documentation_2020/en/debugger/gdb-ia/info")
Local documentation:
setenv("GDB_MAN_DIR","/opt/intel/documentation_2020/en/debugger/gdb-ia/man")
See commands 'man cpp', 'man gcc', 'man g++' and 'man gfortran'.
setenv("KMP_AFFINITY","noverbose,granularity=core,respect,warnings,compact,1")

prepend_path("PATH","/opt/intel/compilers_and_libraries_2020/linux/bin/intel64")
Online documentation:
prepend_path("MANPATH","/opt/intel/compilers_and_libraries_2020/linux/man/common")
https://gcc.gnu.org/onlinedocs/
prepend_path("LD_LIBRARY_PATH","/opt/intel/compilers_and_libraries_2020/linux/lib/intel64")

whatis("Sets up Intel C/C++ and Fortran compiler version 19.1 (Intel(R) Compilers 19.1 for Linux*) - supported by SCC till 2022-12-31!")
For details on library and include dirs please call
help([[Intel(R) Compilers 19.1 for Linux*
module show [module-info name]
For details see: https://software.intel.com/en-us/intel-compilers

In case of problems, please contact: Hartmut Häfner <hartmut.haefner@kit.edu>
The man pages, environment variables and compiler commands
SCC support end: 2022-12-31]])
are available after loading '[module-info name]'.
prepend_path("MODULEPATH","/software/bwhpc/common/modulefiles/Compiler/intel/19.1")

family("compiler")
In case of problems, submit a trouble ticket at 'https://bw-support.scc.kit.edu'.

The full version is: compiler/gnu/13.3.0

]])
prepend_path(&quot;MODULEPATH&quot;,&quot;/software/bwhpc/common/modulefiles/Compiler/gnu/13.3&quot;)
family(&quot;compiler&quot;)
</pre>
</pre>
<span id="modules_depending_on_modules"></span>
<br>
=== Dependencies between modules ===
<br>


Most modern software depends on shared libraries. Shared libraries must be accesible during the runtime of the software. This is true for basic OS libraries as well as for more specialized libraries like math or communication libraries. For basic OS libraries, one version is usually enough for all software running on a system. For the more specialized libraries, different user may prefer different versions or even implementations of these libraries. Theses situations can be represented using modules. The modules contain the information, what tools are necessary to run a specific software and load all required software automatically.
=== Modules depending on Modules ===
Some program ''Modules'' depend on libraries to be loaded to the user environment. Therefore the
corresponding ''Modules'' of the software must be loaded together with the ''Modules'' of
the libraries.
<br>
By default such software ''Modules'' try to load required ''Modules'' and corresponding versions automatically.
<br>
<br>
<br>


<span id="unloadingmodules"></span>
== Unloading Modules ==
== Unloading Modules ==

To unload or remove a software ''Module'' execute:
To unload or remove a module run:
<pre>

$ module unload category/softwarename/version
<pre class="example">$ module unload category/softwarename/version
</pre>
</pre>
or
or
<pre>
$ module remove category/softwarename/version
</pre>
<br>


<pre class="example">$ module remove category/softwarename/version
</pre>
<span id="unloadingallmodules"></span>
=== Unloading all loaded modules ===
=== Unloading all loaded modules ===

==== Purge ====
<ol>
Unloading a ''Module'' that has been loaded by default makes it inactive for the current session only - it will be reloaded the next time you log in.
<li><p>Purge</p>
<br>
<p>Loading different modules may lead to a expansive list of modules, especially when using [[#EasyBuild|EasyBuild]]. To unload all currently loaded modules use the 'module purge' command like this:</p>
In order to remove all previously loaded software modules from your environment issue the command 'module purge'.
<pre class="example">$ module list
<br>
<u>Example</u>
<pre>
$ module list
Currently Loaded Modules:
Currently Loaded Modules:
1) compiler/intel/19.1 2) mpi/impi/2019 3) numlib/mkl/2019
1) compiler/intel/19.1 2) mpi/impi/2019 3) numlib/mkl/2019
$
$ module purge
$ module purge
$ module list
$ module list
No modules loaded
No modules loaded
$
</pre>
</pre>
<p>Be aware that 'module purge' is working without any further inquiry.</p></li></ol>
<font color>Beware!</font>
<br>
'module purge' is working without any further inquiry.
<br>
<br>


<span id="displayyourloadedmodules"></span>
== Display your loaded Modules ==
== Display your loaded Modules ==
All ''Modules'' that are currently loaded for you can be displayed by the
command ''''module list''''. [[#Purge|See example above]].
<br>
Note: You only have to load further ''Modules'', if you want to use additional software
packages or to change the version of an already loaded software.
<br>
<br>


All currently loaded modules can be displayed using the 'module list' command. [[#basics|See example above]].

<span id="displayallmodules"></span>
== Display all possible Modules ==
== Display all possible Modules ==
Modulefiles can be searched by the user. You can dipslay all possible modules by executing:
<pre>
$ module spider


Some of the modules may not be visible with the 'module avail' command to due to unmet dependencies. All available and currently not available modules can be listed using the 'module spider' command:
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<pre class="example">$ module spider
-----------------------------------------------------------------------------------------------
The following is a list of the modules and extensions currently available:
The following is a list of the modules and extensions currently available:
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------
compiler/gnu: compiler/gnu/11.4, compiler/gnu/14.2
cae/abaqus: cae/abaqus/2018, cae/abaqus/2019


devel/code-server: devel/code-server/4.96.4
cae/adina: cae/adina/9.1.2


devel/cuda: devel/cuda/12.8
cae/ansys: cae/ansys/19.2, cae/ansys/2019R3, cae/ansys/2020R1


... long list of modules and versions ...
cae/comsol: cae/comsol/5.4, cae/comsol/5.5


To learn more about a package execute:
cae/cst: cae/cst/2018


$ module spider Foo
cae/lsdyna: cae/lsdyna/901


where &quot;Foo&quot; is the name of a module.
cae/openfoam: cae/openfoam/v1912, cae/openfoam/2.4.x, cae/openfoam/6, cae/openfoam/7


To find detailed information about a particular package you
cae/paraview: cae/paraview/5.8
must specify the version if there is more than one version:


$ module spider Foo/11.1
cae/starccm+: cae/starccm+/14.02.010, cae/starccm+/2019.2.1


-----------------------------------------------------------------------------------------------
cae/starcd: cae/starcd/4.28
</pre>
To see all versions of a software in a category use 'module spider category/name/'


compiler/clang: compiler/clang/9.0
<pre class="example">$ module spider compiler/gnu


-----------------------------------------------------------------------------------------------
compiler/gnu: compiler/gnu/9.2
compiler/gnu:
-----------------------------------------------------------------------------------------------
Versions:
compiler/gnu/11.4
compiler/gnu/14.2


-----------------------------------------------------------------------------------------------
compiler/intel: compiler/intel/18.0, compiler/intel/19.0, compiler/intel/19.1
For detailed information about a specific &quot;compiler/gnu&quot; package (including how to load the modules) use the module's full name.
Note that names that have a trailing (E) are extensions provided by other modules.
For example:


compiler/pgi: compiler/pgi/2019
$ module spider compiler/gnu/14.2
-----------------------------------------------------------------------------------------------


</pre>
devel/cmake: devel/cmake/3.16
module spider may be used to show the dependencies of the module. For example, you can see which modules need to be loaded before loading the module mpi/impi/2021.11 is possible


<pre class="example">$ module spider mpi/impi/2021.11
devel/cuda: devel/cuda/9.2, devel/cuda/10.0, devel/cuda/10.2


----------------------------------------------------------------------
devel/gdb: devel/gdb/9.1
mpi/impi: mpi/impi/2021.11
----------------------------------------------------------------------


You will need to load all module(s) on any one of the lines below before the &quot;mpi/impi/2021.11&quot; module is available to load.
devel/python: devel/python/3.7.4_gnu_9.2, devel/python/3.8.1_gnu_9.2, devel/python/3.8.1_intel_19.1


compiler/intel/2021.4.0
math/R: math/R/3.6.3
compiler/intel/2021.4.0_llvm
compiler/intel/2022.2.1
compiler/intel/2022.2.1_llvm
compiler/intel/2023.1.0
compiler/intel/2023.1.0_llvm
compiler/intel/2024.0_llvm


Help:
math/julia: math/julia/1.3.1
Intel MPI Library version 2021.11


From the product website
mpi/impi: mpi/impi/2018, mpi/impi/2019, mpi/impi/2020
(https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/mpi-library.html):


Intel MPI Library
mpi/openmpi: mpi/openmpi/4.0
Deliver flexible, efficient, and scalable cluster messaging.


One Library with Multiple Fabric Support
numlib/mkl: numlib/mkl/2018, numlib/mkl/2019, numlib/mkl/2020
Intel MPI Library is a multifabric message-passing library that implements the
open-source MPICH specification. Use the library to create, maintain, and test
advanced, complex applications that perform better on high-performance
computing (HPC) clusters based on Intel processors.


* Develop applications that can run on multiple cluster interconnects that you
numlib/python_numpy: numlib/python_numpy/1.17.2_python_3.7.4_gnu_9.2
choose at run time.
* Quickly deliver maximum end-user performance without having to change the
software or operating environment.
* Achieve the best latency, bandwidth, and scalability through automatic tuning
for the latest Intel platforms.
* Reduce the time to market by linking to one library and deploying on the
latest optimized fabrics.
</pre>
<span id="EasyBuild"></span>
= <code>EasyBuild modules</code> =


With bwUniCluster 3.0 we start an official beta-test to provide toolchains and scientific software built with [https://docs.easybuild.io/ EasyBuild]. EasyBuild is a well established and consistent way to provide scientific software at many HPC sites all over the world. Since the naming of Easybuild modules is consistent users can use modules with the same name at different sites. To make this possible, Easybuild software minimizes the resources used by the local operating system and provides most software independently. This makes scientific results more reproducible.
numlib/python_scipy: numlib/python_scipy/1.3.1_numpy_1.17.2_python_3.7.4_gnu_9.2


<span id="using-easybuild-modules"></span>
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
== Using EasyBuild modules ==


Users interested in using easyBuild modules need to add the Easybuild module paths to their module environment. This can be done using
To learn more about a package execute:


<pre class="example">source /opt/bwhpc/common/etc/easybuild/enable_eb_modules
$ module spider Foo
</pre>
Now users have acces to a comlete Easybuild module tree, providing compiler toolchains, libraries, and scientific software. The same module commands described above can be used for EasyBuild modules. They can be loaded and unloaded in the same way. Please try not to mix Easybuild modules with the standard modules. There may be unintended consequences. It's always a good idea to [[#purge|purge]] all modules before loading new ones. If you want to use easybuild modules in your jobscripts, please make sure to enable them in your jobscript as well.


To hide the EasyBuild modules again, run:
where "Foo" is the name of a module.


<pre class="example">source /opt/bwhpc/common/etc/easybuild/disable_eb_modules
To find detailed information about a particular package you
</pre>
must specify the version if there is more than one version:
or start again with a clean shell


<span id="easybuild-conventions"></span>
$ module spider Foo/11.1
== EasyBuild conventions ==


In theory one could build every software against every library and every compiler. This would lead to an unmaintainable amount of combinations. For this reason the EasyBuild team has decided to provide two so called toolchains a year for the most common compiler suits. Each toolchain defines one version of compiler, MPI library, math libraries and other packages as default for all software build aginst this toolchain. On bwUniCluster 3.0 we start with 3 foss, 3 intel and one nvhpc toolchains. For a complete list of EasyBuild toolchains, please see [https://docs.easybuild.io/version-specific/toolchains/ the EasyBuild website]. Currently the 2023a, 2023b, and 2024a toolchains are available, with 2024a being the default one. Some software may not be available for the latest toolchain yet, but may be available for an older toolchain.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
</pre>
''''module spider name/version'''' : If you search the full name and version of the module, the search gives detailed information about that module version.
<pre>
$ module spider devel/cmake


EasyBuild currently supports almost 4000 software packages. We can and will only provide a subset, of course. As a start, we provide current versions of popular software packages form bwUniCluster 2.0. Updating and extending EasyBuild packages is a community effort, which should make providing new software easier. We try to provide additional packages if users request the installation. If we can't provide the software you can still use the advantages of EasyBuild by using it to build your private version.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
devel/cmake: devel/cmake/3.16
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


<span id="build-individual-easybuild-packages-as-a-user"></span>
This module can be loaded directly: module load devel/cmake/3.16
== Build individual EasyBuild packages as a user ==


EasyBuild can also be used to compile your own or niche software, based on the available EasyBuild files by creating an independent EasyBuild software and module tree. The bwUnicluster 3.0 EasyBuild tree can be used as a base to build additional software in your home directory.
Help:

Home page: https://www.cmake.org
We assume the following
Online Documentation: https://www.cmake.org/HTML/Documentation.html

Local Documentation: /opt/bwhpc/common/devel/cmake/3.16.4/docFAQ: https://gitlab.kitware.com/cmake/community/wikis/FAQ
* the sofware will be installed in your home directory in the sub-directory eb
* you have already cloned the git repository from https://github.com/easybuilders/easybuild-easyconfigs to ~/eb/easybuild-easyconfigs
In case of problems, please contact 'bwunicluster-hotline (at) lists.kit.edu'
* create an easybuild configuration file
or submit a trouble ticket at http://www.support.bwhpc-c5.de.

<pre class="example">[basic]
robot=&lt;path_to_your_home&gt;/eb/easybuild-easyconfigs/easybuild/easyconfigs
[config]
modules-tool: Lmod
prefix=&lt;path_to_your_home&gt;/eb
buildpath=/scratch/build
[override]
allow-modules-tool-mismatch=True
</pre>
</pre>
* add system-wide easybuild module path
Moreover, you can see the dependencies of the module with using the same command. For example, if the following is executed, you can see which modules need to be loaded before loading the module mpi/impi/2019
<pre>
$ module spider mpi/impi/2019


<pre class="example">source /opt/bwhpc/common/etc/easybuild/enable_eb_modules
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
</pre>
mpi/impi: mpi/impi/2019
* add local module path
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


<pre class="example">mkdir -p ~/eb/modules/all
You will need to load all module(s) on any one of the lines below before the "mpi/impi/2019" module is available to load.
module use ~/eb/modules/all
</pre>
* find or create easybuild file, you can use any of the easybild


<pre class="example">ls ~/eb/easybuild-easyconfigs/easybuild/easyconfigs/*/* | grep eb$
compiler/clang/9.0
</pre>
compiler/gnu/9.2
* build your software with EasyBuild
compiler/intel/18.0
compiler/intel/19.0
compiler/intel/19.1
Help:
Intel(R) MPI Library


<pre class="example">eb cowsay-3.04.eb
</pre>
</pre>
* use your software
<br>


<pre class="example">$ module load cowsay
$ cowsay &quot;Hello EasyBuild&quot;
_________________
&lt; Hello EasyBuild &gt;
-----------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||

</pre>
<span id="how_do_modules_work"></span>
= How do Modules work? =
= How do Modules work? =

The default shell on the bwHPC clusters is bash, so explanations and examples will be shown for bash. In general, programs cannot modify the environment of the shell they are being run from, so how can the module command do exactly that?
The default shell on the bwUniCluster 3.0 is bash, so explanations and examples will be shown for bash. In general, programs cannot modify the environment of the shell they are being run from, so how can the module command do exactly that? The module command is not a program, but a bash-function. You can view its content using:
<br>

The module command is not a program, but a bash-function.
<pre class="example">$ type module
You can view its content using:
<pre>
$ type module
</pre>
</pre>
and you will get the following result:
and you will get the following result:

<pre>
$ type module
<pre class="example">$ type module
module is a function
module is a function
module ()
module ()
{
{
eval $($LMOD_CMD bash "$@");
eval $($LMOD_CMD bash &quot;$@&quot;);
[ $? = 0 ] && eval $(${LMOD_SETTARG_CMD:-:} -s sh)
[ $? = 0 ] &amp;&amp; eval $(${LMOD_SETTARG_CMD:-:} -s sh)
}
}
</pre>
</pre>
In this function, lmod is called. Its output to stdout is then executed inside your current shell using the bash-internal ''eval'' command. As a consequence, all output that you see from the module is transmitted via stderr (output handle 2) or in some cases even stdin (output handle 0).
In this function, lmod is called. Its output to stdout is then executed inside your current shell using the bash-internal ''eval'' command. As a consequence, all output that you see from the module is transmitted via stderr (output handle 2) or in some cases even stdin (output handle 0). [[#introduction|back to top]]
<br>
<br>
----
[[#top|Back to top]]

Revision as of 16:32, 20 February 2025

Introduction

Software (Environment) Modules, or short modules are the means by which most of the installed scientific software is provided on bwUniCluster 3.0.

The use of different compilers, libraries and software packages requires users to set up a specific session environment suited for the program they want to run. bwUniCluster 3.0 provides users with the possibility to load and unload complete environments for compilers, libraries and software packages using a single command.

Basics

The Environment modules package enables dynamic modification of your environment. Typically, a modulefile contains instructions that alter or set shell environment variables, such as PATH and MANPATH, to enable access to various installed software.

One of the key features of using Environment Modules is to allow multiple versions of the same software to be used in your environment in a controlled manner. For example, two different versions of the Intel C compiler can be installed on the system at the same time - the version used is based upon which Intel C compiler modulefile is loaded.

The software stack of bwUniCluster 3.0 provides a number of modules. Users can also create their own modules. Modules may even be shared by users on a system, and users may have their own collection of modules to supplement or replace the global modules.

To see which modules are currently loaded/enabled one must execute

$ module list
No modules loaded

If the user has just logged in no modules should be loaded.

If a user has setup his/her environment for an Intel toolchain the output may look like this

$ module list

Currently Loaded Modules:
  1) compiler/intel/2023.1.0   2) numlib/mkl/2022.2.1   3) mpi/impi/2021.11

Usage

bwUniCluster 3.0 has been set up to use the Lmod module system. Lmod is a modern replacement of the older environment modules. The complete Lmod documentation can be found [[http://lmod.readthedocs.org/en/latest/][here]].

Getting help

The Lmod module command provides a manual page (man module) and a help command line option. Execute 'module help' or 'man module' for help on how to use Lmod software.

$ module help
Usage: module [options] sub-command [args ...]

Options:
  -h -? -H --help                   This help message
...
a lot of output
...
Lmod Web Sites

  Documentation:    https://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 https://lmod.readthedocs.io/en/latest/075_bug_reporting.html

Modules based on Lua: Version 8.7.55 2024-12-13 12:24 -07:00
    by Robert McLay mclay@tacc.utexas.edu

To get help for a particular module, e.g. the default GNU compiler, run

$ module help compiler/gnu

------------- Module Specific Help for "compiler/gnu/14.2" -------------------------------
This module provides the GNU compiler collection version 14.2.0 via commands
gcc, g++, gfortran and gccgo. The GNU compiler has been build with the libraries
gmp (6.3.0), mpfr (4.2.1), mpc (1.3.1) and isl (0.27).
This compiler supports offloating OpenACC and OpenMP to NVIDIA CUDA using -foffload.

cpp      - GNU pre processor
gcc      - GNU C compiler
g++      - GNU C++ compiler
gfortran - GNU Fortran compiler (Fortran 95/2003/2008 plus legacy Fortran 77)
gccgo    - GNU Google's Go language

Libraries can be found in
  \$GNU_HOME/lib64 = $env(GNU_HOME)/lib64
One may require additionally libraries installed in
  \$GNU_HOME/lib   = $env(GNU_HOME)/lib

Local documentation:
  See commands 'man cpp', 'man gcc', 'man g++' and 'man gfortran'.

Online documentation:
  https://gcc.gnu.org/onlinedocs/

For details on library and include dirs please call
    module show

The man pages, environment variables and compiler commands
are available after loading '[module-info name]'.

In case of problems, submit a trouble ticket at 'https://bw-support.scc.kit.edu'.

The full version is: compiler/gnu/14.2.0

Display all available Modules

bwUniCluster3.0 comes with a variety of modules pre-installed. Some of these modules may not be available for all users, due to licensing restrictions. You can display all available modules by running:

$ module avail

Due to the fact that some modules depend on other modules, some modules may not be shown as available all the time. To get a complete list of all possible modules use the module spider command.

Module categories, versions and defaults

The bwHPC clusters traditionally provide a large variety of software and software versions. Therefore modules are divided into category folders containing subfolders of modulefiles again containing modulefile versions, and must be addressed as follows:

category/softwarename/version

For instance all versions of the Intel compiler belong to the category compiler, thus the corresponding modulefiles are placed under the category compiler and intel.

In case of multiple software versions, one version will be defined as the default version. The Module of the default can be addressed by simply omitting the version number:

category/softwarename

Please be aware, that the default version may change over time.

Finding software Modules

Currently all bwUniCluster 3.0 software packages are assigned to the following Module categories (???):

  • bio
  • cae
  • chem
  • compiler
  • devel
  • lib
  • math
  • mpi
  • numlib
  • phys
  • system
  • toolkit
  • vis

You can selectively list software in one of those categories using, e.g. for the category "compiler"

$ module avail compiler

Searches with module avail are substring searches and will return any module with the string in its name.

Loading Modules

To use a software provided through modules in your environment, run:

$ module load category/softwarename/version

or

$ module add category/softwarename/version

Loading a Module in this manner affects your environment only for the current session or until you unload the module again

module conflicts

For some software, it doesn't make sense to provide multiple versions of the same software in the same environment. For this reason, module will automatically unload a conflicting version of the same software, e.g. loading the Intel compiler in version X while Intel compiler in version Y is loaded leads to an automatic unloading of Intel compiler in version Y.

Showing the changes introduced by a Module

Loading a module will change the environment of the current shell session. For instance the $PATH variable will be expanded by the software's bin directory. Other module variables may even change the behavior of the current shell session or the software program(s) in a more drastic way.

All the changes to the current shell session to be invoked by loading the module can be reviewed using 'module show category/softwarename/version', if version is omitted, information for the default version will be shown, e.g. for the default GNU compiler

$ module show compiler/gnu
-------------------------------------------------------------------------------------------------------
   /opt/bwhpc/common/modulefiles/Core/compiler/gnu/13.3.lua:
-------------------------------------------------------------------------------------------------------
setenv("GNU_VERSION","13.3.0")
setenv("GNU_HOME","/opt/bwhpc/common/compiler/gnu/13.3.0")
setenv("GNU_BIN_DIR","/opt/bwhpc/common/compiler/gnu/13.3.0/bin")
setenv("GNU_LIB_DIR","/opt/bwhpc/common/compiler/gnu/13.3.0/lib64")
setenv("GNU_INC_DIR","/opt/bwhpc/common/compiler/gnu/13.3.0/include")
setenv("GNU_MAN_DIR","/opt/bwhpc/common/compiler/gnu/13.3.0/share/man")
prepend_path("PATH","/opt/bwhpc/common/compiler/gnu/13.3.0/bin")
prepend_path("LD_LIBRARY_PATH","/opt/bwhpc/common/compiler/gnu/13.3.0/lib64")
prepend_path("MANPATH","/opt/bwhpc/common/compiler/gnu/13.3.0/share/man")
conflict("compiler/intel")
conflict("compiler/pgi")
whatis("GNU compiler suite version 13.3.0  (gcc, g++, gfortran, gccgo) including LTO and JIT ")
help([[This module provides the GNU compiler collection version 13.3.0 via commands
gcc, g++, gfortran and gccgo. The GNU compiler has been build with the libraries
gmp (6.3.0), mpfr (4.2.1), mpc (1.3.1) and isl (0.26).
This compiler supports offloating OpenACC and OpenMP to NVIDIA CUDA using -foffload.

cpp      - GNU pre processor
gcc      - GNU C compiler
g++      - GNU C++ compiler
gfortran - GNU Fortran compiler (Fortran 95/2003/2008 plus legacy Fortran 77)
gccgo    - GNU Google's Go language

Libraries can be found in
  \$GNU_HOME/lib64 = $env(GNU_HOME)/lib64
One may require additionally libraries installed in
  \$GNU_HOME/lib   = $env(GNU_HOME)/lib

Local documentation:
  See commands 'man cpp', 'man gcc', 'man g++' and 'man gfortran'.

Online documentation:
  https://gcc.gnu.org/onlinedocs/

For details on library and include dirs please call
    module show [module-info name]

The man pages, environment variables and compiler commands
are available after loading '[module-info name]'.

In case of problems, submit a trouble ticket at 'https://bw-support.scc.kit.edu'.

The full version is: compiler/gnu/13.3.0

]])
prepend_path("MODULEPATH","/software/bwhpc/common/modulefiles/Compiler/gnu/13.3")
family("compiler")

Dependencies between modules

Most modern software depends on shared libraries. Shared libraries must be accesible during the runtime of the software. This is true for basic OS libraries as well as for more specialized libraries like math or communication libraries. For basic OS libraries, one version is usually enough for all software running on a system. For the more specialized libraries, different user may prefer different versions or even implementations of these libraries. Theses situations can be represented using modules. The modules contain the information, what tools are necessary to run a specific software and load all required software automatically.

Unloading Modules

To unload or remove a module run:

$ module unload category/softwarename/version

or

$ module remove category/softwarename/version

Unloading all loaded modules

  1. Purge

    Loading different modules may lead to a expansive list of modules, especially when using EasyBuild. To unload all currently loaded modules use the 'module purge' command like this:

    $ module list
    Currently Loaded Modules:
      1) compiler/intel/19.1   2) mpi/impi/2019   3) numlib/mkl/2019
    $ module purge
    $ module list
    No modules loaded
    

    Be aware that 'module purge' is working without any further inquiry.

Display your loaded Modules

All currently loaded modules can be displayed using the 'module list' command. See example above.

Display all possible Modules

Some of the modules may not be visible with the 'module avail' command to due to unmet dependencies. All available and currently not available modules can be listed using the 'module spider' command:

$ module spider
-----------------------------------------------------------------------------------------------
The following is a list of the modules and extensions currently available:
-----------------------------------------------------------------------------------------------
  compiler/gnu: compiler/gnu/11.4, compiler/gnu/14.2

  devel/code-server: devel/code-server/4.96.4

  devel/cuda: devel/cuda/12.8

  ... long list of modules and versions ...

To learn more about a package execute:

   $ module spider Foo

where "Foo" is the name of a module.

To find detailed information about a particular package you
must specify the version if there is more than one version:

   $ module spider Foo/11.1

-----------------------------------------------------------------------------------------------

To see all versions of a software in a category use 'module spider category/name/'

$ module spider compiler/gnu

-----------------------------------------------------------------------------------------------
  compiler/gnu:
-----------------------------------------------------------------------------------------------
     Versions:
        compiler/gnu/11.4
        compiler/gnu/14.2

-----------------------------------------------------------------------------------------------
  For detailed information about a specific "compiler/gnu" package (including how to load the modules) use the module's full name.
  Note that names that have a trailing (E) are extensions provided by other modules.
  For example:

     $ module spider compiler/gnu/14.2
-----------------------------------------------------------------------------------------------

module spider may be used to show the dependencies of the module. For example, you can see which modules need to be loaded before loading the module mpi/impi/2021.11 is possible

$ module spider mpi/impi/2021.11

----------------------------------------------------------------------
  mpi/impi: mpi/impi/2021.11
----------------------------------------------------------------------

    You will need to load all module(s) on any one of the lines below before the "mpi/impi/2021.11" module is available to load.

      compiler/intel/2021.4.0
      compiler/intel/2021.4.0_llvm
      compiler/intel/2022.2.1
      compiler/intel/2022.2.1_llvm
      compiler/intel/2023.1.0
      compiler/intel/2023.1.0_llvm
      compiler/intel/2024.0_llvm

    Help:
      Intel MPI Library version 2021.11

      From the product website
      (https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/mpi-library.html):

      Intel MPI Library
      Deliver flexible, efficient, and scalable cluster messaging.

      One Library with Multiple Fabric Support
      Intel MPI Library is a multifabric message-passing library that implements the
      open-source MPICH specification. Use the library to create, maintain, and test
      advanced, complex applications that perform better on high-performance
      computing (HPC) clusters based on Intel processors.

      * Develop applications that can run on multiple cluster interconnects that you
        choose at run time.
      * Quickly deliver maximum end-user performance without having to change the
        software or operating environment.
      * Achieve the best latency, bandwidth, and scalability through automatic tuning
        for the latest Intel platforms.
      * Reduce the time to market by linking to one library and deploying on the
        latest optimized fabrics.

EasyBuild modules

With bwUniCluster 3.0 we start an official beta-test to provide toolchains and scientific software built with EasyBuild. EasyBuild is a well established and consistent way to provide scientific software at many HPC sites all over the world. Since the naming of Easybuild modules is consistent users can use modules with the same name at different sites. To make this possible, Easybuild software minimizes the resources used by the local operating system and provides most software independently. This makes scientific results more reproducible.

Using EasyBuild modules

Users interested in using easyBuild modules need to add the Easybuild module paths to their module environment. This can be done using

source /opt/bwhpc/common/etc/easybuild/enable_eb_modules

Now users have acces to a comlete Easybuild module tree, providing compiler toolchains, libraries, and scientific software. The same module commands described above can be used for EasyBuild modules. They can be loaded and unloaded in the same way. Please try not to mix Easybuild modules with the standard modules. There may be unintended consequences. It's always a good idea to purge all modules before loading new ones. If you want to use easybuild modules in your jobscripts, please make sure to enable them in your jobscript as well.

To hide the EasyBuild modules again, run:

source /opt/bwhpc/common/etc/easybuild/disable_eb_modules

or start again with a clean shell

EasyBuild conventions

In theory one could build every software against every library and every compiler. This would lead to an unmaintainable amount of combinations. For this reason the EasyBuild team has decided to provide two so called toolchains a year for the most common compiler suits. Each toolchain defines one version of compiler, MPI library, math libraries and other packages as default for all software build aginst this toolchain. On bwUniCluster 3.0 we start with 3 foss, 3 intel and one nvhpc toolchains. For a complete list of EasyBuild toolchains, please see the EasyBuild website. Currently the 2023a, 2023b, and 2024a toolchains are available, with 2024a being the default one. Some software may not be available for the latest toolchain yet, but may be available for an older toolchain.

EasyBuild currently supports almost 4000 software packages. We can and will only provide a subset, of course. As a start, we provide current versions of popular software packages form bwUniCluster 2.0. Updating and extending EasyBuild packages is a community effort, which should make providing new software easier. We try to provide additional packages if users request the installation. If we can't provide the software you can still use the advantages of EasyBuild by using it to build your private version.

Build individual EasyBuild packages as a user

EasyBuild can also be used to compile your own or niche software, based on the available EasyBuild files by creating an independent EasyBuild software and module tree. The bwUnicluster 3.0 EasyBuild tree can be used as a base to build additional software in your home directory.

We assume the following

[basic]
robot=<path_to_your_home>/eb/easybuild-easyconfigs/easybuild/easyconfigs
[config]
modules-tool: Lmod
prefix=<path_to_your_home>/eb
buildpath=/scratch/build
[override]
allow-modules-tool-mismatch=True
  • add system-wide easybuild module path
source /opt/bwhpc/common/etc/easybuild/enable_eb_modules
  • add local module path
mkdir -p ~/eb/modules/all
module use ~/eb/modules/all
  • find or create easybuild file, you can use any of the easybild
ls ~/eb/easybuild-easyconfigs/easybuild/easyconfigs/*/* | grep eb$
  • build your software with EasyBuild
eb cowsay-3.04.eb
  • use your software
$ module load cowsay
$ cowsay "Hello EasyBuild"
 _________________
< Hello EasyBuild >
 -----------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

How do Modules work?

The default shell on the bwUniCluster 3.0 is bash, so explanations and examples will be shown for bash. In general, programs cannot modify the environment of the shell they are being run from, so how can the module command do exactly that? The module command is not a program, but a bash-function. You can view its content using:

$ type module

and you will get the following result:

$ type module
module is a function
module ()
{
    eval $($LMOD_CMD bash "$@");
    [ $? = 0 ] && eval $(${LMOD_SETTARG_CMD:-:} -s sh)
}

In this function, lmod is called. Its output to stdout is then executed inside your current shell using the bash-internal eval command. As a consequence, all output that you see from the module is transmitted via stderr (output handle 2) or in some cases even stdin (output handle 0). back to top