FLIT: A Generic Fortran Library based on Interfaces and Templates

This is a new project I came across, by Kai Gao of LANL, documented here.

We develop a generic Fortran library, FLIT (Fortran Library based on Interfaces and Templates), to provide a number of useful functionalities for computational geophysics and beyond. These functionalities include several single/multi-dimensional array manipulation functions/subroutines, flexible parameter reading from textual file or command line arguments, signal and image filtering and processing, integral transforms, interpolation, statistical functions, and so on. These functionalities are not intrinsically available in the current Fortran standard. The most notable feature of FLIT is that we provide user-friendly interfaces for similar functionalities with different data types, attempting to demonstrate the possibility of accelerating scientific application development using modern Fortran. The package can be used as a robust Fortran library for developing sophisticated scientific applications in the fields of computational physics, computational and applied geophysics, signal and image processing, and so on.

The work was supported by Los Alamos National Laboratory (LANL) Laboratory Directory Research and Development (LDRD) project 20240322ER.

Currently, FLIT only supports Intel’s compiler suite (ifort, icx, icpx, and mpiifort) on Linux platform. We tested FLIT with ifort 2021.10, icx 2023.2, icpx 2023.2; compilers of higher versions should work. At this moment, we do not have a clear timeline to make it fully compatible with GNU’s compiler suite due to a number of nontrivial differences in these two compiler suites.


A lot of the generic facilities supported by FLIT may find value in Fortran stdlib and become generally valuable for Fortran users.


Fortran is LANL’s guilty pleasure.