FFTW / fftw3

DO NOT CHECK OUT THESE FILES FROM GITHUB UNLESS YOU KNOW WHAT YOU ARE DOING. (See below.)
GNU General Public License v2.0
2.73k stars 665 forks source link

error compiling FFTW3 quad-precision with icc & ifort #83

Open ivyalov opened 7 years ago

ivyalov commented 7 years ago

Hi,

I have tried to compile quadruple precision FFTW3 with intel tools

cd fftw-3.3.5
FC=ifort CC=icc ./configure --enable-quad-precision
make

and got the following errors

 ===============error-free output of make above================
/bin/sh ../libtool  --tag=CC   --mode=compile icc -std=gnu99 -no-gcc -DHAVE_CONFIG_H -I. -I..  -I../kernel -I../dft -I../rdft -I../reodft   -O3 -ansi-alias -malign-double -MT apiplan.lo -MD -MP -MF .deps/apiplan.Tpo -c -o apiplan.lo apiplan.c
libtool: compile:  icc -std=gnu99 -no-gcc -DHAVE_CONFIG_H -I. -I.. -I../kernel -I../dft -I../rdft -I../reodft -O3 -ansi-alias -malign-double -MT apiplan.lo -MD -MP -MF .deps/apiplan.Tpo -c apiplan.c -o apiplan.o
In file included from apiplan.c(21):
api.h(82): error: identifier "fftwq_iodim" is undefined
  tensor *X(mktensor_iodims)(int rank, const X(iodim) *dims, int is, int os);
                                             ^

In file included from apiplan.c(21):
api.h(83): error: identifier "fftwq_iodim64" is undefined
  tensor *X(mktensor_iodims64)(int rank, const X(iodim64) *dims, int is, int os);
                                               ^

In file included from apiplan.c(21):
api.h(88): error: identifier "fftwq_iodim" is undefined
  int X(guru_kosherp)(int rank, const X(iodim) *dims,
                                      ^

In file included from apiplan.c(21):
api.h(89): error: identifier "fftwq_iodim" is undefined
              int howmany_rank, const X(iodim) *howmany_dims);
                                      ^

In file included from apiplan.c(21):
api.h(90): error: identifier "fftwq_iodim64" is undefined
  int X(guru64_kosherp)(int rank, const X(iodim64) *dims,
                                        ^

In file included from apiplan.c(21):
api.h(91): error: identifier "fftwq_iodim64" is undefined
              int howmany_rank, const X(iodim64) *howmany_dims);
                                      ^

In file included from apiplan.c(21):
api.h(107): error: identifier "fftwq_r2r_kind" is undefined
  rdft_kind *X(map_r2r_kind)(int rank, const X(r2r_kind) * kind);
                                             ^

apiplan.c(179): error: identifier "fftwq_plan" is undefined
  void X(destroy_plan)(X(plan) p)
                       ^

compilation aborted for apiplan.c (code 2)

I tried few versions from 3.3 to 3.3.6 and they all end up this way. Is there a way to fix it?

Sincerely, Ivan

ivyalov commented 7 years ago

Ok, I was pointed to the related section of the manual, saying that it won't work:

--enable-quad-precision: Produces a quadruple-precision version of FFTW using the nonstandard __float128 type provided by gcc 4.6 or later on x86, x86-64, and Itanium architectures, instead of the default double-precision (double). The configure script will halt with an error message if the compiler is not gcc version 4.6 or later or if gcc’s libquadmath library is not installed. See Precision.

Just the configure script didn't generate any message.

matteo-frigo commented 7 years ago

Well, the configure script is checking for gcc>=4.6. I think that the problem is that icc pretends to be gcc and it confuses the script. I wish Intel stopped doing that.