You can list all of the software components available using the spider option:
- $ module spider # (spyder is also acceptable spelling)
- [output suppressed]
There is also an avail option, however, this option, unlike spider will only show available modules that do not conflict with your currently configured options. Assuming we do not have anything already configured with lmod, the avail option will display mainly the available compilers and other utilities that do not depend upon a particular compiler. Here is an (edited) example of the listing you will see:
- $ module avail
- ---------------------------- /opt/ohpc/pub/modulefiles ------------------------------
- EasyBuild/3.9.2 cmake/3.14.3 gnu8/8.3.0 llvm5/5.0.1 autotools
- autotools gnu/5.4.0 hwloc/2.0.3 papi/5.7.0 singularity/3.2.1
- charliecloud/0.9.7 gnu7/7.3.0 intel/19.0.4.243 pmix/2.2.2 valgrind/3.15.0
The load command will enable a software package within your shell environment. If there is only a single package version available, it suffices to use the package name, e.g. gnu8, without specifying the particular version: gnu8/8.3.0. The following loads autotools, cmake, and gnu8:
$ module load autotools cmake gnu8
Currently loaded modules can be displayed with list:
$ module list
Currently Loaded Modules:
1) autotools 2) cmake/3.14.3 3) gnu8/8.3.0
If a package is no longer needed, it can be unloaded:
- $ module unload autotools
- $ module list
Currently Loaded Modules:
1) cmake/3.14.3 2) gnu8/8.3.0
Running avail again will now show available modules that have gnu8 as a dependency:
- $ module avail
-
- --------------- /opt/ohpc/pub/moduledeps/gnu8 -----------------
- R/3.5.3 impi/2019.4.243 mpich/3.3 openblas/0.3.5 plasma/2.8.0 scotch/6.0.6
- gsl/2.5 likwid/4.3.4 mvapich2/2.3.1 openmpi3/3.1.4 py2-numpy/1.15.3 superlu/5.2.1
- hdf5/1.10.5 metis/5.1.0 ocr/1.0.1 pdtoolkit/3.25 py3-numpy/1.15.3
We can now load an MPI package:
- $ module load openmpi3
- $ module list
Currently Loaded Modules:
1) cmake/3.14.3 2) gnu8/8.3.0 3) openmpi3/3.1.4
We can use swap to change to another MPI implementation:
- $ module swap openmpi3 mvapich2
- $ module list
Currently Loaded Modules:
1) cmake/3.14.3 2) gnu8/8.3.0 3) mvapich2/2.3.1
The purge command will unload all current modules:
- $ module purge
- $ module list
No modules loaded
This is useful at the beginning of batch scripts to prevent the batch shell from unintentionally inheriting a module environment from the submission shell.
|