Skip to content

Installation ​

Requirements ​

A modern Fortran compiler with Fortran 2003+ support.

Dependencies live in src/third_party/ and are fetched automatically by each build path below.

One-line install ​

bash
curl -fsSL https://github.com/szaghi/BeFoR64/releases/latest/download/install.sh | bash

It installs the latest release into ~/.local with the build system you choose among those BeFoR64 ships (--build fobis|fpm|cmake: a menu asks when you do not say), the compiler you name (--fc, --gnu, --intel, --nvidia), one install per compiler (lib/befor64/<compiler>-<version>/, include/befor64/<compiler>-<version>/), and makes it usable through pkg-config (pkg-config --cflags --libs befor64, with PKG_CONFIG_PATH=$HOME/.local/lib/pkgconfig). Pass options after bash -s --, e.g. ... | bash -s -- --build cmake --intel --prefix /opt/befor64; --help lists them all, --uninstall removes the install. The installer is FoBiS's (One-line installer).

With Fortran Package Manager no manual setup is needed:

bash
git clone https://github.com/szaghi/BeFoR64
cd BeFoR64
fpm build
fpm test

To use BeFoR64 as a dependency in your own fpm project, add to your fpm.toml:

toml
[dependencies]
BeFoR64.git = "https://github.com/szaghi/BeFoR64"

Option 2 — FoBiS.py ​

FoBiS.py reads the fobos file at the repository root and handles all inter-module dependencies automatically.

bash
pip install FoBiS.py

git clone https://github.com/szaghi/BeFoR64
cd BeFoR64
FoBiS.py fetch

Building the library ​

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

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

# Debug variants
FoBiS.py build -mode static-gnu-debug
FoBiS.py build -mode shared-gnu-debug

Output is written to ./static/ or ./shared/; .mod files go to ./mod/.

Replace gnu with intel for the Intel compiler (static-intel, etc.).

Building and running the doctests ​

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

Listing all available modes ​

bash
FoBiS.py build -lmodes

Coverage analysis ​

bash
FoBiS.py rule -ex makecoverage

Generating API documentation ​

Requires Ford:

bash
pip install ford
FoBiS.py rule -ex makedoc