Tools
Explore new features and tools within Intel® products, communities, and platforms
78 Discussions

Is There Such a Thing as “The Best” Fortran Compiler?

Ron_Green
Moderator
1 0 1,860

Last weekend over breakfast, I had a thought – is this one of the best breakfasts I have eaten? And, if not, what was “The Best” breakfast? “Best” in my opinion. Since this is subjective, what I was really contemplating was what were my favorites. Two restaurants serving great breakfasts immediately came to mind. Both are in New Mexico, USA – Michael’s Kitchen in Taos, and Rancho de Chimayo Restaurante in Chimayo. Oh, the memories of cool mountain mornings, eggs, tortillas, and New Mexico chile! But it raised another question – how do you define “The Best” of anything?

 

This idea of “The Best” is, of course, subjective. And I immediately thought of compilers. What was/is “The Best Fortran compiler”? Or even “The Best Compiler” overall? I have my favorites, and these have changed over the years. And I am sure you have your favorites list. But first we can explore this idea of “The Best” in the context of Fortran compilers. What does this mean, really? The Intel® Fortran Compiler Classic, often referred to as simply “ifort”, has a very large and loyal following. Is this because it is somehow “The Best” Fortran compiler? Let us explore these ideas.

 

What makes one compiler “The Best”, as if there is such a thing? You can define many attributes, but they all come down to this: how easy is it for you to take an idea, conceptualize an algorithm for that idea, formulate it into something actionable, and create an application that illustrates your idea and potentially brings results to exercise or promote that idea? There are many compiler attributes that make that process flow smoothly. Integration into other tools like editors, debuggers, linkers and library tools, and source control. Furthermore, is the compiler easy to install and to upgrade? And does the compiler must follow modern Fortran Language Standards and present reasonable warnings and error messages to guide the programmer to create compliant code. Finally, a great compiler must generate reasonably performant code for the target platform. I am sure you can think of other attributes that are essential in your programming workflow. Many attributes play into what you would consider “The Best” Fortran compiler.

 

For me, like many Fortran programmers, I have found each compiler has strengths and weaknesses. A lot of these are subjective. What I find to be a weakness, others may find to be a strength. I have used practically every Fortran compiler. But “The Best” Fortran compiler for me will always be DIGITAL Visual Fortran*, aka “DVF”.

 

Launched way back in 1997, many will agree DVF was a game changer. It packed a game-changing combination of a solid Fortran compiler from Digital Equipment Corporation* AND an amazing integration into the blossoming world of Microsoft* Windows and the Microsoft* Visual Studio IDE. It was a solid Fortran compiler. It integrated with the Visual Studio ecosphere. Error messages and editor windows were integrated – click on an error message and the source file and line took you to the offending source line. Your Fortran code could work with Visual Basic, Visual C/C++, or even Excel! You could, for the first time, create rudimentary GUIs using visual editing tools and “resources”. The debugger was VISUAL! It had online documentation. You could cut and paste examples from the docs into your editor and actually RUN it! DVF would eventually add something called the “Array Visualizer” that let you examine your arrays in visual slices or surface plots from debugger breakpoints. The Array Visualizer had an API to allow you to animate your plots as your program ran! It was VISUAL. It was cool! It was revolutionary! And it was Fortran. To this day this may be the most popular Fortran compiler of all time. Certainly, it was the most loved. As you may know, Digital was purchased by Compaq Computer Corp. As a result, DVF was repackaged as Compaq Visual Fortran (CVF).

 

In a round-about way, CVF became the property of Intel. I won’t go into details, but Compaq was acquired by HP who had their own compilers and compiler team. Doctor Fortran, aka Steve Lionel, lived through it all. He documented the DVF/CVF/IVF history in his blog Doctor Fortran in “Thirty Eight”, and also in a brief timeline here.

 

But coming back to my thoughts of “The Best” Fortran compiler. How does the new Intel® Fortran Compiler, known as “ifx”, fit into this landscape of Fortran compilers? Is it “The Best”, like DVF/CVF? Is it even as good as The Intel® Fortran Compiler Classic, known as “ifort”? Is it “The Best” Fortran compiler?

 

Certainly no one would, today in 2023, call ifx “The Best” Fortran compiler. No, I’ve used DVF and ifx is no DVF. Is ifx ‘as good as’ ifort today? And what about the other stellar Fortran compilers from both open-source offerings and commercial vendor offerings? How does ifx rate compared to all of these? If we assume ifort is in the top runners for “The Best”, how does ifx compare? To be fair to ifx, first we need to recall ifort history.

 

