[QE-developers] DFTI and OpenMP detection in configure

Ye Luo xw111luoye at gmail.com
Tue Sep 17 15:07:11 CEST 2019


FFTW3 library only have a few functions thread-safe
http://www.fftw.org/doc/Thread-safety.html
I think MKL FFTW3 and DFTI interfaces should be no worse than that.

Anyway, QE DFTI route doesn't call DFTI functions inside explicitly OpenMP
threaded regions and instead rely on the internal threading capability of
threaded MKL to do batched 1D FFT.
This is a safe.
QE with OpenMP turned on + DFTI from threaded MKL should work solid.
If you find any threading issue, it may be a bug and we need to investigate.

Best,
Ye
===================
Ye Luo, Ph.D.
Computational Science Division & Leadership Computing Facility
Argonne National Laboratory


Lorenzo Paulatto <paulatz at gmail.com> 于2019年9月17日周二 上午1:44写道:

> We have three things:
> 1. Intel fourier transform library DFTI
> 2. Intel fourier transform library with FFTW3-like interface in
> MKLROOT/interfaces/fft3xf
> 3. Internal FFTW2 or system FFTW3 open-source library
>
>  From what I've see, performance wise
> 1 is faster 2 is faster than 3
>
> But 1 is not thread safe, hence not compatible with openmp
>
> cheers
>
>
> On 9/16/19 5:33 PM, Ye Luo wrote:
> > I got a bit confused. When you say FFTW, did you it mean the FFTW3
> > library or the internal FFTW shipped with QE?
> >
> > DFTI vs FFTW3 on intel platforms
> > Intel claimed comparable performance using DFTI and FFTW3 interfaces
> > provided by MKL.
> > But QE with DFTI outperforms FFTW3 in both absolute performance and
> > thread salability.
> >
> > I never did a comparison between MKL DFT and fftw.org <http://fftw.org>
> > FFTW3 on Intel platforms.
> >
> > Best,
> >
> > Ye
> > ===================
> > Ye Luo, Ph.D.
> > Computational Science Division & Leadership Computing Facility
> > Argonne National Laboratory
> >
> >
> > Lorenzo Paulatto <paulatz at gmail.com <mailto:paulatz at gmail.com>> 于2019年
> > 9月16日周一 上午4:18写道:
> >
> >     Ok, I answer to myself: using DFTI with openmp causes mysterious
> >     problems usually using diagonalization. Do you know if using the
> Intel
> >     FFTW interface would work around these or if it is exactly the same
> >     thing? Because, the little bit of scalability that I can gain from
> >     openmp is exactly lost by the performance I loose with FFTW3 wrt
> DFTI...
> >
> >     cheers
> >
> >     On 16/09/2019 10:30, Lorenzo Paulatto wrote:
> >      > Hello,
> >      > I have noticed that the configure script detects and enables
> >      > automatically the DFTI FFT libraries when executed without any
> >     specific
> >      > switch, but that it uses FFTW instead when executed with the
> >      > --enable-openmp switch.
> >      >
> >      > I was wondering if this is intentional (i.e. because FFTW can give
> >      > better performance with openmp? Or DFTI does not work with
> >     openmp?) or
> >      > it is a bug.
> >      >
> >      > cheers
> >      >
> >
> >     --
> >     Dr. Lorenzo Paulatto
> >     IdR @ IMPMC - CNRS UMR 7590 & Sorbonne Université
> >     phone: +33 (0)1 442 79822 / skype: paulatz
> >     <http://www.impmc.upmc.fr/~paulatto/> <http://sf.net/p/d3q>
> >     23-24/423 B115, 4 place Jussieu 75252 Paris CX 05
> >
> >     --
> >     Lorenzo Paulatto - Paris
> >     _______________________________________________
> >     developers mailing list
> >     developers at lists.quantum-espresso.org
> >     <mailto:developers at lists.quantum-espresso.org>
> >     https://lists.quantum-espresso.org/mailman/listinfo/developers
> >
> >
> > _______________________________________________
> > developers mailing list
> > developers at lists.quantum-espresso.org
> > https://lists.quantum-espresso.org/mailman/listinfo/developers
> >
>
> --
> Lorenzo Paulatto - Paris
> _______________________________________________
> developers mailing list
> developers at lists.quantum-espresso.org
> https://lists.quantum-espresso.org/mailman/listinfo/developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/developers/attachments/20190917/0a704a77/attachment.html>


More information about the developers mailing list