HOWTO for modules:
When you login to odyssey, you will find a minimal environment setup.
"modules", a common utility for managing paths as sets of environment variables. This package allows the user to activate or disable entire sets of environment variables and paths needed for a package using a single command, and greatly simplifies managing your shell environment, particularly when using multiple types and versions of compilers and libraries.
Interactive module loading
To begin, you can list the available modules by executing the command
> module avail
All the available modules are listed.
To limit the list of available modules in the search, type the first few letters of the module you are looking for. For example, if you know that you want an hpc module, type
> module avail hpc
and all the modules beginning with “hpc” are listed. Note this only works if you know how the string for the module begins. It will not search on arbitrary strings within the module name.
__ Runtime Usage ___
To enable a particular module in your current shell environment, you can use the "load" subcommand:
> module load [a module name]
Many (but not all) module names of interest to NNIN/C users begin with “/hpc” (for high performance computing), hence, for example, to load the Intel v11 compilers along with the math kernel library, you would type:
> module load /hpc/intel-mkl-18.104.22.168
This will overlay the environment for this module on the current environment, often pre-pending paths to PATH environment variables such as PATH and LD_LIBRARY_PATH.
To remove this module, use the "unload" subcommand:
> module load [a module name]
This will cleanly remove those added PATHs and environment variables, returning to the original environment.
To list your _current_ environment, use the "list" subcommand:
> module list
this will list the currently loaded modules.
__Usage for Init Scripts__
The previous changes will allow you to manage your environment in the current shell, but will not affect other shells, or new shells.
Modifying your default environment
To manage your default environment through module, begin by adding to the end of your ~/.bashrc or ~/.cshrc startup script the line
module load null
This line is a place holder for loading other modules; the "null" module actually does nothing in and of itself to your environment.
Next, to add a module to your default environment, use the command
> module initadd [module name]
This will alter the line at the end of your startup script to include this module as well. In this way you can manage your default environment through modules 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.
To learn more about the module command, run
> module --help
> man module
environments. Modules are simply snippets of TCL code placed in a certain directory. For more information, check the manual pages.