NCSA Home
Contact Us Intranet

Managing Your Environment (Modules)

User Information Home
Data
Security
Allocations
Consulting
Training

NCSA's Help Desk is available 24 hours a day, seven days a week, 365 days a year:
help.ncsa.illinois.edu
217-244-0710
help@ncsa.illinois.edu

The "module" command is a user interface to the Modules package. The Modules package provides for the dynamic modification of the user's environment via modulefiles. The "module" command is independent of the user's shell, so both tcsh and bash users can use the same commands to change the environment.

Useful Module Commands

  • To list the available modulesfiles, type module avail.
  • To list the current modulesfiles that you have loaded, type module list.
  • To see a brief description about a particular modulefile, type module help followed by the modulefile name.
    [ncsa ~]$ module help intel/12.0.4
    
    ----------- Module Specific Help for 'intel/12.0.4' ---------------
    
    The intel/12.0.4 modulefile defines the default system paths and
    environment variables needed to use the intel/12.0.4 libraries and tools.
    
    
    
  • To see what environment changes are made by a particular module file, type module display followed by the modulefile name.

    For example, for the modulefile uberftp-client-2.6 the following is shown when using the display subcommand
    
    [ncsa ~]$ module display uberftp-client-2.6
    -------------------------------------------------------------------
    /usr/local/modules.forge/ncsa/uberftp-client-2.6:
    
    module-whatis    uberftp client 2.6 
    prepend-path     MANPATH /usr/local/uberftp-client-2.6/man 
    prepend-path     PATH /usr/local/uberftp-client-2.6/bin 
    -------------------------------------------------------------------
    
    
    
  • The following module commands are used to modify your environment in the current shell.

    Syntax:

        module load modulefile
        module unload modulefile
        module swap modulefile1 modulefile2
    

    The module load command loads a specific module.
    The module unload will unload a specific module.
    The module swap swaps one module for another module.

    For example if a user had previous loaded the fftw modulefile(fftw/2.1.5/intel/mvapich2-1.7rc1) in their environment and they want to use fftw/3.3.0/intel/mvapich2-1.7rc1, the swap subcommand is available for changing fftw versions within user's environment.

       [ncsa ~]$ module swap   fftw/2.1.5/intel/mvapich2-1.7rc1 fftw/3.3.0/intel/mvapich2-1.7rc1
    

    While the swap subcommand unloads one module and loads another the load and unload subcommands are available individually to allow users to modify their environment as needed.

       [ncsa ~]$ module load java-sun-1.7 
    
       [ncsa ~]$ module unload java-sun-1.7 
    

  • If you need to reset your environment back to the system default, just login to the NCSA resource in new window or log out of your current window and when you log back in, your environment will be set to the system default.

  • To make a particular software package a part of your default environment, create a $HOME/.modules file and add the module commands to load the software. After saving your changes, you must log out and then log back in order for the changes to take effect.

    Note: Order is important. With each module load, the changes are prepended to your current enviroment paths.

Additional information on Modules

For more information, see the module and modulefile man pages, visit the Modules Project page on SourceForge.