Tools
Engage with our experts on Intel® tools
9 Discussions

The Next Chapter for the Intel® Fortran Compiler

Ron_Green
Moderator
1 0 3,701

The Next Chapter for the Intel® Fortran Compiler

by Ron Green, December 2022

The Intel Fortran Compiler development team is thrilled to share news of our achievement in reaching a major milestone for the Intel® Fortran Compiler, IFX:  With the 2023.0.0 release, IFX now has Fortran language feature parity with our Intel® Fortran Compiler Classic, IFORT.  And this is no small feat. For the first time, IFX has full Fortran 2018 language support, putting it on par with IFORT.  This includes all the legacy DEC/Compaq/Intel language features, extensions, and all our compiler directives that you have come to expect in Intel Fortran!  But there’s more to the IFX story to celebrate! In a parallel effort, our Fortran compiler added OpenMP GPU offload features to enable your applications to access acceleration on Intel GPUs, such as the Intel® Data Center GPU Max Series.  In this blog I explain why this is a monumental release and how this marks the next chapter for Intel Fortran.  We will start a short history of the development of IFX before diving into the highlights for this release.

IFX Development: A Journey

In the Beginning: an IFX Design

Four or five years ago, the Intel Fortran compiler team started a project to modernize the Intel Fortran compiler.  At that time, it was becoming clear that our decades old proprietary compiler technology, IL0, that we shared with our C/C++ ICC compiler had reached its limitations.  Our need was to move our compiler technology to a modular and maintainable framework.  A clean, modern framework based on object-oriented design.  Given these goals, our decision was to create a Fortran compiler based on the LLVM compiler framework.  We wanted a new Fortran compiler that could challenge and eventually supersede our popular IFORT compiler, the gold standard in Fortran for Intel® Architecture.  The end goal being a more maintainable compiler utilizing our Fortran front end combined with a LLVM-based framework.  A compiler that could support our Fortran user community for years into the future.  Knowing the investments our customers have made in IFORT and DEC Fortran going back decades, our goal was to develop a quality Fortran compiler, one that our Fortran customers expect from Intel.  And from a business perspective, Intel Fortran is the most popular and successful product in Intel’s Developer Tools portfolio.  It was obvious we had provide continuity to our existing customers. Given the expectations for Intel Fortran, we knew we would have to take the best of IFORT, our Intel Fortran Front End, and bring it into a more modern compiler framework.

What is the Intel Fortran Front End, and Why Do I Care?

As you know, a compiler is a program that takes your Fortran source files and produces binaries, libraries, and executable programs. A modern compiler is a complicated piece of software. In a hugely simplified view, a compiler can be viewed as comprised of 3 macro parts: front-end, middle-end, and back-end parts. In our case, our Intel Fortran Front End (FFE) is the 1st part of the IFX compiler. The FFE parses and interprets your Fortran code, converts it to an internal representation, makes sure it conforms to the Fortran Language Standard, and converts this into an internal representation.  For you as a programmer, this is the part of a compiler that impacts your work most directly.  This is what accepts, warns, or rejects your Fortran code. After the FFE part does its job, it passes the validated binary representation of your program to the 2nd part, to what is known as the LLVM-based “middle end”.  This 2nd part, the middle end, has the task to optimize the program – to do vectorization, loop transformations, and all the techniques to producing efficient and optimal code.   The middle end then performs a handoff of your optimized program to the 3rd part, the “back end”.  The back end generates instructions for a particular architecture. In our case, the back end generates code for Intel® Architecture targets for CPU and GPU.

For our IFX front-end code, we use the same Intel Fortran Front End (FFE) as IFORT. This is the 1st part of the compiler and one that is Fortran language specific.  Again, it parses and interprets your Fortran code. By using the same Intel FFE as IFORT, we can ensure that your applications that compiled with IFORT should also compile with IFX.  That is why you care.  IFX and IFORT share the same FFE.  This will make your transition to IFX from IFORT relatively smooth and drama free.

The IFX Development Challenge

