2-4 July 2020
University of Zurich
Europe/Zurich timezone

LFortran: Interactive LLVM-based Fortran Compiler for Modern Architectures

2 Jul 2020, 18:50
ZOOM (University of Zurich)


University of Zurich

Selected Presentations Session B


Dr Ondřej Čertík (Los Alamos National Laboratory)


We are developing a modern open-source Fortran compiler called LFortran
(https://lfortran.org/). This front-end compiler will enable the interactive
execution of code in environments like Jupyter. This will allow exploratory work
(much like Python, MATLAB or Julia) which is currently not feasible. The
interactivity of our compiler does not impede compilation of binaries with the
goal to run user's code on modern architectures such as multi-core CPUs and
GPUs, which is an essential requirement for wider Fortran adoption that current
Fortran compilers do not address well. A Live demo of the compiler with a
Jupyter notebook will be shown. The compiler itself is written in C++ for
robustness and speed with optional Python wrappers to improve inter-operability.
It parses Fortran code to an Abstract Syntax Tree (AST) and transforms it to an
Abstract Semantic Representation (ASR). LFortran has several backends that
transform the ASR to machine code via LLVM, or to C++, or to provide automatic
Python wrappers. More backends are planned. The compiler has been designed to be
modular so that data can be extracted/inserted between the different stages,
which is an important feature that would support an ecosystem of tools that
otherwise would be hard with a monolithic compiler.

Primary authors

Dr Ondřej Čertík (Los Alamos National Laboratory) Nikhil Maan (Amity University, India) Ankit Pandey (Grinnell College) Milan Curcic (University of Miami) Peter Brady (Los Alamos National Laboratory) Zach Jibben (Los Alamos National Laboratory) Neil Carlson (Los Alamos National Laboratory) Rohit Goswami (Science Institute, University of Iceland, VR-III, 107, Reykjavik, Iceland and Department of Chemistry, IIT Kanpur, India) Amir Shahmoradi (the University of Texas Arlington) Arjen Markus (Deltares, The Netherlands)

Presentation Materials