Skip to content

Installation ​

Prerequisites ​

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

CompilerMinimum version
GNU gfortran14.3+ on the 14 series, or ≥ 15.1
Intel Fortran (ifort / ifx)≥ 16.x
NVIDIA HPC Fortran (nvfortran)≥ 26.9 (GPU device build only, see below)

Older gfortran versions

gfortran 13.3 and 14.2 were reported to crash while building the test suite (internal compiler error: in matching_typebound_op, on src/tests/fossil_test_sanitize_normals_strict.f90, see issue #24). The trigger, an associate whose selector is a type-bound operator expression (a gfortran bug, fixed in 14.3 and 15.2), has been removed from the test, which made 15.1 build again. 13.3 and 14.2 should now build too, but they are not tested. Verified versions:

gfortranResult
13.3, 14.2internal compiler error before the workaround; not retested
14.3builds, all tests pass (CI)
15.1, 15.2, 16.2builds, all tests pass

The NVIDIA modes (static-nvidia, tests-nvidia) build the OpenACC GPU distance path; tests-nvidia builds only the distance benchmark, not the full test suite.

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

Download ​

bash
git clone https://github.com/szaghi/FOSSIL
cd FOSSIL
fobis fetch

FOSSIL's third-party dependencies are not git submodules. They are declared in the [dependencies] section of fobos and fetched into src/third_party/ by fobis fetch (pinned in src/third_party/fobos.lock). fobis fetch --update re-fetches them. fpm users need neither step: fpm resolves the same dependencies from fpm.toml.

Third-Party Dependencies ​

Fetched into 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 once with pip — the PyPI package name is FoBiS.py; the installed CLI binary is fobis:

bash
pip install FoBiS.py

List all build modes ​

bash
fobis 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-openmpBuild all tests with gfortran + OpenMP (distance_many threaded)
tests-gnu-debugBuild all tests with gfortran (debug)
static-intelStatic library with ifort (release)
shared-intelShared library with ifort (release)
static-intel-debugStatic library with ifort (debug)
shared-intel-debugShared library with ifort (debug)
tests-intelBuild all tests with ifort (release)
tests-intel-debugBuild all tests with ifort (debug)
static-nvidiaStatic library with nvfortran + OpenACC (GPU, needs --varset local_nvf)
tests-nvidiaGPU distance benchmark only, with nvfortran + OpenACC (needs --varset local_nvf)

Build the library ​

bash
# Static library (GNU gfortran)
fobis build --mode static-gnu

# Shared library (GNU gfortran)
fobis build --mode shared-gnu

# Static library (Intel Fortran)
fobis build --mode static-intel

The library is placed in ./static/ or ./shared/ respectively, with its module files in mod/ under the same directory (e.g. ./static/mod/).

Build and run tests ​

bash
fobis 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 rule --ex makecoverage   # build + run tests + gcov report
fobis rule --ex makedoc        # build formal API docs + VitePress site

Build with fpm ​

bash
fpm build --profile release

fpm resolves the dependencies declared in fpm.toml; no fobis fetch is needed.

FOSSIL ships no CMake or Make build files: scripts/install.sh --build cmake|make skips the build with a warning. Use --build fobis or --build fpm.