In Modules, how do I save my environment with a .modules file?

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.

For more on Modules, see On the research computing systems at IU, how do I use Modules to manage my software environment?

This is document bcxp in the Knowledge Base.
Last modified on 2018-01-12 17:08:40.

  • Fill out this form to submit your issue to the UITS Support Center.
  • Please note that you must be affiliated with Indiana University to receive support.
  • All fields are required.

Please provide your IU email address. If you currently have a problem receiving email at your IU account, enter an alternate email address.

  • Fill out this form to submit your comment to the IU Knowledge Base.
  • If you are affiliated with Indiana University and need help with a computing problem, please use the I need help with a computing problem section above, or contact your campus Support Center.

Please provide your IU email address. If you currently have a problem receiving email at your IU account, enter an alternate email address.