[Q-e-developers] multiple definitions of fftw_version

Paolo Giannozzi p.giannozzi at gmail.com
Tue Jan 12 14:29:22 CET 2016


If nobody has better ideas or different proposals, I'll proceed soon to
remove the "fftw_version" variable from FFTXlib/fftw.c and FFTXlib/fftw.h

Paolo

On Tue, Jan 12, 2016 at 1:01 PM, Paolo Giannozzi <p.giannozzi at gmail.com>
wrote:

> Replacing fftw_version with something else in fftw.h and fftw.c seems to
> me by far the simplest solution. By the way, the content of the
> fftw_version string:
>
> char *fftw_version = "FFTW V1.1 ($Id: fftw.c,v 1.3 2010-01-26 14:06:59
> giannozz Exp $)";
>
> is misleading: I am in no way responsible for introducing fftw.c into the
> distribution, I know nothing about its origin and what happened on January
> 26 2010 around 2pm.
>
> Paolo
>
> On Tue, Jan 12, 2016 at 12:15 PM, Lorenzo Paulatto <
> lorenzo.paulatto at impmc.upmc.fr> wrote:
>
>> On Tuesday, January 12, 2016 10:44:12 AM Filippo SPIGA wrote:
>> > Ciao Lorenzo,
>> >
>> > thanks for reporting this. Did you run the configure and then
>> immediately
>> > run make directly or did you manually hack the make.sys after configure
>> and
>> > before run make?
>>
>> I run configure first, then overwrote it with an older one which I further
>> edited a bit, I think I also tried to just run configure and compile. I
>> did
>> however copy the code over rsync with a certain list of --exclude which is
>> supposed to not overwrite the compiled files and configuration, so that
>> may
>> also be a cause.
>>
>> I'm trying now to take a pristine qe 5.3.0., untar configure and make.
>>
>> This machine is a bit complicated, as I would prefer to use SGI MPT +
>> intel
>> compiler, but for the sake of argument I'm now using intel MPI, which
>> makes
>> the make.sys as produced by configure ALMOST work without any hacking (I
>> have
>> to change openmpi to intelmpi in for blacs)
>>
>> As long as I stick with the default (I only set MPIF90=mpiifort)
>> everything is
>> ok, but it link to some system fftw3
>>
>> ldd bin/pw.x
>>         ...
>>    libfftw3.so.3 => /usr/lib64/libfftw3.so.3 (0x00007ffff71ef000)
>>
>> If I edit make.sys to use intel fftw3 interface I get the same problem as
>> before. I.e. I only changed:
>>
>> FFT_LIBS = -lfftw3
>>   to
>> FFT_LIBS       =
>> /opt/dev/intel/2015.0.022/composer_xe_2015.0.090/mkl/lib/
>> intel64/libfftw3xf_intel.a
>>
>>
>> Same result if I run ./configure FFT_LIBS=/opt/dev... instead of changing
>> the
>> makefile by hand
>>
>>
>> I'm attaching this make sys as well
>>
>> HTH
>>
>>
>>
>>
>> >
>> > --
>> > Mr. Filippo SPIGA, M.Sc.
>> > Quantum ESPRESSO Foundation
>> > http://www.quantum-espresso.org ~ skype: filippo.spiga
>> >
>> > *****
>> > Disclaimer: "Please note this message and any attachments are
>> CONFIDENTIAL
>> > and may be privileged or otherwise protected from disclosure. The
>> contents
>> > are not to be disclosed to anyone other than the addressee. Unauthorized
>> > recipients are requested to preserve this confidentiality and to advise
>> the
>> > sender immediately of any error in transmission."
>> > On Jan 12, 2016, at 10:04 AM, Lorenzo Paulatto
>> <lorenzo.paulatto at impmc.upmc.fr> wrote:
>> > > Hello,
>> > > and thank you for the new 5.3.0 release.
>> > >
>> > > I have a problem compiling it with ifort 15.0.0 and linking against
>> the
>> > > intel fftw3 interface:
>> > >
>> > > ifort  -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 -Wl,--start-group
>> > > /opt/dev/intel/2015.0.022/composer_xe_2015.0.090/
>> > > mkl/lib/intel64/libmkl_scalapack_lp64.a  /opt/dev/intel/2015.0.022/
>> > > composer_xe_2015.0.090/mkl/lib/intel64/libmkl_intel_lp64.a
>> > > /opt/dev/intel/
>> > > 2015.0.022/composer_xe_2015.0.090/mkl/lib/intel64/libmkl_core.a
>> /opt/dev/
>> > >
>> intel/2015.0.022/composer_xe_2015.0.090/mkl/lib/intel64/libmkl_sequential
>> > > .a  / opt/dev/intel/2015.0.022/composer_xe_2015.0.090/mkl/lib/intel64/
>> > > libmkl_blacs_sgimpt_lp64.a -Wl,--end-group -lpthread -lm
>> /opt/dev/intel/
>> > > 2015.0.022/composer_xe_2015/mkl/interfaces/fftw3xf/libfftw3xf_intel.a
>> > > -L/ opt/sgi/mpt/mpt-2.11/lib -lmpi -lpthread /usr/lib64/libcpuset.so.1
>> > > /usr/lib64/ libbitmask.so.1
>> > > /opt/dev/intel/2015.0.022/composer_xe_2015.0.090/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 25 in /opt/dev/intel/2015.0.022/
>> > >
>> composer_xe_2015.0.090/mkl/lib/intel64/libmkl_intel_lp64.a(fftw_version.o)
>> > > make[2]: *** [pw.x] Error 1
>> > > make[2]: Leaving directory `/lustrework/paulatto/espresso/PW/src'
>> > > make[1]: *** [pw] Error 1
>> > > make[1]: Leaving directory `/lustrework/paulatto/espresso/PW'
>> > > make: *** [pw] Error 1
>> > >
>> > >
>> > > It is not especially clear to me what the source of the problem is,
>> but I
>> > > guess that the fftw.h which comes with FFTXlib does not match the one
>> in
>> > >
>> /opt/dev/intel/2015.0.022/composer_xe_2015.0.090/mkl/include/fftw/fftw.h
>> > >
>> > > Copying it over does not solve the problem as I get:
>> > > In file included from fft_stick.c(21):
>> > > fftw.c(163): error: identifier "notw_codelet" is undefined
>> > >
>> > >  extern notw_codelet fftw_no_twiddle_1;
>> > >
>> > >         ^
>> > >
>> > > t
>> > > Neither can I remove fftw.h and add a -I/opt/dev/intel/... because of
>> how
>> > > the makefile is made:
>> > > make: *** No rule to make target `fftw.h', needed by `fft_stick.o'.
>> Stop.
>> > >
>> > >
>> > > I noticed that fftw_version is only defined in fftw.c, which, if I
>> > > understand correctl, should not be compiled as I am using -D__FFTW3,
>> but
>> > > it is included from fft_stick.c
>> > >
>> > >
>> > > I finally solved the problem by commenting out the definition of
>> > > ffw_version from FFTXlib/fftw.c, but I'm not sure the solution is
>> ideal
>> > > and I also have doublt about which fftw is actually being used (the
>> > > optimized intel one or the one included?)
>> > >
>> > >
>> > >
>> > > Another solution is to use -D__DFTI instead, which has some other
>> > > advantages, but Carlo expressed some concern about its thread safety
>> and
>> > > I'm left with the doubt about what is actually being used in the code.
>> > >
>> > >
>> > > Could the experts have a go at this?
>> > >
>> > > I'm attaching the relevant make.sys, renamed
>> >
>> > _______________________________________________
>> > Q-e-developers mailing list
>> > Q-e-developers at qe-forge.org
>> > http://qe-forge.org/mailman/listinfo/q-e-developers
>>
>> --
>> Dr. Lorenzo Paulatto
>> IdR @ IMPMC -- CNRS & Université Paris 6
>> +33 (0)1 44 275 084 / skype: paulatz
>> http://www.impmc.upmc.fr/~paulatto/
>> 23-24/4é16 Boîte courrier 115,
>> 4 place Jussieu 75252 Paris Cédex 05
>>
>> _______________________________________________
>> Q-e-developers mailing list
>> Q-e-developers at qe-forge.org
>> http://qe-forge.org/mailman/listinfo/q-e-developers
>>
>>
>
>
> --
> Paolo Giannozzi, Dip. Scienze Matematiche Informatiche e Fisiche,
> Univ. Udine, via delle Scienze 208, 33100 Udine, Italy
> Phone +39-0432-558216, fax +39-0432-558222
>
>


-- 
Paolo Giannozzi, Dip. Scienze Matematiche Informatiche e Fisiche,
Univ. Udine, via delle Scienze 208, 33100 Udine, Italy
Phone +39-0432-558216, fax +39-0432-558222
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/developers/attachments/20160112/f80f7aca/attachment.html>


More information about the developers mailing list