Access to many applications and libraries is controlled by the modules utility. The module
command allows you to easily manipulate your Linux environment to use various applications and programming libraries, sometimes including older or newer versions than the default. When you need to change your environment you simply add
or rm
modules. Here are some of the commands you’ll need.
List Available Software
[username@bisonnet-hpc ~]$ module avail --------------------------------- /software/etc/modulefiles ---------------------------------- DRAP/1.91(default) gaussian/16.B.01-avx2 python/2.7 gaussian/16.B.01(default) matlab/R2018a(default) python/3.6(default) gaussian/16.B.01-avx ncbi-blast/2.7.1+(default) R/3.5.0(default) ----------------------------------- /cm/local/modulefiles ------------------------------------ cluster-tools-ext/8.1 cm-scale/8.1 cmsub gcc/7.2.0 module-git openldap cluster-tools/8.1 cmd dot ipmitool/1.8.18 module-info shared cm-cloud-copy/8.1 cmsh freeipmi/1.5.7 lua/5.3.4 null ----------------------------------- /cm/shared/modulefiles ----------------------------------- acml/gcc-int64/64/5.3.1 cuda91/profiler/9.1.85 iozone/3_471 acml/gcc-int64/fma4/5.3.1 cuda91/toolkit/9.1.85 lapack/gcc/64/3.8.0 acml/gcc-int64/mp/64/5.3.1 default-environment mpich/ge/gcc/64/3.2.1 acml/gcc-int64/mp/fma4/5.3.1 fftw2/openmpi/gcc/64/double/2.1.5 mpiexec/0.84_432 acml/gcc/64/5.3.1 fftw2/openmpi/gcc/64/float/2.1.5 mvapich2/gcc/64/2.3b acml/gcc/fma4/5.3.1 fftw3/openmpi/gcc/64/3.3.7 netcdf/gcc/64/4.5.0 acml/gcc/mp/64/5.3.1 gdb/8.0.1 netperf/2.7.0 acml/gcc/mp/fma4/5.3.1 globalarrays/openmpi/gcc/64/5.6.1 openblas/dynamic(default) blacs/openmpi/gcc/64/1.1patch03 hdf5/1.10.1 openblas/dynamic/0.2.20 blas/gcc/64/3.8.0 hdf5_18/1.8.20 openmpi/gcc/64/1.10.7 bonnie++/1.97.3 hpl/2.2 scalapack/openmpi/gcc/64/2.0.2 cuda91/blas/9.1.85 hwloc/1.11.8 sge/2011.11p1 cuda91/fft/9.1.85 intel-tbb-oss/ia32/2018_20170919oss slurm/17.11.2 cuda91/nsight/9.1.85 intel-tbb-oss/intel64/2018_20170919oss torque/6.1.1
List Software In Your Environment
[username@bisonnet-hpc ~]$ module list Currently Loaded Modulefiles: 1) gcc/7.2.0 2) slurm/17.11.2 3) python/3.6(default)
Add Software to Your Environment
[username@bisonnet-hpc ~]$ module load python/3.6
You can also load the default version of a software package by dropping the version:
[username@bisonnet-hpc ~]$ module load python
Remove Software from Your Environment
[username@bisonnet-hpc ~]$ module unload python/3.6
Module Conflicts
Modules will prevent you from adding conflicting packages. For example, you’ll receive an error if you try to add two versions of Python to your environment. To change to a new version, either unload one version and load another or use the switch command:
[username@bisonnet-hpc ~]$ module list Currently Loaded Modulefiles: 1) python/3.6 [username@linuxremote1 ~]$ module switch python/2.7
Add Modules at Login
To add modules to your Linux environment that will load every time you login, use:
(NOTE: only run the echo command once; then just use initadd to add additional modules):
[username@bisonnet-hpc ~]$ echo "module add null" >> ~/.bashrc [username@bisonnet-hpc ~]$ module initadd python/3.6
Likewise, you can remove commands from your initial environment using:
[username@bisonnet-hpc ~]$ module initrm python/3.6
Additional Help
[username@bisonnet-hpc ~]$ module help