Building
Requirements
CMake 3.25 or newer.
A C++20 compiler.
MPI (optional; on by default).
Python 3 for the tests (or
-DFLUME_ENABLE_TESTS=OFF).
Getting the code
FLUME needs two submodules: ERF, and the AMReX that ERF pins. The stand-alone build compiles no ERF code and needs none of ERF’s other submodules.
git clone https://github.com/erf-model/FLUME.git
cd FLUME
git submodule update --init Submodules/ERF
git -C Submodules/ERF submodule update --init --depth 1 Submodules/AMReX
git clone --recursive also works; it fetches every submodule of ERF.
Configure, build and test
cmake -S . -B build-rel -DCMAKE_BUILD_TYPE=Release
cmake --build build-rel -j 8
ctest --test-dir build-rel --output-on-failure
The executable is build-rel/flume. The default build type is Release.
Build directories named build-<something> are ignored by git.
The flood grid is two-dimensional. AMReX is built in three dimensions with boxes one cell thick, so the same code can later link with ERF.
CMake options
Option |
Default |
Effect |
|---|---|---|
|
|
Build with MPI. |
|
|
|
|
|
|
|
|
AMReX’s assertions and testing mode: new arrays are filled with signalling NaNs. |
|
|
Register the tests with CTest. Needs Python 3. |
|
|
Warnings in FLUME’s sources are errors. CPU builds only. |
|
empty |
Extra |
A value outside the list of FLUME_PRECISION or FLUME_GPU_BACKEND stops
the configure step. FLUME builds without OpenMP; FLUME_OMP=ON stops the
configure step.
Moving the ERF submodule
git -C Submodules/ERF fetch --tags
git -C Submodules/ERF checkout <tag-or-commit>
git -C Submodules/ERF submodule update --init --depth 1 Submodules/AMReX
git add Submodules/ERF
AMReX moves with ERF: rebuild and run the tests afterwards.
Building the documentation
python -m pip install -r Docs/sphinx_doc/requirements.txt
sphinx-build -W --keep-going -b html Docs/sphinx_doc Docs/sphinx_doc/_build/html
Warnings are errors, here and in the continuous integration.