Skip to content

Installation

Prerequisites

A Fortran 2003+ compliant compiler is required. The following compilers are known to work:

CompilerMinimum version
GNU gfortran≥ 5.3.0
Intel Fortran (ifort / ifx)≥ 16.x

FOSSIL is developed on GNU/Linux. Windows should work but is not officially tested.

Download

FOSSIL uses git submodules for its third-party dependencies. Clone recursively:

bash
git clone https://github.com/szaghi/FOSSIL --recursive
cd FOSSIL

If you already have a non-recursive clone:

bash
git submodule update --init

Third-Party Dependencies

The submodules live under src/third_party/:

LibraryPurpose
PENFPortable numeric kind parameters (I4P, R8P, etc.)
VecFor3D vector type and operations (vector_R8P, unit vectors, rotation/mirror matrices)
FLAPFortran command-line argument parser (used by fossilizer)
FACEANSI terminal color/style support
BeFoR64Base64 encoding
FoXyXML/XDMF support
StringiForString utilities
VTKFortranVTK file I/O

Build with FoBiS.py

FoBiS.py is the primary build system. Install it once with pip:

bash
pip install FoBiS.py

List all build modes

bash
FoBiS.py build -lmodes

Available modes:

ModeDescription
static-gnuStatic library with gfortran (release)
shared-gnuShared library with gfortran (release)
static-gnu-debugStatic library with gfortran (debug + checks)
shared-gnu-debugShared library with gfortran (debug)
tests-gnuBuild all tests with gfortran (release)
tests-gnu-debugBuild all tests with gfortran (debug)
static-intelStatic library with ifort (release)
shared-intelShared library with ifort (release)
tests-intelBuild all tests with ifort (release)
tests-intel-debugBuild all tests with ifort (debug)

Build the library

bash
# Static library (GNU gfortran)
FoBiS.py build -mode static-gnu

# Shared library (GNU gfortran)
FoBiS.py build -mode shared-gnu

# Static library (Intel Fortran)
FoBiS.py build -mode static-intel

The library is placed in ./static/ or ./shared/ respectively. Module files go to ./mod/.

Build and run tests

bash
FoBiS.py build -mode tests-gnu
./scripts/run_tests.sh

Compiled test executables are placed in ./exe/. Each test prints "Are all tests passed? T" on success.

To run a single test:

bash
./exe/fossil_test_clip

Coverage and documentation

bash
FoBiS.py rule -ex makecoverage   # build + run tests + gcov report
FoBiS.py rule -ex makedoc        # build ford API docs + VitePress site

Alternative builds

The scripts/install.sh helper also supports make and cmake backends:

bash
./scripts/install.sh --build make
./scripts/install.sh --build cmake