From wiki
Jump to: navigation, search


Environment modules, to give them their full proper name, are quite and old package, but still extremely useful in cluster environments.


  • 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


  • 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)