Difference between revisions of "Modules"

From HPC Wiki
Jump to navigation Jump to search
(Created page with "The module system is a program, running on most supercomputers, that simplifies using different software in a precise and controlled manner. Oftentimes a supercomputer has mor...")
 
m
Line 1: Line 1:
 
The module system is a program, running on most supercomputers, that simplifies using different software in a precise and controlled manner. Oftentimes a supercomputer has more software installed than the average user will ever use. Frequently there are also multiple version of the same program available at the same time, to enable backward compatibility. A prominent example of this are [[Compiler|Compilers]], which sometimes have the tendency to break older programs with new versions.
 
The module system is a program, running on most supercomputers, that simplifies using different software in a precise and controlled manner. Oftentimes a supercomputer has more software installed than the average user will ever use. Frequently there are also multiple version of the same program available at the same time, to enable backward compatibility. A prominent example of this are [[Compiler|Compilers]], which sometimes have the tendency to break older programs with new versions.
  
== Basic usage ==
+
== Usage ==
 
To get a list of all currently loaded modules, one can employ
 
To get a list of all currently loaded modules, one can employ
 
  $ module list
 
  $ module list
Line 16: Line 16:
 
to load or unload module x or  
 
to load or unload module x or  
 
  $ module switch x y
 
  $ module switch x y
to switch out module x for module y. This is especially useful, to switch to a different version of the same program
+
to switch out module x for module y. Switching is especially useful, to switch to a different version of the same program.
  
Since a lot of applications rely on 3rd party software, there is a program on most supercomputers, called the [[Modules|Module system]]. With this system, other software, like compilers or special math libraries, are easily loadable and usable. Depending on the institution, different modules might be available, but there are usually common ones like the [[Intel Compiler|Intel]] or [[GCC]] Compilers.
+
If you recurrently need lots of modules, this loading can be automated with an [[sh-file]], so that you just have to execute the file once and it loads all modules, you need.
  
If you recurrently need lots of modules, this loading can be automated with an [[sh-file]], so that you just have to execute the file once and it loads all modules, you need.
+
Using these commands, the module system takes care to set all the system variables, so the desired applications are referenced and called correctly.

Revision as of 16:58, 19 March 2018

The module system is a program, running on most supercomputers, that simplifies using different software in a precise and controlled manner. Oftentimes a supercomputer has more software installed than the average user will ever use. Frequently there are also multiple version of the same program available at the same time, to enable backward compatibility. A prominent example of this are Compilers, which sometimes have the tendency to break older programs with new versions.

Usage

To get a list of all currently loaded modules, one can employ

$ module list

and might receive something like:

Currently Loaded Modulefiles:
1) DEVELOP                3) intelmpi/2017.4
2) intel/16.0             4) likwid/system-default

detailing that from the DEVELOP group the Intel Compiler ICC in version 16, the Intel implementation of MPI in Version 2017.4 and the system default version of Likwid are currently loaded and usable.

Calling

$ module avail

lists all available (loadable) modules and module groups. With the information of these two commands, one can select module to load/unload/switch with

$ module load/unload x

to load or unload module x or

$ module switch x y

to switch out module x for module y. Switching is especially useful, to switch to a different version of the same program.

If you recurrently need lots of modules, this loading can be automated with an sh-file, so that you just have to execute the file once and it loads all modules, you need.

Using these commands, the module system takes care to set all the system variables, so the desired applications are referenced and called correctly.