Around 2001, Intel had their own compiler team, such as it was. They had niche compilers that focused on performant code for Intel® Architecture. The CVF acquisition was indeed a boon to Intel and immediately raised their customer reach. The first order of business for the former CVF team was to integrate the CVF Fortran Front End to Intel’s compiler performant compiler infrastructure to create what became “Intel® Visual Fortran” aka IVF. This supposedly simple task took 3 years. If you remember, the early Intel® Visual Fortran Compiler versions were buggy, as the developers were working frantically to mate the DVF/CVF front-end to the Intel Compiler framework. Over time, the merging of the CVF Fortran Front End into the Intel Compilers IL0 framework was completed, and IVF became a solid and popular product. But it was not overnight. It took several years and several versions.

 

Does this sound familiar? This is exactly what the Intel Fortran development team has been doing with ifx – integrate the existing ifort Fortran Front End with the LLVM compiler framework. History is repeating itself. The first versions of ifx, versions 2021 and 2022, were, or rather are, buggy. Version 2021 of ifx was rubbish! There, I said it. The plain truth. Just like IVF 8.x was rubbish. But remember, IVF 9.0 was better than the rubbish 8.x versions, just as ifx version 2022 improved over ifx 2021. And IVF version 10.0 was even better. And by version 11.0, ifort was a really good Fortran compiler! Evolution. Refinement over time. We think ifx version 2024 will be that watershed compiler that fixes its place in history as a better compiler than ifort. That is the version 2024 goal. And going into 2025 even better!

 

As I said earlier in this blog, in my opinion “The Best” Fortran compiler of all time was Digital Visual Fortran, DVF. That is my subjective opinion. For the reasons I mentioned. It was a remarkable compiler for its time. As a direct descendant of DVF, ifort achieved greatness, but only after a buggy early start. Over time, ifort has become better than DVF in many ways: Fortran Standard support, Linux* and macOS* support, optimization reports, diagnostics, support for modern processors and vectorization and multi-threading. Was or is ifort “The Best”? That depends on your subjective metrics. ifort is not a game changer. It is evolutionary, not revolutionary like DVF.

 

Will The Intel® Fortran Compiler, ifx, become “The Best” Fortran compiler at some point in the future? If I had to choose between DVF or ifx to develop code today, without doubt it would have to be ifx. In so many ways, ifx really is a better compiler for the processors, Fortran Language features, and software stacks prevalent today. No, it does not have the innovative “wow” factors that DVF possessed like the Array Visualizer,

 

And can one definitively say any Fortran compiler is clearly “The Best”? Is there such a thing as “The Best”?

 

Let’s go back to the beginning of this story when I was remembering “The Best Breakfast”. Yes, those two restaurants are in my memory as PERHAPS the best. In my memory. But life moves on. Will I have another “Best Breakfast”? I sure hope so. I have already had equally epic breakfasts in recent years. As I contemplated these questions, I was in a favorite French breakfast café. In its own way serving a very good, and perhaps, “The Best” breakfast. Amazing croissants flown in from Paris daily and amazing quiche! Fabulous! And this breakfast versus New Mexico huevos in red chile sauce? Each are spectacular.

 

Similarly, ifort versus ifx. Or ifort/ifx versus another other Fortran compiler of your choosing. Which is “The Best”? The best Fortran compiler is, after all, subjective. I am thankful that as a wider Fortran community we have many great choices. Perhaps there is no such thing as “The Best”. Perhaps DVF is not “The Best” after all. And all the choices we have had in Fortran compilers in the past, and those we have today, are a testament to the longevity and vitality of Fortran as a programming language.

 

I contemplated all of this with a cup of French roast coffee served from a French press on my table. Alongside it, a warm flaky, buttery, and rich croissant, soon to be joined by a spinach quiche cooked to perfection. As I sat under the awning on the patio al fresco enjoying the cool morning, enjoying a moment when life slows down, I let my thoughts drift to this idea of “The Best”. In the end I do not think such a thing exists as “The Best” Fortran compiler. I remember all the Fortran compilers I have used over the years. Each brought unique features and attributes and I found them useful in their own unique ways. In the end, there is no “Best” Fortran compiler. “Best” is what you use TODAY to get your coding done as efficiently as possible. But that may change tomorrow when something new comes along. We must roll with changes and not get stuck on perceptions from our past.
Bon appetite!

--ron

 

Author! Author!

Keep up with all the latest from the Intel Fortran team by following me on Twitter @iCompilersRon

Ron Green #IAmIntel

Ron_Green_0-1684942202714.jpeg

 

 

Ron Green is a manager for the Intel® Fortran Compiler team. He is a customer advocate for Intel® Fortran and the larger Software and Advanced Technology Group (SATG) at Intel Corporation.  Ron is a moderator of the Intel Fortran Community Forum and is an Intel Developer Zone Black Belt Developer.  He has extensive experience as a Fortran developer and consultant in HPC for the past 30+ years and has been with Intel’s developer tools and compiler team for 15+ years.  

Tags (3)
About the Author
Compilers, HPC, Developer Tools support. Fortran friendly.