Setup

1. Cloning the repository from GitHub

git clone https://github.com/xLPMG/tsunami_lab.git

2. Initializing & updating submodules

git submodule init
git submodule update

3. Installing requirements

To build this project, you will need SCons and GCC.

On MacOS, you can use homebrew for both:

brew install scons
brew install gcc

For I/O, the project requires the NetCdf library to be installed:

The program comes with a gui, for which you will need the GLFW library. On MacOS, you can install it easily using Homebrew.

You may use the tsunami solver without any gui and thus without the GLFW library, but you’ll have to specify this by later compiling with

scons gui=no

4. Building the project

Navigate to the in step 1 created tsunami_lab folder and run

scons

If you wish to build the project for benchmarking without file output, run

scons mode=benchmark

For further run configurations view the SConstruct file at the root of the tsunami_lab directory or checkout the options inside the GUI.

Additional build parameters

You may specify a compiler of your choice, for example icpc by running

CXX=icpc scons

If you wish to specify an optimization flag, you can do that by adding opt=<flag>, for example:

scons opt=-O2

Currently we support -O0, -O1, -O2, -O3 and -Ofast. The default is -O3.

Generating a report is possible for icpc. To enable it, specify it using

scons report=-qopt-report=<N>

Replace <N> with a number from 1 to 5 for the level of detail.

5. Building the documentation

If you wish to build the documentation, you will need to install some requirements first. For the automatic code documentation, doxygen is required. Furthermore, you will need Python. Using Python, you can install other requirements such as Sphinx and Breathe, which can be found in the requirements.txt file located in the docs folder. They can be installed easily by running

pip install -r requirements.txt

After everything has been installed, you can now run

make html

from inside the docs directory to build the documentation. To access it, open the index.html file located in docs/build/html.