In simple terms, the task for the Intel Fortran development team was to combine or “bolt” our FFE (1st part) into an LLVM-based framework (2nd and 3rd parts) shared by our new LLVM-based Intel ICX and DPC++ compilers.  While it sounds simple, it was a herculean effort to get the two parts to work cohesively together. 

2018 to 2020, Planning, Setup, Proof of Concept

Years 2018 through 2020 was consumed with planning, configuring our build system and test harnesses, ramping on LLVM technology, and early prototyping.  This phase of IFX development was not visible outside of Intel.  Like all new major software projects, it was a mix of architecting, early coding, and getting processes and tooling in place.  And it was exciting for us to see the first successful IFX compilation of an F77 “hello world” program.  Followed by a simple OpenMP offload of a vector addition kernel. IFX was coming alive.

2021, Early First Implementation – a Rough Start

We first debuted IFX to the public as a beta release in the oneAPI 2021 release.  This initial beta release was, at best, a Fortran 77 compiler with some F90 features and some OpenMP offload features.  Calling it a “Beta” was generous. It was a proof of concept. That is all the mention of this version that is warranted.  Moving on …

2022, A Year of Aggressive and Rapid Development

With the 2022.0 release, IFX was maturing.  We were still aggressively developing IFX in two areas: Fortran Language Features and OpenMP offload features.  The OpenMP offload features matured quickly, enabling early adopters to begin adding OpenMP directives to their applications to offload Fortran computational kernels to supported Intel GPUs.  For Fortran language features, we began version 2022.0 with IFX having a complete implementation of F77 and F90/95, a lot of F2003, a few F2008 features and a few F2018 features.  Through most of 2022 IFX was having a few problems compiling modern F2003/2008/2018 applications that use advanced features of these standards.  By the final update release of IFX in 2022, in the Intel® oneAPI 2022.3 release in the fall of 2022, we finally had a relatively stable and useful modern Fortran compiler.  Compiler version 2022.2 was good, but not quite complete. And while 2022.2 was not on par with IFORT, we were closing in, and closing in rapidly.

2023, Completing the Implementation

With our IFX 2023 release we finally have all the Fortran Language features of IFORT needed to claim language parity.  On top of that, IFX has one of the most advanced implementations of OpenMP 5.0/5.1 in the industry.  And we even have a few features from the forthcoming OpenMP 6.0 Standard.  To see the progress made between last year’s 2022.0 release and this 2023.0 release, I will share some numbers on the quantity of fixes that have gone into IFX between the initial 2022.0 release and today’s 2023.0 release. In the past year, the Fortran Front-end development team has integrated 804 fixes or “edits” to the compiler front end code base.  Some of these were simple fixes to one or two source files. Some fixes were massive, affecting many parts of the Fortran Front End.  These 804 fixes are in addition to all the changes in the past year that went into the middle-end optimizer and back-end code generation parts of the compiler, parts we share with our ICX/DPC++ compiler team.  To put this in perspective, 804 edits or fixes was an average of over 3 edits each workday throughout 2022.  And this is just in the Fortran Front End!  So, it’s fair to say that if you tried IFX in 2022 or 2021, it’s time to try it again.  IFX 2023 is much improved compiler compared to our earlier offerings.

Some Highlights of IFX 2023

Fortran Language Features Highlights – something new, something old

  • Fortran Standards Support is simple to explain: IFX implements the Fortran 2018 Standard and all prior Standards.  No caveats.  Same as IFORT.  This puts IFX squarely in the same league as the most advanced Fortran compilers in the Fortran community.
  • OpenMP 5.x Offload.  This enables Fortran programmers to accelerate their code on Intel GPUs, such as the Intel® Data Center GPU Max Series. 
  • Legacy DEC Extensions Support:  IFX brings along the same extensions, directives, and behaviors you expect from IFORT.  Intel Fortran will support your legacy applications for many years into the future! This protects your software investment.
  • Automatic GPU Offload of DO CONCURRENT: I’ll talk about this later in this article.

