Many errors with Intel 2017 compilers in test suite (popt, 3.0 and 4.1)

239 views
Skip to first unread message

Stefan Becuwe

unread,
May 5, 2017, 6:14:35 AM5/5/17
to cp2k
Hello,

Has anyone experience with the Intel 2017 compilers (update 3)? For the sopt version (just bare, no libxc, libint, ...), 3.0 and 4.1 produce 0 failed and 0 wrong tests. Great!
However, running the same tests for the popt version (just bare, no libxc, libint, ...), we get 125 failed and 840 wrong tests for 3.0, and 134 failed and 902 wrong tests for 4.1.
Has someone already investigated this issue? Any suggestions?

Regards,
Stefan

Andreas Glöss

unread,
May 6, 2017, 3:42:21 AM5/6/17
to cp2k
Dear Stefan,

Intel 2017 parallel compiler suite seems to have a bug in their FFT interface - already reported to Intel. What works quite well for CP2K-trunk, is using the compiler suite for Scalapack/Blacs, MKL, MPI/OMP and leave FFTs to a self-compiled version of FFTW3.

The bug can easily be reproduced - just run test/QS/benchmark/H2O-64.inp with more than one MPI rank. The SCF-energy should diverge rapidly when using Intels FFT.

Best regards, and hope this helps,
Andreas

Stefan Becuwe

unread,
May 8, 2017, 4:26:38 AM5/8/17
to cp2k
Dear Andreas,

Thanks for the info! We will try to install a version of CP2K with FFTW3. I'll post the results. We already noticed that reducing 2 MPI ranks (default) to 1 MPI rank the number of errors dropped: from 134 FAILED, 902 WRONG to 0 FAILED en 2 WRONG. We also noticed some other issues with different Intel compilers... I started a new thread for that one [https://groups.google.com/d/msg/cp2k/WlUieY2TEsI/R8O0waf6AQAJ]

Regards,
Stefan

Stefan Becuwe

unread,
May 8, 2017, 6:00:40 AM5/8/17
to cp2k
Dear Andreas,

Intel 2017 parallel compiler suite seems to have a bug in their FFT interface - already reported to Intel. What works quite well for CP2K-trunk, is using the compiler suite for Scalapack/Blacs, MKL, MPI/OMP and leave FFTs to a self-compiled version of FFTW3.

Are there any guidelines how to use MKL on the one hand and use an "external" FFTW3 on the other hand? 

I found in src/pw/fft/fftw3_lib.F following line, which gives me the impression it's maybe not that simple to decouple MKL and MKL's FFT.
#if defined (__INTEL_COMPILER) && defined (__MKL) && defined (__FFTW3) 

Thanks!

Regards,
Stefan

Andreas Glöss

unread,
May 8, 2017, 7:08:15 AM5/8/17
to cp2k
Hi Stefan,

This line:

  #if defined (__INTEL_COMPILER) && defined (__MKL) && defined (__FFTW3)

and the following just ensure that we are using a thread-safe MKL. Since MKL 2011.02, this should be fine. Therefore, the following (schematic) lib, inc, preproc and compiler flag lines should do the trick (for psmp version).

LIBS     = -Wl,--start-group \
             ${FFTW_LIB}/libfftw3.a \
             ${FFTW_LIB}/libfftw3_omp.a \
           -Wl,--end-group
LIBS    += ${MKLROOT}/lib/intel64/libmkl_scalapack_lp64.a \
           -Wl,--start-group \
             ${MKLROOT}/lib/intel64/libmkl_intel_lp64.a \
             ${MKLROOT}/lib/intel64/libmkl_sequential.a \
             ${MKLROOT}/lib/intel64/libmkl_core.a \
             ${MKLROOT}/lib/intel64/libmkl_blacs_intelmpi_lp64.a \
           -Wl,--end-group \
           -lpthread -lm -ldl

INCS     = -I${FFTW_INCLUDE}
INCS    += -I${MKLROOT}/include

DFLAGS   = -D__parallel -D__SCALAPACK -D__MPI_VERSION=3 \
           -D__FFTW3 \
           -D__HAS_ISO_C_BINDING

CFLAGS += $(INCS)
FCFLAGS += $(INCS)
LDFLAGS += $(INCS)

... plus all the rest of your original ARCH file ...

Best regards,
Andreas

Stefan Becuwe

unread,
May 8, 2017, 10:26:32 AM5/8/17
to cp2k
Dear Andreas,

Thanks for information. Number of errors in the test suite has been reduced to 0!

Kind regards,
Stefan
Reply all
Reply to author
Forward
0 new messages