Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28855 Discussions

Programs compiled with ifx are slower than compiled with ifort.

eliopoulos
Novice
1,096 Views

Programs compiled with ifx are slower than compiled with ifort. Is this going to change with the future updates? Speed is very important to me and now ifort has been discontinued.

0 Kudos
19 Replies
Ron_Green
Moderator
1,063 Views

Perhaps you can share the compiler options you used, and the Intel processor you are targeting with -x or -ax, and if you can, share the sources.

0 Kudos
eliopoulos
Novice
1,055 Views

I don't know where to find the compiler options you need. I use two different Intel processors: core i9 14900ks and core i7 1260p. I don't understand the -x and -ax thing. I compile from the Visual Studio Community 2022. I don't want to share the program in public but I could send it with e-mail.

0 Kudos
Ron_Green
Moderator
1,044 Views

You can look in Project Properties for your Release Configuration and x64 configuration.  The processor targeting will look like this:

Ron_Green_0-1732228271485.png

 

0 Kudos
eliopoulos
Novice
1,039 Views

This is what I use:

eliopoulos_0-1732228578655.png

 

0 Kudos
eliopoulos
Novice
830 Views

Is there anything I can do to accelerate my programs compiled with ifx?

0 Kudos
Mark_Lewy
Valued Contributor I
780 Views

Without knowing your compiler options, it's difficult to say what might be causing this.  I suggest you share the Fortran command line from the project properties.  For example,

Mark_Lewy_0-1732717868722.png

One thing I noted, when we ported to ifx,  was that if you use /standard-semantics it degrades floating point performance significantly with IFX because it sets /assume:ieee_compares.  You could (like us) add /assume:noieee_compares as an additional option.

Our application generally runs faster or at similar speeds to ifort when built with ifx, depending on workload.

Also, check out the porting guide from ifort to ifx: Porting Guide for ifort Users to ifx and see if anything in there helps.

 

0 Kudos
eliopoulos
Novice
757 Views

My compiler options:

eliopoulos_0-1732720290967.png

I tried to add /assume:noieee_compares and the program remains slower than compiled with ifort.

0 Kudos
Mark_Lewy
Valued Contributor I
751 Views

Nothing obvious stands out here.  I'd suggest profiling your program with vTune to see where the hotspots are.

Ron_Green
Moderator
698 Views

What you showed does not match the recommendation I had for using -x or -ax options.  This is called out in the Porting Guide

https://www.intel.com/content/www/us/en/developer/articles/guide/porting-guide-for-ifort-to-ifx.html

under the section on CPU performance:

-O2 Add -x<code> to enable all available Intel optimizations and advanced vectorization. Add -xHost to enable those optimizations the platform where you are compiling.

 

O2 is NOT enough for ifx.  It was for ifort.  With ifx, you only get Intel proprietary optimizations IF you include -xhost or -x<arch> or -ax equivalents.  

 

This is something I am hearing from customers.  They got used to simply using O2 with ifort and are unaware that they have to use O2 and -x<something> with ifx.  I recommend -O2 -xhost.  Try that.

0 Kudos
eliopoulos
Novice
690 Views

How can I set: -O2 -xhost?

0 Kudos
Ron_Green
Moderator
669 Views

O2 will be set by using Release Configuration.  Here is where to find setting /Qxhost

Ron_Green_0-1732732736023.png

 

0 Kudos
eliopoulos
Novice
662 Views

ifort remains 20-30% faster.

0 Kudos
Ron_Green
Moderator
658 Views

Is it possible for you to Clean the project, then zip up the entire solution directory and attach it here? 

 

One other question - is the primary data type REAL, REAL (kind=8), or COMPLEX ?

0 Kudos
eliopoulos
Novice
653 Views

The primary data type is double precision.

0 Kudos
Ron_Green
Moderator
590 Views

Thanks for the files.  But nlay.txt is zero length and it causes the program to exit (end of file during read).  Can you attach a good nlay.txt file?  

0 Kudos
eliopoulos
Novice
586 Views

Here it is.

0 Kudos
eliopoulos
Novice
285 Views

Any news?

0 Kudos
TobiasK
Moderator
118 Views

@eliopoulos thanks for sharing the code. However, your code is quite complex and it will take a while for us to figure out where something is going wrong. If you have purchased priority support, we will treat this with higher priority, but I don't see an entry for you. If you can extract smaller code samples the process on our side is also a lot faster. You may start with Vtune to compare the binaries generated with IFORT/IFX and see where the performance drop comes from. If you need help with Vtune, please ask here:
https://community.intel.com/t5/Analyzers/bd-p/analyzers

 

0 Kudos
Ron_Green
Moderator
81 Views

@eliopoulos I will get to this issue today.  There was a US Holiday Thursday and Friday.  Monday I have been catching up on backlog.

0 Kudos
Reply