Difference between revisions of "Environment-modules"
|  (Created page with "* the manually compiled version of environment-modules in marvin is found in /usr/local/Modules. It is a little buggy. Principally it cannot unload modules from with a module...") | |||
| Line 1: | Line 1: | ||
| + | = Introduction = | ||
| + | |||
| + | Environment modules, to give them their full proper name, are quite and old package, but still extremely useful in cluster environments. | ||
| + | |||
| + | = Aspects = | ||
| * the manually compiled version of environment-modules in marvin is found in /usr/local/Modules. It is a little buggy. Principally it cannot unload modules from with a module file. Module unloading must therefore be carried manually. | * the manually compiled version of environment-modules in marvin is found in /usr/local/Modules. It is a little buggy. Principally it cannot unload modules from with a module file. Module unloading must therefore be carried manually. | ||
| * default modules are set in the following file | * default modules are set in the following file | ||
|   /usr/local/Modules/3.2.10/init/.bashrc |   /usr/local/Modules/3.2.10/init/.bashrc | ||
| + | |||
| + | = Notes = | ||
| + | * Environment modules actually do alot of work when unloading a certain module. All its dependent modules are also unloaded. | ||
| + | |||
| + | = Script running trick = | ||
| + | |||
| + | There is a trick, which is ugly and does not work very well, bu enables a script to be run when a modules in loaded. The required line in the module file is: | ||
| + | |||
| + |  puts stdout "source /usr/local/Modules/modulefiles/tools/cd-hit/gitv0_5acf038/thisis.sh" | ||
| + | |||
| + | While this does indeed run the script, it does also appears to corrupt the environment a little, so that "module list" suddenly throws and error of the following sort: | ||
| + | |||
| + |  Currently Loaded Modulefiles: | ||
| + |  ModuleCmd_List.c(146):FATAL:996: The environment variables LOADEDMODULES and _LMFILES_ have inconsistent lengths. | ||
| + | |||
| + | The only way to get out of this is to log out of the terminal session (or screen/tmux window) | ||
Latest revision as of 18:00, 29 January 2018
Introduction
Environment modules, to give them their full proper name, are quite and old package, but still extremely useful in cluster environments.
Aspects
- the manually compiled version of environment-modules in marvin is found in /usr/local/Modules. It is a little buggy. Principally it cannot unload modules from with a module file. Module unloading must therefore be carried manually.
- default modules are set in the following file
/usr/local/Modules/3.2.10/init/.bashrc
Notes
- Environment modules actually do alot of work when unloading a certain module. All its dependent modules are also unloaded.
Script running trick
There is a trick, which is ugly and does not work very well, bu enables a script to be run when a modules in loaded. The required line in the module file is:
puts stdout "source /usr/local/Modules/modulefiles/tools/cd-hit/gitv0_5acf038/thisis.sh"
While this does indeed run the script, it does also appears to corrupt the environment a little, so that "module list" suddenly throws and error of the following sort:
Currently Loaded Modulefiles: ModuleCmd_List.c(146):FATAL:996: The environment variables LOADEDMODULES and _LMFILES_ have inconsistent lengths.
The only way to get out of this is to log out of the terminal session (or screen/tmux window)
