Installing and Running FDS under macOS - firemodels/fds GitHub Wiki

Installing the Bundle

  1. Open the terminal application by clicking the spotlight in the top right corner, typing "terminal", then pressing Enter.

  2. "cd" to the directory where the downloaded bundle is located, for example,

    $ cd Downloads/

  3. Run the installer script with admin rights (note that the version number for the file that you downloaded might be different). You will probably need to run with sudo.

    $ sudo bash FDS6.7.4_SMV6.7.14_osx.sh

After typing this bash command and entering your admin password you will be prompted to select one of two options for installation.

Installing FDS and Smokeview for macOS

Options:
  1) Press <Enter> to begin installation [default]
  2) Type "extract" to copy the installation files to:
     FDS6.7.4_SMV6.7.14_osx.tar.gz

Option 1 (typical)

Press Enter. You will be prompted to select an installation location.

FDS install options
  Press 1 to install in /Applications/FDS/FDS6 [default]
  Press 2 to install in /Users/<username>/FDS/FDS6
  Enter a directory path to install elsewhere

Make your selection and press Enter. Note that if you do not have write access to /Applications you either have to sudo bash or install in your local directory (Option 2). You will be shown the directory locations for FDS and OpenMPI installation. If these are correct, type "yes" to continue with installation.

Installation directory: /Applications/FDS/FDS6
Proceed? (yes/no) yes

Installation beginning
The directory, /Applications/FDS/FDS6, already exists.
Do you wish to overwrite it? (yes/no) yes

The installation directory, /Applications/FDS/FDS6, has been created.

Copying FDS installation files to /Applications/FDS/FDS6
Copy complete.
Creating directory /Applications/FDS/FDS6/bin/modules
The installation directory, /Applications/FDS/FDS6/bin/modules, has been created.

-----------------------------------------------
*** To complete the installation add the following lines to your startup file
   (usually /Users/rmcdermo/.bash_profile).

source /Applications/FDS/FDS6/bin/FDS6VARS.sh 
source /Applications/FDS/FDS6/bin/SMV6VARS.sh 

or if you are using modules, add:

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

*** Log out and log back in so the changes will take effect.

*** To uninstall fds, erase the directory: 
/Applications/FDS/FDS6
and remove any changes you made to your startup file.

*** Installation complete.

At the end of the installation you will be given suggestions (based where you installed FDS) on how to update your startup file so that the fds command may be run from the command line. Open ~/.bash_profile or ~/.zshrc (if you use the Z shell) and add the following (in this order):

source /Applications/FDS/FDS6/bin/FDS6VARS.sh 
source /Applications/FDS/FDS6/bin/SMV6VARS.sh

#  set OMP_NUM_THREADS to max of 4 and "Total Number of Cores" obtained from running
#  system_profiler SPHardwareDataType
export OMP_NUM_THREADS=4

# unlimit stack for macOS
ulimit -s 65532

Add the above lines to one of your startup file, then log out and log back in so the changes will take effect. Then type type following command.

$ which fds

This command should output something like the following:

/Applications/FDS/FDS6/bin/fds

Next, type "fds" at the command prompt to confirm the correct version has been installed.

$ fds

 Fire Dynamics Simulator

 Current Date     : March 10, 2020  11:42:38
 Revision         : FDS6.7.4-0-gbfaa110f1-release
 Revision Date    : Fri Mar 6 10:17:46 2020 -0500
 Compiler         : Intel ifort 19.0.4.233
 Compilation Date : Mar 09, 2020  16:12:26

 MPI Enabled;    Number of MPI Processes:       1
 OpenMP Enabled; Number of OpenMP Threads:      2

 MPI version: 3.1
 MPI library version: Open MPI v4.0.2, package: Open MPI [email protected] Distribution, ident: 4.0.2, repo rev: v4.0.2, Oct 07, 2019
 Consult FDS Users Guide Chapter, Running FDS, for further instructions.

Note that as of FDS 6.2.0 there is only one executable for both serial and MPI calculations (serial is just MPI with one process). The number of available OpenMP (shared memory parallelization) threads may be set via

$ export OMP_NUM_THREADS=4

To confirm or check this setting do

$ echo $OMP_NUM_THREADS
4

If you want to run an MPI calculation on a single workstation such as a Mac Pro, you probably want to set OMP_NUM_THREADS to 1.

$ export OMP_NUM_THREADS=1

To execute an MPI calculation, for say 4 processes, do

$ mpiexec -np 4 fds jobname.fds

Option 2

Type "extract" (not "2"!):

Options:
  1) Press <Enter> to begin installation
  2) Type "extract" to copy the installation files to FDS_6.6.0-SMV_6.6.0_osx64.tar.gz
extract
Extracting the file embedded in this installer to FDS_6.6.0-SMV_6.6.0_osx64.tar.gz

Unzip and untar the bundle.

$ gunzip FDS_6.6.0-SMV_6.6.0_osx64.tar.gz

$ tar -xvf FDS_6.6.0-SMV_6.6.0_osx64.tar

(or simply double click FDS_6.6.0-SMV_6.6.0_osx64.tar.gz in Finder).

Move the directory FDS_6.6.0-SMV_6.6.0_osx64/ to the desired location, for example,

$ mv FDS_6.6.0-SMV_6.6.0_osx64 /Applications/

(or simply drag-and-drop in Finder).

Add these alias commands to your .bash_profile or .zshrc (if you use the Z shell) to point to fds and smv:

# aliases

alias fds='/Applications/FDS_6.2.0-SMV_6.2.2_osx64/bin/fds'
alias smv='/Applications/FDS_6.2.0-SMV_6.2.2_osx64/bin/smokeview'

You can now run FDS or Smokeview from a terminal using

$ fds chid.fds
$ smv chid
⚠️ **GitHub.com Fallback** ⚠️