Skip to content
Snippets Groups Projects
modulefiles.md 1.3 KiB
Newer Older
Whitney Armstrong's avatar
Whitney Armstrong committed
---
title: "Modulefiles"
---

## What are modulefiles?

Modulefiles (or Lmod) is installed on almost every HPC system these days. It is a set of tcl/tk or lua scripts to swap software in and out of your current environment. It does this (mostly) by managing your environment variables, namely, `PATH` and `LD_LIBRARY_PATH`.

```bash
module avail
module list
module load eic_container
module list
module purge 
module list
```


https://modules.readthedocs.io/en/latest/




## Development within singularity container

[See here](singularity) for more info on singularity.

The following helper runs bash inside `eic_container`
```bash
module load eic_container
container_dev
```

For projects that you want to build but which are also inside of the container, 
you must make sure to set `$PATH` and `$LD_LIBRARY_PATH` to point to the 
development build's installation prefix first. Here we assume your development 
builds are being installed into `$HOME/stow/development`

A simple setup script will make sure things are in order
```shell title=setup.sh
module use $HOME/etc/modulefiles
module load eic_container
export PATH=$HOME/stow/development/bin:$PATH
export LD_LIBRARY_PATH=$HOME/stow/development/lib:$HOME/stow/development/lib64:$LD_LIBRARY_PATH
export ROOT_INCLUDE_PATH=$HOME/stow/development/include:$ROOT_INCLUDE_PATH
```

Whitney Armstrong's avatar
Whitney Armstrong committed