This repository contains utility scripts for building and installing Chaste's software dependencies as environment modules. It also contains Dockerfiles for building GitHub runner Docker images with specified dependency versions.
The Environment Modules system allows users to switch between different software versions installed on the same system by reconfiguring the shell environment.
See the Environment Modules documentation for installation instructions on different systems. On Ubuntu, environment-modules can be installed from the apt repository:
apt-get install environment-modulesImportant
To activate the Environment Modules system after installation, close the current shell and start a new session. Alternatively, load the activation script directly into the current shell:
source /etc/profile.d/modules.shModulefiles are recipes used to reconfigure the shell environment for alternative software versions. The MODULEPATH environment variable is a list of locations where modulefiles are stored on the system.
Tip
Directories containing modulefiles can be added to MODULEPATH using the command module use <path/to/modulefiles>.
The commands below create a directory for modules and adds it to the MODULEPATH.
# Create a directory for storing modulefiles
MODULES_DIR=${HOME}/modules
mkdir -p ${MODULES_DIR}/modulefiles
# Add the directory to MODULEPATH
module use ${MODULES_DIR}/modulefiles
# Add the directory to MODULEPATH automatically in future bash sessions
echo "module use ${MODULES_DIR}/modulefiles" >> ${HOME}/.bashrcClone this repository and navigate to the build scripts
git clone https://github.com/Chaste/dependency-modules.git
cd dependency-modules/scripts/customNote
Running the build scripts will build and install software in this directory structure:
<MODULES_DIR>
|-- modulefiles/
|-- opt/
`-- src/
Software will be downloaded and built in src/ and installed in opt/.
A modulefile for each software built will be created in modulefiles/.
Install XSD
./install_xsd.sh --version=4.0.0 --modules-dir=${MODULES_DIR}Install Xerces-C
./install_xercesc.sh --version=3.2.4 --modules-dir=${MODULES_DIR} --parallel=4Install SUNDIALS
./install_sundials.sh --version=6.4.0 --modules-dir=${MODULES_DIR} --parallel=4Install Boost
./install_boost.sh --version=1.83.0 --modules-dir=${MODULES_DIR} --parallel=4Install HDF5
./install_hdf5.sh --version=1.10.10 --modules-dir=${MODULES_DIR} --parallel=4Install PETSc
./install_petsc.sh --version=3.19.6 --arch=linux-gnu-opt --modules-dir=${MODULES_DIR} --parallel=4Install VTK
./install_vtk.sh --version=9.3.1 --modules-dir=${MODULES_DIR} --parallel=4Tip
After installation empty the src/ directory as the build files are no longer needed.
cd ${MODULES_DIR} && rm -rI src/*Use module avail to show available software modules
---------------- /home/<user>/modules/modulefiles ----------------
boost/1.83.0 vtk/9.3.1
hdf5/1.10.10 xercesc/3.2.4
petsc/3.19.6/linux-gnu-opt xsd/4.0.0
sundials/6.4.0
Use module load to activate software modules
module load xsd/4.0.0
module load xercesc/3.2.4
module load sundials/6.4.0
module load boost/1.83.0
module load hdf5/1.10.10
module load petsc/3.19.6/linux-gnu-opt
module load vtk/9.3.1Configure and build Chaste as normal following the instructions in the documentation.
Below is a subset of commonly used module commands. See the environment modules documentation for a more comprehensive manual.
| Command | Description |
|---|---|
module use <path/to/modulefiles> |
Make software modules located on the specified path available. |
module avail |
List all available software modules. |
module avail <search_string> |
Search for software modules that match the search string. |
module load <module> |
Load a software module into the environment. |
module list |
List all currently loaded software modules. |
module unload <module> |
Unload a software module from the environment. |
module purge |
Unload all currently loaded software modules. |
module switch <module/ver0> <module/ver1> |
Unload module/ver0 and load module/ver1. |
module show <module> |
Show the environment settings for a module. |