Environment "Modules" on Blue Waters
Module as installed on Blue Waters
Cray computer systems use the "modules" package so that individual users can easily load and unload software packages. It allows multiple versions of software to be installed simultaneously; the user can choose which version to use while compiling code or running their jobs.
Users mostly don't have to understand the details of this process. To load software or to load the correct version, users load modules using variations on the system "module" command, as follows. Module commands are of the form "module <subcommand> <modulename>" or else "module <subcommand> <modulename> <modulename>". Available sub-commands include: available, list, load, unload, show, and swap.
"module available" to list all modules available on the system
"module list" tells you all modules you currently have loaded
"module load XXX" loads module XXX into your software environment.
"module unload XXX" unloads a conflicting module. Avoid using this command to change programming environment.
"module swap XXX/1.2.3 XXX/1.2.2" swaps a module for a different version of the same module
"module swap PrgEnv-cray PrgEnv-pgi" swaps one compiler environment for another.
"module show XXX" will list details about what a module sets and does when it's loaded. Mostly you shouldn't need to use this, but sometimes you need to set a Makefile path explicitly, and this command will reveal those details.
Making module settings permanent
The modules that a user has loaded are persistent as long as you're logged in. Those changes go away when you log out and log back in, unless you set them up to be loaded upon every login. To make them permanent, edit the .modules file in your home directory and add whatever "module load XXX" commands to that file.
Do NOT use "module purge"
The modules system on Blue Waters has a number of modules that are carefully tuned to the hardware and to the OS and make everything all work together when the code is run on the compute nodes. All our documentation is assuming that you're running the default module set, with selected "module load X" to get packages that you need, or "module swap" to change programming environments and module versions, or perhaps an occasional "module unload" if something conflicts. If you run the command "module purge" then you remove all of that default environment. By doing so you're making very strange changes to your environment; things won't work right and it will be very difficult to help you if you need something from us.
NCSA Module Improvements
NCSA has created and installed a set of shell scripts that improve the "modules" interface for all Blue Waters users. For details please Module Improvements page in the user guide.
The ~/.modulerc file functionality does not work with the Cray version of modules. You will see the following error message. Please use ~/.modules file.
locate_module.c(1089):ERROR:106: Magic cookie '#%Module' missing in '/u/staff/gbauer/.modulerc'