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

Programs compiled with ifx are slower than compiled with ifort.

eliopoulos
Novice
1,433 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
24 Replies
Ron_Green
Moderator
1,205 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,197 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,186 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,181 Views

This is what I use:

eliopoulos_0-1732228578655.png

 

0 Kudos
eliopoulos
Novice
972 Views

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

0 Kudos
Mark_Lewy
Valued Contributor I
922 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
899 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
893 Views

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

Ron_Green
Moderator
840 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
832 Views

How can I set: -O2 -xhost?

0 Kudos
Ron_Green
Moderator
811 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
804 Views

ifort remains 20-30% faster.

0 Kudos
Ron_Green
Moderator
800 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
795 Views

The primary data type is double precision.

0 Kudos
Ron_Green
Moderator
732 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
728 Views

Here it is.

0 Kudos
eliopoulos
Novice
427 Views

Any news?

0 Kudos
TobiasK
Moderator
260 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
223 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
Ron_Green
Moderator
119 Views

I need ALL the .txt files.  Here is a list from the code - are there others missing? 

 

open(2,file='laminate.txt')
do i=1,nl
read(2,*)mat(i),thick(i),angled(i)
enddo
close(2)

do i=1,nl
angle(i)=angled(i)*pi/180.0d0
enddo

zk(1)=-sum(thick)/2.0d0+thick(1)/2.0d0
if (nl>1) then
do i=1,nl-1
zk(i+1)=zk(i)+thick(i)/2.0d0+thick(i+1)/2.0d0
enddo
else
endif

open(3,file='Nx.txt')
read(3,*)FtNx
close(3)

open(4,file='Ny.txt')
read(4,*)FtNy
close(4)

open(5,file='Ns.txt')
read(5,*)FtNs
close(5)

open(6,file='Mx.txt')
read(6,*)FtMx
close(6)

open(7,file='My.txt')
read(7,*)FtMy
close(7)

open(8,file='Ms.txt')
read(8,*)FtMs
close(8)
0 Kudos
Reply