[Pw_forum] patch to allow compilation with MKL FFTW3

David Strubbe dstrubbe at berkeley.edu
Thu Apr 21 01:25:15 CEST 2016


In trying to compile version 5.3.0 with Intel compilers (version 16.0.0
20150815) and Intel MPI, using MKL version 2016.0.109 for FFTW3, I got the
following error for linking pw.x:

mpiifort  -o pw.x \
           pwscf.o  libpw.a ../../Modules/libqemod.a
../../FFTXlib/libqefft.a ../../flib/ptools.a ../../flib/flib.a
../../clib/clib.a ../../iotk/src/libiotk.a -lmkl_scalapack_lp64
-Wl,--start-group
/opt/intel/compilers_and_libraries_2016.0.109/linux/mkl/lib/intel64/libmkl_intel_lp64.a
/opt/intel/compilers_and_libraries_2016.0.109/linux/mkl/lib/intel64/libmkl_sequential.a
/opt/intel/compilers_and_libraries_2016.0.109/linux/mkl/lib/intel64/libmkl_core.a
/opt/intel/compilers_and_libraries_2016.0.109/linux/mkl/lib/intel64/libmkl_blacs_intelmpi_lp64.a
-Wl,--end-group
/opt/intel/compilers_and_libraries_2016.0.109/linux/mkl/lib/intel64/libmkl_intel_lp64.a(fftw_version.o):(.rodata+0x0):
multiple definition of `fftw_version'
../../FFTXlib/libqefft.a(fft_stick.o):(.data+0x430): first defined here
ld: Warning: size of symbol `fftw_version' changed from 8 in
../../FFTXlib/libqefft.a(fft_stick.o) to 27 in
/opt/intel/compilers_and_libraries_2016.0.109/linux/mkl/lib/intel64/libmkl_intel_lp64.a(fftw_version.o)


I solved this problem by removing the following three offending lines:

clib/fftw.h:129:extern char *fftw_version;
FFTXlib/fftw.h:136:extern char *fftw_version;
FFTXlib/fftw.c:348:char *fftw_version = "FFTW V1.1 ($Id: fftw.c,v 1.3
2010-01-26 14:06:59 giannozz Exp $)";

Then compilation and running of pw.x are successful. As far as I can tell,
those fftw_version lines do not serve any purpose at least for pw, pp, or
ph, since I do not find this variable being used anywhere else in those
parts of the code. I recommend the removal of these lines, or if in some
plugin I have not downloaded the fftw_version is actually used, I suggest
you rename it to avoid this name clash.

Cheers,
David Strubbe
MIT
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/users/attachments/20160420/3e7489ff/attachment.html>


More information about the users mailing list