We publish our latest changes in our online Release Notes.  The Release Notes is an overview of new features with each release.  In addition to the Release Notes, we maintain a detailed table of both Fortran Standard features and OpenMP features, our Fortran Language and OpenMP* Features page.  Track these pages for all the latest developments in Intel Fortran.  Here are some more highlights of this release.

DLLIMPORT/DLLEXPORT

We have a large active community of users of our compilers on Windows*.  And one of the key features of IFORT has been the ability to create and use Windows Dynamic-Link Libraries, or DLLs.  This shared library object can be used in mixed language programming, for modularizing and making updates to applications easier, and for adding extended functions in Fortran for CAD/CAM, spreadsheet programs, and other third-party tools and applications.  It is an essential and necessary capability to have for any Fortran compiler claiming to support Windows.  Until the IFX 2022.2 release, the ability to create and use DLLs only existed in IFORT.  Our Windows users were quite vocal about the need for this feature in IFX. We listened. We delivered!

 Fortran C Interoperability Features: Call me and I’ll Call You!

Certainly, there is a wealth of C/C++ libraries and sources out there with very cool functionality.  And since OSes and their system functions are in C/C++ we need a way for our Fortran code to call and be called with C.  Fortran provides a standardized method for interoperating with C.  IFORT for years has provided an intrinsic module iso_c_binding for this purpose.  Again, this is an essential feature for any compiler claiming Fortran language support.  IFX has supported iso_c_binding in prior releases, but this release also adds all C interoperability features, including assumed rank arrays and C array descriptors (Fortran 2018).  

Faster Compilation

One benefit and reason for moving to an LLVM-based implementation is the clean, modular, modern design.  This shows itself in compile time performance.  We are finding IFX to compile up to 18% faster than IFORT.  This will enhance your productivity.  Here are some early numbers comparing compilation time between IFX and IFORT:

Ron_Green_0-1671215847300.png

Automatic Offload of DO CONCURRENT

When it comes to offload to Intel GPUs, IFX is an industry leader in OpenMP 4.5/5.0/5.1 features, the most requested for application needs.  But looking at a higher level, OpenMP is an extension to the Fortran language.  To a Fortran program, OpenMP is an external set of directives and functions along with a supporting runtime library.  These are not part of the Fortran Language Standard.

Within the Fortran community there has been discussion for years on how to support parallel programming paradigms directly in the language without resorting to external extensions and runtime libraries like OpenMP.  You can trace such efforts back to High Performance Fortran (HPF).  And you have probably heard and read about Coarray Fortran, which is implemented in both IFORT and IFX.  And then there was/is the F95 FORALL statement and construct, which was obsolescent in Fortran 2018 for a variety of reason.  And most recently DO CONCURRENT was introduced in Fortran 2008, enhanced in Fortran 2018, and is due for further enhancement in the upcoming Fortran 202x Standard. 

DO CONCURRENT is a way to assert that the following DO block MAY BE run in parallel – there are no interdependencies between loop iterations. Notice that I said, “may be” and not “must be”. DO CONCURRENT does not demand that the compiler perform the loop in parallel, rather you declare or assert to the compiler that the DO block can safely run in parallel and thus the compiler could, if it chooses to, run the loop in parallel. 

Both IFX and IFORT parallelize DO CONCURRENT for multicore CPUs if you use the
-qopenmp or /Qopenmp option.  In this latest release, we extended IFX for DO CONCURRENT to allow offload to supported Intel GPUs.  This capability, like OpenMP GPU offload support, is only provided in IFX and not in IFORT.  Our implementation for the “automatic offload” of DO CONCURRENT to supported Intel GPUs requires two more options.  Here is the description of the new options, from the Release Notes and the Intel Fortran Developer Guide and Reference:

Linux:

-fopenmp-target-do-concurrent
-fno-openmp-target-do-concurrent

macOS: None

Windows:
/Qopenmp-target-do-concurrent
/Qopenmp-target-do-concurrent-

