Bath HPC
Balena
- Getting Access
- Getting Started
- System Architecture
- Developer Guides
- Premium Accounts
- MPI Guide
- Training
- Scheduler
- Storage
- Software
- Environment Modules
- Getting Help
On a complex computer system like Balena which uses multiple versions of a wide range of software/applications the Environment Modules package provides for the dynamic modification of a user's environment via modulefiles. A module when activated essentially modifies the environment variables to point to the correct libraries and executables for that version of the application.
Environment variables that are typically modified include:-
PATH
MANPATH
LD_LIBRARY_PATH
LD_PRELOAD
LD_LIBRARY_LOAD
LD_RUN_PATH
MPI_HOME
You can use the following commands to adjust your environment:
module avail - shows available modules module load <module> - adds a module to your environment module list - list the modules loaded into your environment
These are described in more detail in the following.
List all available modulefiles in the current MODULEPATH which is by default set to Balena's shared modulefiles directory.
[user123@balena-02 ~]$ module avail ----------------------------------------------------------------- /cm/local/modulefiles ----------------------------------------------------------------- cluster-tools/7.0 dot ipmitool/1.8.13 module-info openldap use.own cmd freeipmi/1.3.4 module-git null shared version ------------------------------------------------------------------- /apps/modulefiles ------------------------------------------------------------------- allinea/ddt-map/4.2 cuda60/toolkit/6.0.37 gaussian09/intel/D.01-linda intel/mpi/64/5.0.1.035(default) allinea/reports/5.0 cuda65/blas/6.5.14 gromacs/cpu/dp/5.0.2 intel/mpi/mic/5.0.1.035 ansys/v150 cuda65/fft/6.5.14 gromacs/cpu/sp/5.0.2 matlab/2014b boost/gcc/1.57.0 cuda65/nsight/6.5.14 gromacs/cuda/5.0.2 openfoam/intel/2.3.x-svn-06112014 boost/intel/1.57.0 cuda65/profiler/6.5.14 intel/compiler/64/11.1.080 openmpi/gcc/1.8.4 crystal09/intel/1.0.1 cuda65/toolkit/6.5.14 intel/compiler/64/15.0.0.090(default) openmpi/intel/1.8.4 cuda60/blas/6.0.37 espresso/5.1 intel/compiler/mic/15.0.0.090 python/2.7.8 cuda60/fft/6.0.37 fftw3/intel/avx/3.3.4 intel/imb/4.0.2 python/3.4.2(default) cuda60/nsight/6.0.37 fftw3/intel/sse/3.3.4 intel/mkl/64/10.2.7 valgrind/3.10.0 cuda60/profiler/6.0.37 gaussian09/A.02 intel/mkl/64/11.2(default) vasp/intel/5.3.5 cuda60/tdk/331.62 gaussian09/intel/D.01 intel/mkl/mic/11.2
List all the currently loaded modules. A few modules are activated by default on Balena.
[user123@balena-02 ~]$ module list Currently Loaded Modulefiles: 1) gcc/4.8.2 2) slurm/14.03.0
Show information on what changes to your environment loading a given module will make.
[user123@balena-02 ~]$ module show openmpi/intel/1.8.4 ------------------------------------------------------------------- /apps/modulefiles/openmpi/intel/1.8.4: module-whatis adds OpenMPI to your environment variables conflict openmpi/gcc prereq intel/compiler/64/15.0.0.090 prereq slurm setenv MPIROOT /apps/openmpi/intel-2015/1.8.4 setenv MPI_HOME /apps/openmpi/intel-2015/1.8.4 setenv MPIRUN /apps/openmpi/intel-2015/1.8.4/bin/mpirun setenv MPI_RUN /apps/openmpi/intel-2015/1.8.4/bin/mpirun setenv CC mpicc setenv CXX mpiCC setenv F77 mpif77 setenv FC mpif90 setenv F90 mpif90 setenv F95 mpif90 prepend-path PATH /apps/openmpi/intel-2015/1.8.4/bin prepend-path MANPATH /apps/openmpi/intel-2015/1.8.4/share/man/ prepend-path LD_RUN_PATH /apps/openmpi/intel-2015/1.8.4/lib64 prepend-path LD_LIBRARY_PATH /apps/openmpi/intel-2015/1.8.4/lib64 prepend-path CPATH /apps/openmpi/intel-2015/1.8.4/include -------------------------------------------------------------------
Update your environment variables so that you can use the libraries and executables referred to by the name of that module. Once loaded, the module will be visible in the list output by the module list command.
[user123@balena-02 ~]$ module load intel/compiler [user123@balena-02 ~]$ module list Currently Loaded Modulefiles: 1) gcc/4.8.2 2) slurm/14.03.0 3) intel/compiler/64/15.0.0.090(default)
Undo the changes that a module made to your environment when it was loaded.
[user123@balena-02 ~]$ module load intel/compiler [user123@balena-02 ~]$ module list Currently Loaded Modulefiles: 1) gcc/4.8.2 2) slurm/14.03.0 3) intel/compiler/64/15.0.0.090(default) [user123@balena-02 ~]$ module unload intel/compiler [user123@balena-02 ~]$ module list Currently Loaded Modulefiles: 1) gcc/4.8.2 2) slurm/14.03.0