Topics Map > •Research Computing

CRC Customizing Your Environment with the Module Command

CRC Customizing Your Environment with the Module Command

It is best practice to only call the module command on login nodes before launching jobs.  Environments variables are set via the module command and can be inherited by your job via a batch script so the environment variables will be visible on the compute nodes. For assistance with module, type man module.

To allow SLURM to inherit environment variables you will need to use the following respective statements within your batch scripts. Please see SLURM documentation for more clarification.

#SBATCH --export=ALL


Each user can customize their environment using the module command. This command lets you select software and will source the appropriate paths and libraries. All the requested user applications are located under the /opt/apps directory.

The examples here are taken from the NOTS cluster, but we use the module package on all our clusters in the same manner.

To list what applications are available, use the avail sub command:

$ module avail ---------------------------- /opt/apps/modulefiles ----------------------------- R/2.13.1          lammps/14Aug11    openmpi/1.4.3-gcc xlc/11.1 amber/11          libhugetlbfs      openmpi/1.4.3-ibm xlf/13.1 at/3.0            meme/4.6.1        papi/ fftw/3.2.2        namd/2.8b2        python3/3.2.1 ibm               opencl/0.3        vmd/1.9

To see a description of each package, use the whatis sub command:

$ module whatis at/3.0               : Advance Toolchain is a set of GNU utilites optimized for POWER7 fftw/3.2.2           : Fastest Fourier Transformation in the West ibm                  : IBM Optimizing Compilers lammps/14Aug11       : LAMMPS Molecular Dynamics Simulator libhugetlbfs         : A library that provides easy access to huge (16MB) pages meme/4.6.1           : MEME Tool for discovering motifs in a group of DNA or protein sequences namd/2.8b2           : NAMD molecular dynamics package opencl/0.3           : IBM OpenCL SDK openmpi/1.4.3-gcc    : Message Passing Interface openmpi/1.4.3-ibm    : Message Passing Interface compiled natively with IBM Compilers vmd/1.9              : Visual Molecular Dynamics package xlc/11.1             : IBM C and C++ Optimizing Compilers xlf/13.1             : IBM Fortran77 and Fortran90 Optimizing Compilers

To load the module for the IBM compilers, for example, use the load sub command:

$ module load ibm

To see a list of modules that you have loaded, use this command:

$ module list

To unload all of your modules, use this command:

$ module purge

KeywordsCRC Customizing Your Environment with the Module Command   Doc ID108442
OwnerJoseph G.GroupRice U
Created2021-01-19 16:04:26Updated2024-04-22 15:13:33
SitesRice University
Feedback  8   8