[Wien] FFTW and ifx/icx issue relevant to WIEN2k

Peter Blaha peter.blaha at tuwien.ac.at
Wed Sep 10 15:06:00 CEST 2025


I recently tried it. Intels fft in the mkl is even a bit faster than 
fftw3 and it works fine in the sequential code, probably except 3ddens !

But because there is no mpi-fftw with Intel, one needs to have the fftw3 
anyway.
The intel fftw (cdftlib) is maybe an alternative for a stand-alone 
PC/laptop compilation (if you don't need 3ddens).


Am 10.09.2025 um 14:28 schrieb Laurence Marks:
> Just to clarify one statement I made: linking against both your own fftw 
> & Intel's is very dangerous. It may be that some subroutines will come 
> from your library, some from Intel's and there is no reason they should 
> be compatible. Only use one of the two.
> 
> N.B., I am not certain that the Intel fftw is compatible with W2k. I 
> tried some years ago and decided I was wasting time on non-critical 
> code, so only use fftw3. If someone is using cdft please post here.
> 
> ___
> Emeritus Professor Laurence Marks (Laurie)
> Department of Materials Science and Engineering, Northwestern University
> www.numis.northwestern.edu <http://www.numis.northwestern.edu>
> "Research is to see what everybody else has seen, and to think what 
> nobody else has thought" Albert Szent-Györgyi
> 
> On Wed, Sep 10, 2025, 01:51 Fecher, Gerhard <fecher at uni-mainz.de 
> <mailto:fecher at uni-mainz.de>> wrote:
> 
>     more comments
>     I could not find that zenver5 is a valid CPU architecture for ixc or
>     ifx on https://www.intel.com/content/www/us/en/docs/fortran-
>     compiler/developer-guide-reference/2025-2/march.html <https://
>     www.intel.com/content/www/us/en/docs/fortran-compiler/developer-
>     guide-reference/2025-2/march.html>
>     (this concerns also other CPU dependent compiler switches -x, -ax, -
>     arch, there is no zenverX)
>     It seems it was just used by a "beginner" hoshi on https://
>     community.intel.com/t5/Intel-Fortran-Compiler/Compilation-error-
>     with-fast-on-AMD-Ryzen-9-9900X-using-ifx/td-p/1712241 <https://
>     community.intel.com/t5/Intel-Fortran-Compiler/Compilation-error-
>     with-fast-on-AMD-Ryzen-9-9900X-using-ifx/td-p/1712241>
>     I would guess  -march=znver5 (because it can be used with the GNU
>     compilers) is just ignored why should Intel be interested to write
>     an optimized comnpiler for AMD CPU's ?
>     Did you ever test whether -march=znver5 changes anything  ?
>     As mentioned earlier -axCORE-AVX512, -axCORE-AVX2 or a combination
>     of both may work on AMD processors (at least they don't slow the
>     programm seriuously, and I didn't find dead electrons)
> 
>     There was already a lot of discussion on FFTW3 and ELPA at the
>     beginning of the year
> 
>     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 <mailto:wien-
>     bounces at zeus.theochem.tuwien.ac.at>] im Auftrag von Laurence Marks
>     [laurence.marks at gmail.com <mailto:laurence.marks at gmail.com>]
>     Gesendet: Dienstag, 9. September 2025 23:20
>     An: A Mailing list for WIEN2k users
>     Betreff: Re: [Wien] FFTW and ifx/icx issue relevant to WIEN2k
> 
>     Comments.
> 
>        1.  I have never seen -O3 do anything with icc/ifort except kill
>     defenceless electrons and make the code slower. I will be happy to
>     be proved wrong with ifx/icx.
>        2.  I always use -mkl, rather than making mistakes chasing how
>     intel changes its libraries.
>        3.  I think you might have issues with -mkl_cdft (intel's version
>     of fftw) and FFTW3
> 
>     On Tue, Sep 9, 2025 at 4:10 PM Straus, Daniel B <dstraus at tulane.edu
>     <mailto:dstraus at tulane.edu><mailto:dstraus at tulane.edu
>     <mailto:dstraus at tulane.edu>>> wrote:
>     Sorry for the long delay in responding—I was set to receive a digest
>     of list messages, and it only comes once every couple of weeks.
> 
>     Yes, this is on a Zen 5 computer, and it is running Rocky Linux 10.
>     I am using the Intel compiler and MKL, rather than the one AMD
>     provides. IFX and ICX support the march=znver5 flag. All the WIEN2k
>     24.1 patches available as of 9/1 were installed.
> 
>     To be clear, on my workstation, FFTW still will work with WIEN2k
>     even if the autoconf script is not regenerated, but there may be a
>     performance impact as it is not using the proper Intel libraries for
>     Fortran calls to FFTW. However, 3ddens would then not compile, and
>     if I also attempted to use ELPA, then parallel LAPW1 would not
>     compile. Regenerating the autoconf script for FFTW and recompiling
>     it solved both problems. You should check the config.log for your
>     FFTW compilation to see if there is a line such as “ld: cannot find
>     -loopopt=0” to see if this error is occurring. For me, the configure
>     script continued even after this error, but it was using GNU default
>     libraries rather than the Intel provided libraries.
> 
>     siteconfig_lapw is set to use the ifx and icx compilers, and here
>     are the flags under “Options” in siteconfig_lapw I am using the
>     following compiler options for WIEN2k with the IFX compiler.
>     Current settings:
>        M   OpenMP switch:           -qopenmp
>        O   Compiler options:        -O3 -march=znver5 -traceback -assume
>     buffered_io -FR -I$(MKLROOT)/include
>        L   Linker Flags:            $(FOPT) -L$(MKLROOT)/lib -lpthread -
>     lm -ldl -liomp5 -Wl,-rpath,$MKLROOT/lib
>        P   Preprocessor flags       '-DParallel'
>        R   R_LIBS (LAPACK+BLAS):    -lmkl_intel_lp64 -lmkl_intel_thread
>     -lmkl_core
>        F   FFTW options:            -DFFTW3 -DFFTW_OMP -I/home/software/
>     fftw-3.3.10/include
>            FFTW-LIBS:               -L/home/software/fftw-3.3.10/lib -
>     lfftw3 -lfftw3_omp
>        X   LIBX options:
>            LIBXC-LIBS:
> 
>     For Parallel Options in siteconfig_lapw, here are the flags I am using:
>     Your current parallel settings (options and libraries) are:
>           C   Parallel Compiler:          mpiifx
>           FP  Parallel Compiler Options:  -O3 -FR -march=znver5 -fc=ifx
>     -traceback -assume buffered_io -I$(MKLROOT)/include
>           MP  MPIRUN command:             mpirun -np _NP_ -machinefile
>     _HOSTS_ _EXEC_
>           O   Parallel OpenMP switch:     -qopenmp
>         Additional setting for SLURM batch systems (is set to 1 otherwise):
>           CN  Number of Cores:            1
>         Libraries:
>           Sp  SCALAPACK:                   -L$(MKLROOT)/lib
>                                                           -
>     lmkl_scalapack_lp64
>                                                           -L$(MKLROOT)/
>     lib -lmkl_blacs_intelmpi_lp64
>           E   ELPA options:                -DELPA -I/home/software/
>     elpa-2025.06.001/include/elpa-2025.06.001/elpa
>                                                           -I/home/
>     software/elpa-2025.06.001/include/elpa-2025.06.001/modules
>               ELPA-LIBS:                   -lelpa -L/home/software/
>     elpa-2025.06.001/lib -Wl,-rpath=/home/software/elpa-2025.06.001/lib
>           RP  Parallel-Libs:      $(R_LIBS) -lmkl_cdft_core
> 
>     In case it’s relevant here is what I passed to the configure script
>     for FFTW3 (after regenerating the script with autoconf):
>     module load oneapi/2025.2.0
>     ./configure --prefix=/home/software/fftw-3.3.10 CC="mpiicx -cc=icx"
>     MPICC="mpiicx -cc=icx" F77="mpiifx -fc=ifx" FFLAGS="-O3 -
>     march=znver5 -I"${MKLROOT}/include"" CFLAGS="-O3 -march=znver5 -
>     I"${MKLROOT}/include"" CXXFLAGS="-I"${MKLROOT}/include"" LDFLAGS="-
>     L${MKLROOT}/lib -lmkl_scalapack_lp64 -lmkl_cdft_core -
>     lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -
>     lmkl_blacs_intelmpi_lp64 -liomp5 -lpthread -lm -ldl" --enable-
>     option-checking=fatal --enable-avx512 --enable-avx2 --enable-mpi --
>     enable-openmp --enable-threads
> 
>     And for ELPA:
>     module load oneapi/2025.2.0
>     ./configure --prefix=/home/software/elpa-2025.06.001 CC="mpiicx -
>     cc=icx" CXX="mpiicpx -cxx=icpx" FC="mpiifx -fc=ifx" CFLAGS="-O3 -
>     march=znver5 -I"${MKLROOT}/include"" FCFLAGS="-O3 -march=znver5 -
>     I"${MKLROOT}/include"" CXXFLAGS="-O3 -march=znver5 -I"${MKLROOT}/
>     include"" LDFLAGS="-L${MKLROOT}/lib -lmkl_scalapack_lp64 -
>     lmkl_cdft_core -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -
>     lmkl_blacs_intelmpi_lp64 -liomp5 -lpthread -lm -ldl" --enable-
>     option-checking=fatal --with-mpi=yes --enable-openmp=yes
> 
>     Hopefully this is helpful.
> 
> 
> 
>     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/ <http://straus.tulane.edu/>
> 
>     _______________________________________________
>     Wien mailing list
>     Wien at zeus.theochem.tuwien.ac.at
>     <mailto:Wien at zeus.theochem.tuwien.ac.at><mailto:Wien at zeus.theochem.tuwien.ac.at <mailto:Wien at zeus.theochem.tuwien.ac.at>>
>     http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien <http://
>     zeus.theochem.tuwien.ac.at/mailman/listinfo/wien>
>     SEARCH the MAILING-LIST at: http://www.mail-archive.com/
>     wien at zeus.theochem.tuwien.ac.at/index.html <http://www.mail-
>     archive.com/wien at zeus.theochem.tuwien.ac.at/index.html>
> 
> 
>     --
>     Emeritus Professor Laurence Marks (Laurie)
>     Northwestern University
>     Webpage<http://www.numis.northwestern.edu <http://
>     www.numis.northwestern.edu>> and Google Scholar link<http://
>     scholar.google.com/citations?user=zmHhI9gAAAAJ&hl=en <http://
>     scholar.google.com/citations?user=zmHhI9gAAAAJ&hl=en>>
>     "Research is to see what everybody else has seen, and to think what
>     nobody else has thought", Albert Szent-Györgyi
>     _______________________________________________
>     Wien mailing list
>     Wien at zeus.theochem.tuwien.ac.at <mailto:Wien at zeus.theochem.tuwien.ac.at>
>     http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien <http://
>     zeus.theochem.tuwien.ac.at/mailman/listinfo/wien>
>     SEARCH the MAILING-LIST at: http://www.mail-archive.com/
>     wien at zeus.theochem.tuwien.ac.at/index.html <http://www.mail-
>     archive.com/wien at zeus.theochem.tuwien.ac.at/index.html>
> 
> 
> _______________________________________________
> Wien mailing list
> Wien at zeus.theochem.tuwien.ac.at
> http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
> SEARCH the MAILING-LIST at:  http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html

-- 
-----------------------------------------------------------------------
Peter Blaha,  Inst. f. Materials Chemistry, TU Vienna, A-1060 Vienna
Phone: +43-158801165300
Email: peter.blaha at tuwien.ac.at
WWW:   http://www.imc.tuwien.ac.at      WIEN2k: http://www.wien2k.at
-------------------------------------------------------------------------



More information about the Wien mailing list