Reference articles on history, science, culture and more
Encyclopedia

LFortran

Fortran compiler

LFortran is an open-source next-generation interactive Fortran compiler based on LLVM. A unique feature is that it can execute the user’s code interactively to allow exploratory work, in addition to compiling it to binaries to run the code on modern architectures such as multi-core CPUs and GPUs. It can be used via WebAssembly and is available on Compiler Explorer.

LFortran is still in the alpha phase. It supports most of Fortran 95 and many features of later standards. It will reach beta when it can reliably compile 10 production-grade, third-party packages used in the scientific community and industry. The current status is 8/10:

Despite being alpha, LFortran has been on the radar of NASA as a representative of compilers supporting type-safe generic programming in Fortran, and on that of SciPy, which hopes it can help deal with the large amount of Fortran libraries that SciPy relies on.

The LFortran project works closely with the US Fortran Standards Committee (J3). It is a NumFOCUS Sponsored Project since 2020. LFortran is a member of the Lcompilers family, and its siblings include LPython and LC.

Watch videos about LFortranExplainers and documentaries on YouTube (opens in a new tab)

Sources and credits

This article is adapted from the Wikipedia article LFortran, written by its contributors and licensed under CC BY-SA 4.0. Fathomly has changed the layout, removed citation markers, navigation and maintenance notices, and adjusted punctuation. This adapted version is shared under the same license. For references, see the original article.

Fathomly is not affiliated with or endorsed by the Wikimedia Foundation. Spotted a problem? Tell us.