---
title: "Modules"
canonical: "https://kb.uconn.edu/space/SH/28714860567/Modules"
format: markdown
---
# What are modules?

Modules are specific installations of software which are modularized and able to be loaded/unloaded into your environment. On your personal computer, you would typically have a single installation of each program in a globally accessible directory (e.g. /bin). On HPC, users require older/newer or even modified versions of software. The module system allows these different versions to coexist and to be easily brought into scope to suit the personalized needs of each user.


## **Viewing modules**

To see what software is available on the Storrs HPC, type:

```
module avail
```

To see versions of a specific software, type:

```
module avail <program_name>
```


Example:

```
[jth12345@login5 ~]$ module avail matlab
------------------------------------- /cm/shared/modulefiles -------------------------------------
matlab/R2022a  matlab/R2022b  matlab/R2023b  matlab/R2024b  matlab/R2025b
```


## **Loading software**

Ready to use software? To load it, use the following syntax:

```
module load <program_name>
```

This will add the program to your $PATH, making it usable from the command line. Similarly, if a modularized software is required in a submitted job, the line must be added to the SBATCH script.


Example:

1. Start an interactive session with `srun`

```
[jth12345@login5 ~]$ srun --ntasks=16 --nodes=1 --gres=gpu:1 --partition=general-gpu --pty bash
srun: job 24638565 queued and waiting for resources
srun: job 24638565 has been allocated resources
[jth12345@gpu40 ~]$ 
```

2. Find and load your desired module (ex: GROMACS)

```
[jth12345@gpu40 ~]$ module avail gromacs
------------------------------------- /cm/shared/modulefiles -------------------------------------
gromacs/2022.3/basic    gromacs/2023.1/gpu-mpi  gromacs/2023.5/gpu-plumed-mpi  
gromacs/2022.3/gpu      gromacs/2023.3/gpu      gromacs/2024.4/gpu             
gromacs/2022.3/gpu-mpi  gromacs/2023.3/l40      
gromacs/2023.1/gpu      gromacs/2023.5/gpu-mpi  
[jth12345@gpu40 ~]$ module load gromacs/2024.4/gpu
Loading gromacs/2024.4/gpu
  Loading requirement: pre-module post-module gcc/11.3.0 hwloc/1.11.11 tcl/8.6.12 sqlite3/3.39.0
    python/3.10.5 binutils/2.26 zlib/1.2.12 ucx/1.13.1 openmpi/4.1.4 fftw3/3.3.10 cuda/12.3
    blas/3.11.0 lapack/3.11.0
[jth12345@gpu40 ~]$ 
```

> ℹ️ Note: Many other modules were loaded alongside gromacs/2024.4/gpu. This is another advantage of the module system - it automatically handles software dependencies for you.

3. Get started!

```
[jth12345@gpu40 ~]$ gmx --version
                         :-) GROMACS - gmx, 2024.4 (-:

Executable:   /gpfs/sharedfs1/admin/hpc2.0/apps/gromacs/2024.4/gpu/bin/gmx
Data prefix:  /gpfs/sharedfs1/admin/hpc2.0/apps/gromacs/2024.4/gpu
Working dir:  /home/jth12345
Command line:
  gmx --version

GROMACS version:     2024.4
```


## **Unloading software**

There are two ways to unload modules. Individual modules can be unloaded with `module unload`. Note that this automatically unloads all orphaned dependencies.

```
[jth12345@gpu40 ~]$ module unload gromacs
Unloading gromacs/2024.4/gpu
  Unloading useless requirement: hwloc/1.11.11 python/3.10.5 tcl/8.6.12 sqlite3/3.39.0
    binutils/2.26 fftw3/3.3.10 openmpi/4.1.4 zlib/1.2.12 ucx/1.13.1 cuda/12.3 lapack/3.11.0
    gcc/11.3.0 blas/3.11.0 pre-module post-module
```

All active modules can be unloaded at once with the `module purge` command.

```
[jth12345@gpu40 ~]$ module purge
[jth12345@gpu40 ~]$ module list
No Modulefiles Currently Loaded
```


# **What becomes a module?**

Global modules are maintained by the HPC admins when:

1. They are common, a shared dependency, or software used by multiple groups
2. They are university-licensed programs that are available to all users.

When not available globally, we encourage users to create group modules in their PI’s [shared directory](https://kb.uconn.edu/space/SH/26034012236/Data+Storage+Guide#HPC-Storage-(short-term)) or within your /home directory for personal use. We recommend using conda to manage all programs supported by it. In particular, all Python scripts should be run through a conda installation. Please refer to the following guide for miniconda/Python on HPC: [https://kb.uconn.edu/space/SH/26079723879/Miniconda+Environment+Set+Up](https://kb.uconn.edu/space/SH/26079723879/Miniconda+Environment+Set+Up).

Programs are well-suited for modules if they are compiled from source, require a license, and/or are used by many people. Contact us at [hpc@uconn.edu](mailto:hpc@uconn.edu) if you are interested in getting a global module installed.

> 📝 If you would like to learn more, please check out our [Modules Guide](https://kb.uconn.edu/space/SH/26062356547/Modules+Guide).

> ℹ️ **Next:** [https://uconn.atlassian.net/wiki/spaces/SH/pages/28752281629](https://uconn.atlassian.net/wiki/spaces/SH/pages/28752281629)