Module null

Environment Modules [Physics & Astronomy Wiki]

Adding modules to your login scripts

The previous changes will allow you to manage your environment in the current shell environment, but will not affect other shells, or new shells. Thus running something like mpirun may not capture these settings, since the new shells spawned by mpirun may not get the same environment as the original shell.

To manage your default environment through modules, begin by adding to the end of your ~/.bashrc or ~/.cshrc startup script the line

module load null

The “null” module actually does nothing in and of itself; it merely provides a placeholder for the following commands to operate on. 

Can by unloading this module you restore the default environment? 

Next, to add a module to your default environment, use the command

module initadd [module name]

This will alter the “module load” line in your startup script (,bashrc in case of bash) to load this module at each shell invocation. In this way you can manage your default environment through the modules package without editing your startup scripts.

To disable a default module, use “initrm”

module initrm [module name]

This removes that module from the module line in your startup script.