> For the complete documentation index, see [llms.txt](https://doane-ccla.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doane-ccla.gitbook.io/docs/using-the-hpc/modules.md).

# Modules

Modules are a utility which allow users to load and manage applications and their versions. The modules of software packages allow you to dynamically modify your user environment by using “modulefiles.” Each modulefile contains the information needed to configure the shell for an application. After the module software package is initialized, the environment can be modified on a per-module basis using the module command, which interprets modulefiles. Typically, modulefiles instruct the module command to change or set shell environment variables such as `PATH`, `MANPATH`, and others. The modulefiles can be shared by many users on a system.

📝 **Note:** Some modules cannot be used simultaneously, such as an Intel compiler and a GNU compiler ([information on compilers](/docs/using-the-hpc/compilers.md)). If you attempt to *load* a module that is incompatible with a currently-loaded module, you will be prompted of the conflict. To avoid the error, you may have to *unload* or *switch* modules.

#### Summary of Module Commands

| Command         | Description                                                           |
| --------------- | --------------------------------------------------------------------- |
| module list     | Lists modules currently located in user's environment                 |
| module avail    | Lists all available modules on a system in condensed format           |
| module avail -l | Lists all available modules on a system in long format                |
| module display  | Shows environment changes that will be made by loading a given module |
| module load     | Loads a module                                                        |
| module unload   | Unloads a module                                                      |
| module help     | Shows help for a module                                               |
| module swap     | Swaps a currently loaded module for an unloaded module                |

**Modules: Local repository**\
&#x20;By default the local repository is used as a source of software installations. To list available modules, type `module avail`. To load a module, use `module load module_name`. Similarly, unload modules by typing `module unload module_name`.

## Available Modules

To see a list of available modules, type

```bash
module avail
```

📝 **Note:** If you need a module that is not available, please [contact us](/docs/support.md).

You can check for the existence of a module and its versions using `module avail <module-name>`.

```bash
$ module avail cuda

----------------- /software/dev_tools/swtree/cs400/modulefiles -----------------
cuda/6.5          cuda/7.5(default)       cuda/8.0
```

## Working with Modules

When you load a module, your environment is modified to use a specific software package. To load a module:

```bash
module load vmd
```

To verify your module has loaded, you can type `module list`.

To display information about the attributes of the module such as the size of the module, the compiler or the source from which the module was created, etc., use the following command:

```bash
module display your_module
```

## Removing and Switching Modules

Unloading a module will avoid conflict and/or messages of failure due to different versions or dependencies.

```bash
module unload your_module
```

Switching between different module versions can accomplish the task of having to load, unload and load modules in multiple steps. In the following example, `cuda/7.5` is currently loaded. After running the command, `cuda/7.5` is *unloaded* and `cuda/8.0` is *loaded*.

```bash
module switch cuda/7.5 cuda/8.0
```

You can unload all the modules on your environment, by executing the module purge command:

```bash
module purge
```

### Related Information

* [Environment Customization](https://github.com/Doane-CCLA/docs/tree/654546c3136c7b05472679115bdddb60e54b02ea/using-the-hpc/environment.md)
* [CVMFS Modules](/docs/using-the-hpc/modules/cvmfs-modules.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://doane-ccla.gitbook.io/docs/using-the-hpc/modules.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
