ARCHIVED: Use a .modules file in your home directory to save your user environment on an IU research supercomputer

This content has been archived, and is no longer maintained by Indiana University. Information here may no longer be accurate, and links may no longer be available or reliable.

The Modules environment management system looks for a .modules file in your home directory whenever a new shell is opened. It will execute any module commands it finds there.

For example, if the Intel 13 and GCC 4.7 compilers are always wanted, but the Open MPI libraries might be either GNU or Intel, a typical .modules file might look like this:

  module load core
  module load gcc/4.7.2
  module load intel/13.0.1
  module load openmpi/intel/1.6.3
  # openmpi/gnu/1.6.3
  module load fftw/intel/3.3.3

Note that the # makes the entire line inactive.

To change between the modules, simply edit and source the file.

This is document bcxp in the Knowledge Base.
Last modified on 2023-04-21 16:57:01.