This option is in addition to the two options you need to specify OpenMP.  There is also another additional option,  -fopenmp-targets, needed to specify a target architecture or SPIR-V for the offload.  An example set of options needed is (linux):

-qopenmp -fopenmp-target-do-concurrent -fopenmp-targets=spir64

Yes, it is a lot of options.  I must warn you not to get too attached the options shown above.  We have already had customer requests for a single, simple compiler option rather than reusing several existing OpenMP options.  After all, you should not have to know that we use OpenMP to offload DO CONCURRENT.  The goal is to bring parallelism to a higher level, a Fortran level, and leave the details of implementation to us.

If you have already set up your PC or workstation for OpenMP offload with IFX, you can use the options above to begin testing out the DO CONCURRENT offload feature.  If not, in a future blog I will describe setting up your Windows or Linux system for offload.

What about IFORT?

We get it, Fortran developers do not chase “shiny new objects” just because they are new.  We have served the Fortran community since DEC Fortran.  We know that the community must see value before adopting new compilers and tools.  We will have to prove to you that IFX will give you everything provided by IFORT and more.  IFX has OpenMP offload capabilities that IFORT does not and will not have.  We need to ensure IFX has faster performance.  Performance will be a work in progress in 2023. Going into the future years, IFX will add support for the latest Intel hardware.  We will not add GPU support to IFORT and we will not add future processor tuning.  As we mentioned, IFX provides faster compilation. 

We understand you have an investment in Intel Fortran and IFORT.  At the same time, our shared path forward for Intel Fortran is IFX.  Of course, we will provide IFORT along with IFX during a transition period. We have not set a timeline for the transition period.  This depends on how quickly IFX can close the performance gap with IFORT and show stability. But once we are satisfied that IFX can replace IFORT, our plan is to announce deprecation IFORT, followed by removal from our released packages, and move it into long term product support. And following our normal older product support policy, we will keep IFORT available for customers with Priority Support via download on the Intel® Registration Center for several more years after deprecation and removal from our released packages.  This is one of the many advantages of Priority Support, you can read about Priority Support here.  We will give you plenty of notice as our plans for IFORT take shape.  However, we encourage you to not wait for the last minute to migrate to IFX. 

IFX Today and What is Ahead for 2023 and Beyond

I think you can see why we are so proud of IFX 2023. We reached our goal of Fortran Language parity with IFORT and completing our implementation of the Fortran 2018 Standard. And we provide an industry leading Fortran OpenMP 5.x implementation. It has been an aggressive development effort by the team for the past 4 or 5 years to get us here. 

So, what is ahead for Intel Fortran? In this article I discussed DO CONCURRENT automatic offload.  One new and exciting Fortran 202x feature is adding a reduction clause.  Reduction is essential for DO CONCURRENT if it is to compete with OpenMP.  Although F02x (probably 2023, but let’s wait and see) is not yet ratified, we will probably implement this feature soon in a future update.  It has been highly requested by our users and avid supporters and will help adoption of this feature in the wider Fortran community.  We are fully behind Fortran language features that enhance parallelism.

Fortran 202x, probably to be known as Fortran 2023, is coming.  And we have already begun development on some of the new features in this standard.  We are committed to moving fast at adoption of this upcoming standard in our Intel® Fortran Compiler.

I mentioned OpenMP 6.0 is coming.  We are already implementing some OpenMP 6.0 features and fully expect to expand support for this new standard.

Stabilization of IFX is a priority for us in 2023.  Our Application Engineering teams have been enabling many large scientific and engineering codes with IFX with success.  And many customers have told us they have been successful with compiling and running their applications with IFX.  However, the true test of stability will come as more of our extensive user base begin their migration from IFORT to IFX.  We look forward to increased usage and adoption of IFX in 2023 to help us on this path.

