Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29274 ディスカッション

Programs compiled with ifx are slower than compiled with ifort.

eliopoulos
初心者
6,546件の閲覧回数

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.

28 返答(返信)
Ron_Green
モデレーター
4,066件の閲覧回数

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.

eliopoulos
初心者
4,058件の閲覧回数

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.

Ron_Green
モデレーター
4,047件の閲覧回数

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

 

eliopoulos
初心者
4,042件の閲覧回数

This is what I use:

eliopoulos_0-1732228578655.png

 

eliopoulos
初心者
3,833件の閲覧回数

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

Mark_Lewy
高評価コントリビューター I
3,783件の閲覧回数

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.

 

eliopoulos
初心者
3,760件の閲覧回数

My compiler options:

eliopoulos_0-1732720290967.png

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

Mark_Lewy
高評価コントリビューター I
3,754件の閲覧回数

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

Ron_Green
モデレーター
3,702件の閲覧回数

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.

eliopoulos
初心者
3,694件の閲覧回数

How can I set: -O2 -xhost?

Ron_Green
モデレーター
3,673件の閲覧回数

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

Ron_Green_0-1732732736023.png

 

eliopoulos
初心者
3,666件の閲覧回数

ifort remains 20-30% faster.

Ron_Green
モデレーター
3,662件の閲覧回数

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 ?

eliopoulos
初心者
3,657件の閲覧回数

The primary data type is double precision.

Ron_Green
モデレーター
3,594件の閲覧回数

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?  

eliopoulos
初心者
3,590件の閲覧回数

Here it is.

eliopoulos
初心者
3,289件の閲覧回数

Any news?

TobiasK
モデレーター
3,122件の閲覧回数

@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

 

Ron_Green
モデレーター
3,085件の閲覧回数

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

Ron_Green
モデレーター
2,986件の閲覧回数

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)
返信