Modules - firemodels/fds GitHub Wiki

Preliminaries

Modules are a powerful tool for specifying the environment used to build and run fds. You may change the environment dynamically by unloading one module and loading another. The most used module commands are:

  • module avail - show all available modules
  • module list - list all modules that are currently loaded
  • module load modulename - load a module named module name
  • module unload modulename - unload a module named module name

Using the installed FDS

Add the following lines to your startup file (i.e. .bashrc for linux, or .bash_profile for Mac):

export MODULEPATH=$HOME/FDS/FDS6/bin/modules:$MODULEPATH
module load FDS6

change the directory on the previous MODULEPATH line to where you installed fds. Save your changes and source your startup file. To test that you have the correct location of fds defined type:

$ which fds

where $ refers to the command line prompt sign. It should return the location of your installed fds program (i.e. $HOME/FDS/FDS6/bin/fds). Also type:

$ which mpiexec

And it should return the location of the bundles mpi launch executable (i.e. $HOME/FDS/FDS6/bin/openmpi_64/bin/mpiexec in macOS, or $HOME/FDS/FDS6/bin/mpiexec in Linux). At this point you should be set to use the bundled fds on your Mac or Linux system.

Using the repo FDS

Add the following lines to your startup file

module load openmpi/211_64ib

Change the module line to the openmpi module you want to use.

Installing the environment-modules package in your Mac through Homebrew

If you haven't already installed the Homebrew package manager on you system, go to https://brew.sh and follow their installation guidelines. You need to open a terminal and paste the Homebrew install line they provide (using ruby). Run the command as yourself not as the Administrator. Once Homebrew is installed, update, upgrade and install modules:

$ brew update
$ brew upgrade
$ brew install modules

Add the following source line to your startup environment initialization file:

source /usr/local/opt/modules/Modules/init/bash

If you have High Sierra you need to add the following line instead (remove Modules from the above line):

source /usr/local/opt/modules/init/bash

Save your changes and source your startup file. You should be all set to use modules.

Installing the environment-modules package in Ubuntu

Open a Terminal and type:

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install environment-modules*

Provide your super user password. This should install the latest environment modules package from external repository. Now you can check if the modules package initialization script has been installed in /usr/share/modules/init. Type:

$ test -e /usr/share/modules/init/bash && echo "bash found" || echo "bash not found" 

It should return bash found. Next, add the following line in your startup file:

source /usr/share/modules/init/bash

This line will define the module procedure and make it available for use on your session. Save your changes on the startup file and source it. You should be all set to use modules.