[Wien] Issues with -O3 optimization and ifx

Fecher, Gerhard fecher at uni-mainz.de
Fri Mar 13 09:29:57 CET 2026


Hallo Daniel,
is the ifx version correct ?         was fftw3 (and other libraries) compiled with the same compiler version ?
ifx -v should tell: ifx version 2025.3.2

I compiled Wien2k and fftw 3 succesfully with that version, my Options are:
free -w -O3 -axCORE-AVX512 -fp-model=precise -DINTEL_VML -traceback -assume buffered_io -I$(MKLROOT)/include

I had no problems to run Wien2k on a machine with 2x AMD EPYC 9354, that is the results of a fast test were the same as with ifort.

however, -O3 was never recommended and it does not accelerate anything, usually I use -O2
the switch  -axCORE-AVX512 is also not needed (even so sometimes mentioned for AMD processors), 
... on Intel XEONs I use -xHost which brings some performance if OMP extensions are used.
I would recommend for the AMDs:
free -w -O2 -fp-model=precise -DINTEL_VML -traceback -assume buffered_io -I$(MKLROOT)/include

It seems that the switch march=xnver4 or xnver4 is only used for compatibility with the gnu compiler.
I mentioned already earlier that there is no need for Intel to optimize the programs for AMD processors.

I made some tests with openmp and SIMD extensions using a programm with parallelized loops, there was no improvement of performance with this switch, 
the fastes runs have been always those where I used only -O2, in some OMP cases znver4 resulted in a performance loss for double precision calculations.

The znver4 switch did also not improve when used with the AMD compiler (flang), however the flang with -O2 resulted (compared to ifx) in faster execution of the SIMD test. 

Ciao
Gerhard

DEEP THOUGHT in D. Adams; Hitchhikers Guide to the Galaxy:
"I think the problem, to be quite honest with you,
is that you have never actually known what the question is."

====================================
Dr. Gerhard H. Fecher
Institut of Physics
Johannes Gutenberg - University
55099 Mainz
________________________________________
Von: Wien [wien-bounces at zeus.theochem.tuwien.ac.at] im Auftrag von Straus, Daniel B [dstraus at tulane.edu]
Gesendet: Donnerstag, 12. März 2026 21:17
An: A Mailing list for WIEN2k users
Betreff: [Wien] Issues with -O3 optimization and ifx

On a recently compiled copy of version 24.1 (with all patches applied) using Intel ifx version 2025.30, I attempted to set up a calculation but encountered very strange issues with nn where it gave nonsensical distances between atoms. On an older computer where ifort was used to compile WIEN2k 24.1, the same cif worked fine in cif2struct, setrmt, nn, etc.

I tracked it down to a compiler flag issue related to using the -O3 optimization flag. Using -O instead of -O3 solved the problem, and now everything behaves as expected.

For what it is worth, my successful compiler flags are (the system has a Ryzen 9950x, hence the march=znver5 flag):
(for regular execution) -O -march=znver5 -traceback -assume buffered_io -FR -I$(MKLROOT)/include -ipo -fp-model=precise
(for parallel execution, linked to ELPA) -O -march=znver5 -traceback -assume buffered_io -FR -I$(MKLROOT)/include -ipo -fp-model=precise -static -fc=ifx

Hopefully, this message can save someone a few hours of troubleshooting down the line.


Daniel Straus
Assistant Professor
Department of Chemistry
Tulane University
5088 Percival Stern Hall
6400 Freret Street
New Orleans, LA 70118
(504) 862-3585
http://straus.tulane.edu/




More information about the Wien mailing list