Installation
FURY needs a Fortran 2018 compiler: it is tested with gfortran 14 and 16. Its dependencies, all by the same author, are fetched by the build system:
| Library | Purpose |
|---|---|
| PENF | portable kind parameters (R4P, R8P, R16P, ...) and number-to-string conversion |
| StringiFor | strings, used by the parser of the unit definitions |
| BeFoR64, FACE | dependencies of StringiFor |
| FLAP | command line parsing, used only by the fury_converter app |
One-line install
curl -fsSL https://github.com/szaghi/FURY/releases/latest/download/install.sh | bashIt installs the latest release of the library into ~/.local with the build system you choose among those FURY ships (--build fobis|fpm: a menu asks when you do not say), the compiler you name (--fc, --gnu, --intel), one install per compiler (lib/fury/<compiler>-<version>/, include/fury/<compiler>-<version>/), and makes it usable through pkg-config (pkg-config --cflags --libs fury, with PKG_CONFIG_PATH=$HOME/.local/lib/pkgconfig). The release carries FURY's dependencies (BeFoR64, FACE, FLAP, PENF, StringiFor). The fobis build has the quadruple precision types, the fpm build the 32 and 64 bits ones only. Pass options after bash -s --, e.g. ... | bash -s -- --build fpm --prefix /opt/fury; --help lists them all, --uninstall removes the install. The installer is FoBiS's (One-line installer).
FoBiS
FoBiS is the build system FURY is developed with (pip install FoBiS.py).
Standalone: clone, fetch the dependencies, build.
git clone https://github.com/szaghi/FURY && cd FURY
fobis fetch # dependencies into src/third_party/
fobis build --mode fury-static-gnu # lib/libfury.a and lib/mod/| Mode | Builds |
|---|---|
fury-static-gnu, fury-shared-gnu | lib/libfury.a, lib/libfury.so with gfortran |
fury-static-intel, fury-shared-intel | the same with Intel Fortran |
fury-static-gnu-noquad | lib/libfury.a without the 128 bits kinds |
tests-gnu, tests-gnu-debug, tests-gnu-noquad | the tests, into exe/ |
converter-gnu, converter-intel | the fury_converter app, into exe/app/ |
fobis build --lmodes lists them all. To use the library, link libfury and add lib/mod to the module search path.
As a project dependency: declare FURY in your fobos and fetch it.
[dependencies]
deps_dir = src/third_party
FURY = https://github.com/szaghi/FURYThe dependencies follow the head of their default branch (master).
fpm
[dependencies]
FURY = { git = "https://github.com/szaghi/FURY" }fpm cannot pass a preprocessor macro to a dependency, so PENF is built without quadruple precision and FURY with it: FURY built by fpm has no 128 bits kinds (see Precision).
Quadruple precision
The 128 bits kinds (qreal128, uom128, system_si128, ...) exist only when FURY and PENF are compiled with -DPENF_R16P, as all the FoBiS modes but the *-noquad ones do. FURY tests PENF's own macro: the two cannot disagree on whether R16P is a quadruple precision kind.
Tests
fobis build --mode tests-gnu
bash scripts/run_tests.shA test passes when it exits with status 0; the tests named *_xfail_* check that an inconsistency stops the program, and pass when they exit with a non-zero status. bash scripts/docs_examples.sh builds and runs the examples of this documentation.
The converter app
fury_converter converts a value between two units of the SI system:
fobis build --mode converter-gnu
./exe/app/fury_converter --input_uom km --output_uom m --value 3.2