Installation
Prerequisites
A Fortran 2003+ compliant compiler is required. The following compilers are known to work:
| Compiler | Minimum version |
|---|---|
| GNU gfortran | 14.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:
| gfortran | Result |
|---|---|
| 13.3, 14.2 | internal compiler error before the workaround; not retested |
| 14.3 | builds, all tests pass (CI) |
| 15.1, 15.2, 16.2 | builds, 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
git clone https://github.com/szaghi/FOSSIL
cd FOSSIL
fobis fetchFOSSIL'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/:
| Library | Purpose |
|---|---|
| PENF | Portable numeric kind parameters (I4P, R8P, etc.) |
| VecFor | 3D vector type and operations (vector_R8P, unit vectors, rotation/mirror matrices) |
| FLAP | Fortran command-line argument parser (used by fossilizer) |
| FACE | ANSI terminal color/style support |
| BeFoR64 | Base64 encoding |
| FoXy | XML/XDMF support |
| StringiFor | String utilities |
| VTKFortran | VTK 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:
pip install FoBiS.pyList all build modes
fobis build --lmodesAvailable modes:
| Mode | Description |
|---|---|
static-gnu | Static library with gfortran (release) |
shared-gnu | Shared library with gfortran (release) |
static-gnu-debug | Static library with gfortran (debug + checks) |
shared-gnu-debug | Shared library with gfortran (debug) |
tests-gnu | Build all tests with gfortran (release) |
tests-gnu-openmp | Build all tests with gfortran + OpenMP (distance_many threaded) |
tests-gnu-debug | Build all tests with gfortran (debug) |
static-intel | Static library with ifort (release) |
shared-intel | Shared library with ifort (release) |
static-intel-debug | Static library with ifort (debug) |
shared-intel-debug | Shared library with ifort (debug) |
tests-intel | Build all tests with ifort (release) |
tests-intel-debug | Build all tests with ifort (debug) |
static-nvidia | Static library with nvfortran + OpenACC (GPU, needs --varset local_nvf) |
tests-nvidia | GPU distance benchmark only, with nvfortran + OpenACC (needs --varset local_nvf) |
Build the library
# 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-intelThe 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
fobis build --mode tests-gnu
./scripts/run_tests.shCompiled test executables are placed in ./exe/. Each test prints "Are all tests passed? T" on success.
To run a single test:
./exe/fossil_test_clipCoverage and documentation
fobis rule --ex makecoverage # build + run tests + gcov report
fobis rule --ex makedoc # build formal API docs + VitePress siteBuild with fpm
fpm build --profile releasefpm 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.