Flang

The Fortran programming language is an essential component of many exascale applications and broad scientific missions within the US Department of Energy (DOE). Until recently, Fortran has not had the benefit of using the widely leveraged LLVM Compiler Infrastructure and the vibrant community that supports it. By leveraging a multiyear investment made by the National Nuclear Security Administration’s (NNSA’s) Advanced Simulation and Computing (ASC) program to establish Fortran as a component of the LLVM infrastructure, the Flang project aims to build on this foundation and further the capabilities and feature set of Fortran as a first-class language in the LLVM community. This will provide developers with a viable and robust path forward for producing performant Fortran-based applications on DOE’s pre-exascale and exascale system architectures.

Project Details

The Flang project focuses on taking a key role in contributing to the recently accepted open-source LLVM-based Fortran front-end (“Flang”) established by a multiyear investment made by the NNSA’s ASC program. By contributing to the overall community effort, the infrastructure will provide support for the critical features needed by Fortran applications to obtain performance on pre-exascale and exascale architectures, such as accelerator offload, improved optimizations, and tooling. This effort will help establish a modernized Fortran environment that will provide a robust and productive infrastructure for mission-critical applications within the DOE and across other US agencies and industry for which Fortran applications are essential for national security, scientific discovery, and engineering design.

Principal Investigator(s):

Pat McCormick, Los Alamos National Laboratory

Collaborators:

Los Alamos National Laboratory, Argonne National Laboratory, Lawrence Berkeley National Laboratory, Oak Ridge National Laboratory, NVIDIA

Progress to date

  • Since becoming an official part of the LLVM Compiler Infrastructure project in 2020 the effort has seen additional interest and contributors from across industry including NVIDIA, Arm, AMD, Linaro, IBM, and others.
  • A combination of closed (industry licensed) and open tests are being used for continuous integration and issue tracking. The full suite has surpassed 25,000 individual tests to help stabilize and minimize regression issues.
  • An additional high-level intermediate form (HLFIR) has been designed and actively developed to simplify code generation and improve analysis and optimization of Fortran-centric constructs and semantics. This is critical for capturing valuable information from Fortran constructs to provide tailored optimization strategies across all architectures.

National Nuclear Security Administration logo U.S. Department of Energy Office of Science logo