Lmod: Difference between revisions

From NU HPC Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 41: Line 41:
==== Using <code>module avail</code> ====
==== Using <code>module avail</code> ====
To see what modules you can load into your environment, enter the command <code>module avail</code>. With <code>OpenMPI/4.1.6-GCC-13.2.0</code>loaded, this will print a large number of available modules:<syntaxhighlight lang="bash">
To see what modules you can load into your environment, enter the command <code>module avail</code>. With <code>OpenMPI/4.1.6-GCC-13.2.0</code>loaded, this will print a large number of available modules:<syntaxhighlight lang="bash">
[hpcadmin@ln01 ~]$ module load OpenMPI/4.1.6-GCC-13.2.0
[hpcadmin@ln01 ~]$ module avail
[hpcadmin@ln01 ~]$ module list


Currently Loaded Modules:
----------------------------------------------------------------------------- /shared/opt/easybuild/modules/all -----------------------------------------------------------------------------
  1) GCCcore/13.2.0                 5) numactl/2.0.16-GCCcore-13.2.0     9) hwloc/2.9.2-GCCcore-13.2.0     13) libfabric/1.19.0-GCCcore-13.2.0
  AMD-uProf/3.5.671                                      PLUMED/2.7.3-foss-2021b                                          help2man/1.49.3-GCCcore-12.3.0
  2) zlib/1.2.13-GCCcore-13.2.0     6) XZ/5.4.4-GCCcore-13.2.0          10) OpenSSL/1.1                    14) PMIx/4.2.6-GCCcore-13.2.0
  AOCC/4.0.0-GCCcore-12.2.0                              PMIx/3.1.5-GCCcore-9.3.0                                        help2man/1.49.3-GCCcore-13.2.0         (D)
  3) binutils/2.40-GCCcore-13.2.0   7) libxml2/2.11.5-GCCcore-13.2.0     11) libevent/2.1.12-GCCcore-13.2.0 15) UCC/1.2.0-GCCcore-13.2.0
  ATK/2.38.0-GCCcore-11.3.0                              PMIx/3.2.3-GCCcore-10.3.0                                       hwloc/2.2.0-GCCcore-9.3.0
  4) GCC/13.2.0                     8) libpciaccess/0.17-GCCcore-13.2.0 12) UCX/1.15.0-GCCcore-13.2.0       16) OpenMPI/4.1.6-GCC-13.2.0
  Anaconda3/2022.05                                      PMIx/4.1.0-GCCcore-11.2.0                                       hwloc/2.2.0-GCCcore-10.2.0
 
  Autoconf/2.69-GCCcore-9.3.0                            PMIx/4.1.2-GCCcore-11.3.0                                       hwloc/2.4.1-GCCcore-10.3.0
</syntaxhighlight>
  Autoconf/2.69-GCCcore-10.2.0                            PMIx/4.2.2-GCCcore-12.2.0                                       hwloc/2.5.0-GCCcore-11.2.0
  Autoconf/2.71-GCCcore-10.3.0                            PMIx/4.2.6-GCCcore-13.2.0                               (L,D)   hwloc/2.7.1-GCCcore-11.3.0
  Autoconf/2.71-GCCcore-11.2.0                           PROJ/8.0.1-GCCcore-10.3.0                                        hwloc/2.8.0-GCCcore-12.2.0
  Autoconf/2.71-GCCcore-11.3.0                            PROJ/9.0.0-GCCcore-11.3.0                              (D)     hwloc/2.9.2-GCCcore-13.2.0             (L,D)
  Autoconf/2.71-GCCcore-12.2.0                           Pango/1.48.5-GCCcore-10.3.0                                      hypothesis/6.13.1-GCCcore-10.3.0
  Autoconf/2.71-GCCcore-12.3.0                           Pango/1.48.8-GCCcore-11.2.0                                      hypothesis/6.14.6-GCCcore-11.2.0
  Autoconf/2.71-GCCcore-13.2.0                   (D)     Pango/1.50.7-GCCcore-11.3.0                            (D)      hypothesis/6.46.7-GCCcore-11.3.0       (D)
 
