Difference between revisions of "User environment - The usage of module"

From HPC users
Jump to navigationJump to search
 
(3 intermediate revisions by 2 users not shown)
Line 10: Line 10:
To revert all changes made by a given module (environment variables, paths, etc.):
To revert all changes made by a given module (environment variables, paths, etc.):
  module unload <name of the module>
  module unload <name of the module>
You could also create a "state" of loaded modules that you prefer. Load every modules you want and safe the "state" with:
module store
If you loaded toomany, unneeded modules and want to go back to your safed "state", simply use following command:
module restore


You can unload '''all''' currently loaded modules with the command:
You can unload '''all''' currently loaded modules with the command:
  module purge
  module purge


'''Keep in mind that you have to load "hpc-uniol-env" after that too load any new modules!'''
'''Keep in mind that you first have to load "shared" and then "hpc-uniol-env", otherwise the paths to all available modules arent set!'''


A short overview of the options are given in following table (a full list you can get by ''module help'')
A short overview of the options are given in following table (a full list you can get by ''module help'')
Line 32: Line 26:
| Shows a list of all available modules. Optionally one can specify a ''prefix'' to limit the output, e.g. ''module avail netcdf'' will show only available modules of netcdf.  
| Shows a list of all available modules. Optionally one can specify a ''prefix'' to limit the output, e.g. ''module avail netcdf'' will show only available modules of netcdf.  
|-
|-
| ''clear''
| ''purge''
| Remove all loaded modules.  
| Remove all loaded modules.  
|-
|-

Latest revision as of 17:10, 21 February 2017

We use the module environment, which has a lot of advantages, is very flexible (and user-friendly), and even allows one to use different versions of the same software concurrently on the same system. You can see a list of all available modules by typing

module avail

To load a given module:

module load <name of the module>

The modules system uses a hierarchical file structure, i.e., sometimes (whenever there are ambiguities) you may have to specify a path, as in:

module load ics/2013_sp1.3.174/64

To revert all changes made by a given module (environment variables, paths, etc.):

module unload <name of the module>

You can unload all currently loaded modules with the command:

module purge

Keep in mind that you first have to load "shared" and then "hpc-uniol-env", otherwise the paths to all available modules arent set!

A short overview of the options are given in following table (a full list you can get by module help)

Option Description
avail [<prefix>] Shows a list of all available modules. Optionally one can specify a prefix to limit the output, e.g. module avail netcdf will show only available modules of netcdf.
purge Remove all loaded modules.
help Returns a short help with all available options of the command module.
list Print a list with all loaded modules.
load <module_name> Loads the module module_name. If the name includes not the full module name (separated by /) then the latest version of the software is loaded.
show <module_name> Shows additional information about a specific module, e.g. pathen and environment variables set by the module.
unload <module_name> Remove the module module_name.