Using Environment Modules on the CS Linux Machines

Current configurations for our Linux machines include support for “environment modules” (provided via the Modules package), aimed at making it easy for users to configure their environments for applications that need something beyond the standard setup. (Usually this involves changes or additions to environment variables such as the one that defines the search path.) For example, there is a module for the non-default version of gcc, and others for optional applications such MPI. man module gives full details, but briefly:

If you want to load a particular module file or files every time you start a new shell (by logging in or opening a terminal window), you can put the module load command in your .bashrc file. Be advised that not all modules are available on all systems, so this may result in an error message when you start a new shell. If this bothers you, you could instead put something such as the following in your .bashrc file:

if [ -f /etc/modulefiles/gcc-latest ]
module load gcc-latest