LLVM's Modern Fortran Compiler "Flang-New" Is Looking Good

Written by Michael Larabel in LLVM on 28 August 2024 at 08:50 AM EDT. 14 Comments
LLVM
The LLVM Fortran "Flang" compiler effort has been a long time coming over the years with this programming language continuing to be popular among some HPC codebases and other applications. The "Flang-New" compiler code has been maturing nicely and is looking like soon it could be possibly be renamed to Flang.

Making use of the flang-new compiler to compile Fortran code has required using "flang-new" as well as the "-flang-experimental-exec option for generating the executable. There's long been ongoing attempts to rename it back to just "flang" and no longer require the experimental flag." For LLVM 20 it's looking like that may finally happen.

The most recent proposal for renaming "flang-new" to "flang" is this LLVM Discourse that's been ongoing since March 2023. In the past month that Flang-New renaming discussion has been reignited with talk of possibly pursuing it for the LLVM 20 cycle. LLVM 19 (LLVM 19.1) stable is to be released soon and with the LLVM 20 cycle now getting underway for a stable release around March of next year, it would be a good time to rename the compiler early in the development cycle.

This Discourse thread started this week by an Arm/Linaro engineer also is looking to promote the status of this Fortran compiler.

This morning is another success story that Flang-New in LLVM Git is recently now able to compile MGLET. the Multi-Grid Large Eddy Turbulence HPC software. The announcement excitingly noted:
"I am now pleased to say, that as of now, flang-new is able to build MGLET and run all of our basic testcases. I cannot say exactly from which date, commit or version of LLVM this became possible, but it is for sure quite recent. All of my testcases passed yesterday with a build of llvm-project from Github’s main branch.

This is impressive of the LLVM flang community. Before flang-new, the three compilers that were known to work with MGLET was GNU gfortran, Intel ifx and NAG nagfor. Cray ftn work partially, and Nvidia nvfortran compile a binary but gives various runtime errors in every single testcase I have. The fact that flang-new runs through all testcases without a single case failing on the first attempts is very impressive."

With the recent excitement and successes around Flang-New and the possibility of Flang-New being renamed to Flang for LLVM 20, it's looking like 2025 could be an exciting year for Fortran in LLVM.

LLVM.org documentation Flang diagram


More details on the Fortran Flang drivers for LLVM via the project documentation for those interested.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week