What about performance?  The jury is out.  In our own testing we can say that as of today at the end of 2022 we see IFX as competitive with IFORT – sometimes faster, sometimes slower, but generally on par with IFORT today.  You will see IFX being used in more and more benchmark reports in 2023.  There will be outliers where performance is different between IFX and IFORT.  Sometimes better, sometimes worse. We need to get IFX tested and adopted by the Intel Fortran community to better gauge where we are with performance parity.  One thing you should know by now about Intel compilers: we value performance.  You can expect performance to improve as IFX evolves in 2023 and beyond.  As we gain experience with applications, we will improve IFX performance and publish articles on achieving better performance with IFX.

To summarize what 2023 brings:  we are transitioning from our aggressive focus on development efforts needed to bring up this new compiler.  We are moving towards a new chapter for IFX in 2023.  This new chapter includes making sure performance is better in IFX than IFORT in almost all cases.  The new chapter is making sure IFX is as stable or more stable that IFORT.  The new chapter is adding Fortran 202x features and adding OpenMP 6.0 features.  The new chapter means that throughout 2023 and certainly by our 2024 release it is our goal that you will have no doubt that IFX is not only a good replacement for IFORT, but is clearly superior.  We are proud of IFX.  We hope you soon will call it your Fortran compiler.

Parting Notes

For 2023, we encourage you to compare IFX head-to-head with IFORT.  If you have paid support with Priority Support, we are ready for your questions and issues through your account on the Online Service Center.  If you do not have Priority Support, report your experiences on our Intel Fortran Community Forum

We believe you will see the potential for this new and modern Fortran compiler. So, while we are very proud of our progress to date, we know that we’re just getting started on this shared journey with IFX!  Just like our transition from DEC Fortran to DVF/IVF, and from DVF/IVF to Ifort in the past. On behalf of myself and the entire Intel Fortran development team we thank you for your loyalty and support of our amazing Fortran compiler technology!  We look forward to sharing our journey with you for many years into the future. Fortran is far from dead; we are just getting started!

Additional Details on this Release

 IFX is available for Windows and Linux.  IFX is not available for macOS.  This latest update of the oneAPI toolkits and components was posted in December 2022.  The version of the oneAPI Toolkits is 2023.0.0.  IFX is included in the Intel® oneAPI HPC Toolkit, and provided as a separate download from our Single Component Downloads and Runtime Versions page, and our repos for package managers. Download Intel® oneAPI Toolkits TODAY!  For Linux and WIndows this release includes:

  • Intel® Fortran Compiler version 2023.0.0 (IFX)
  • Intel® Fortran Compiler Classic version 2021.8.0 (IFORT)

For macOS, we provide only the Intel® Fortran Compiler Classic version 2021.8.0 (IFORT)

(Confused about versions of compiler versus versions of oneAPI? Read all about it in my forum post on version confusion.)

You can also download the oneAPI HPC Toolkit which contains our Fortran compilers.  If you are trying IFX for the first time and are an IFORT user, make sure to read our IFX Porting Guide 
 https://www.intel.com/content/www/us/en/developer/articles/guide/porting-guide-for-ifort-to-ifx.html

 

Author! Author!

Keep up with all the latest from the Intel Fortran team by following me on our Intel Fortran Community Forum, and on Twitter @iCompilersRon

Ron Green #IAmIntel

Ron_Green_1-1671215847303.jpeg

Ron Green is the customer advocate and member of the Intel Fortran development team.  When not riding his bicycles or hiking, Ron is a moderator of the Intel Fortran Community Forum.  He has extensive experience as a Fortran developer and consultant for the past 30+ years and has been with Intel’s compiler team for 15+ years.  His technical interest area is HPC application development and Fortran programming.  

Notice and Disclaimers

•Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex​​.  

•Performance results are based on testing as of dates shown in configurations and may not reflect all publicly available ​updates.  See backup for configuration details.  No product or component can be absolutely secure. 

•Your costs and results may vary. 

•Intel technologies may require enabled hardware, software or service activation.

•© Intel Corporation.  Intel, the Intel logo, and other Intel marks are trademarks of Intel Corporation or its subsidiaries.  Other names and brands may be claimed as the property of others.  ​

About the Author
Compilers, HPC, Developer Tools support. Fortran friendly.
Authors