</syntaxhighlight>To unload all your loaded modules, enter the command <code>module purge</code>. Then <code>module list</code>will return <code>No modules loaded</code>.

Revision as of 03:52, 3 July 2024

In linux environment variables are values that can change and impact how programs behave on a computer system. They are name-value pairs that all processes can access within a particular user environment or shell session. These variables provide a flexible and convenient method for managing system-wide settings, configuring applications, and customizing system behavior.

Shabyt uses Environment modules (also know as LMOD) to dynamically set up environment variables for different software. Module commands set, change, or delete environment variables that are needed for a particular software. The ‘module load‘ command will set PATH, LD_LIBRARY_PATH and other environment variables such that user may choose a desired version of applications or libraries more easily. More details can be found here.

Environment module commands
Command Description
module avail List of available software
module keyword [word] Search for available modules matching the keyword
module spider [word] Show the details of any modules matching the keyword
module whatis [module] Show the short description about module
module load [package1] [package2] Load the environment for the default version of the modulefile
module load [package]/[version] Load the environment for the specified version of module
module unload [package1] [package2] Unload previously loaded packages
module swap [moduleA] [moduleB] Unload modulefile A and load modulefile B
module list List any currently loaded module(s)
module purge Unload all currently loaded modules

Using module avail

To see what modules you can load into your environment, enter the command module avail. With OpenMPI/4.1.6-GCC-13.2.0loaded, this will print a large number of available modules:

[hpcadmin@ln01 ~]$ module avail

----------------------------------------------------------------------------- /shared/opt/easybuild/modules/all -----------------------------------------------------------------------------
   AMD-uProf/3.5.671                                       PLUMED/2.7.3-foss-2021b                                          help2man/1.49.3-GCCcore-12.3.0
   AOCC/4.0.0-GCCcore-12.2.0                               PMIx/3.1.5-GCCcore-9.3.0                                         help2man/1.49.3-GCCcore-13.2.0          (D)
   ATK/2.38.0-GCCcore-11.3.0                               PMIx/3.2.3-GCCcore-10.3.0                                        hwloc/2.2.0-GCCcore-9.3.0
   Anaconda3/2022.05                                       PMIx/4.1.0-GCCcore-11.2.0                                        hwloc/2.2.0-GCCcore-10.2.0
   Autoconf/2.69-GCCcore-9.3.0                             PMIx/4.1.2-GCCcore-11.3.0                                        hwloc/2.4.1-GCCcore-10.3.0
   Autoconf/2.69-GCCcore-10.2.0                            PMIx/4.2.2-GCCcore-12.2.0                                        hwloc/2.5.0-GCCcore-11.2.0
   Autoconf/2.71-GCCcore-10.3.0                            PMIx/4.2.6-GCCcore-13.2.0                               (L,D)    hwloc/2.7.1-GCCcore-11.3.0
   Autoconf/2.71-GCCcore-11.2.0                            PROJ/8.0.1-GCCcore-10.3.0                                        hwloc/2.8.0-GCCcore-12.2.0
   Autoconf/2.71-GCCcore-11.3.0                            PROJ/9.0.0-GCCcore-11.3.0                               (D)      hwloc/2.9.2-GCCcore-13.2.0              (L,D)
   Autoconf/2.71-GCCcore-12.2.0                            Pango/1.48.5-GCCcore-10.3.0                                      hypothesis/6.13.1-GCCcore-10.3.0
   Autoconf/2.71-GCCcore-12.3.0                            Pango/1.48.8-GCCcore-11.2.0                                      hypothesis/6.14.6-GCCcore-11.2.0
   Autoconf/2.71-GCCcore-13.2.0                   (D)      Pango/1.50.7-GCCcore-11.3.0                             (D)      hypothesis/6.46.7-GCCcore-11.3.0        (D)

To unload all your loaded modules, enter the command module purge. Then module listwill return No modules loaded.