const
.
FFTW is a heavily-optimized piece of software that is likely to push
compilers to their limits. We have successfully used
gcc
3.2.x on x86 and PPC, a recent Compaq C compiler for Alpha, version 6
of IBM's xlc
compiler for AIX, Intel's icc
versions 5-7, Sun WorkShop cc
version 6, for example.
gcc
2.95.3 for Solaris/SPARC produces incorrect code for
the test program (workaround: recompile the
libbench2
directory with -O2
). NetBSD/macppc 1.5 comes with a gcc
version that also miscompiles the test program (we
haven't tried to find a workaround).
ranlib
of GNU binutils
2.9.1 on Irix has been observed to corrupt the FFTW libraries, causing a link failure when
FFTW is compiled. Since ranlib
is completely superfluous on Irix, we suggest deleting it from your system and replacing it with
a symbolic link to /bin/echo
.
If support for SIMD instructions is enabled in FFTW, further compiler
problems may appear. Some 3.0.x and 3.1.x versions of
gcc
may crash, although the problem is fixed in version
3.2. gcc
2.95 on MacOS X miscompiles AltiVec code (fixed in
later version). gcc
3.2.x miscompiles AltiVec permutations, but FFTW has a workaround. Intel's
icc
6.0 misaligns SSE constants, but FFTW has a workaround.
const
.
make
such as
"./fftw.h", line 88: warning: const is a keyword in ANSI
C
This is the case when the configure
script reports that const
does not work:
checking for working const... (cached) no
You should be aware that Solaris comes with two compilers, namely,
/opt/SUNWspro/SC4.2/bin/cc
and /usr/ucb/cc
. The latter compiler is non-ANSI. Indeed, it is a perverse shell script
that calls the real compiler in non-ANSI mode. In order
to compile FFTW, change your path so that the right
cc
is used.
To know whether your compiler is the right one, type
cc -V
. If the compiler prints ``ucbcc
'', as in
ucbcc: WorkShop Compilers 4.2 30 Oct 1996 C
4.2
then the compiler is wrong. The right message is something like
cc: WorkShop Compilers 4.2 30 Oct 1996 C
4.2
genfft
, written in the Objective Caml dialect of ML. You do not need to know ML or to
have an Objective Caml compiler in order to use FFTW.
genfft
is provided with the FFTW sources, which means that
you can play with the code generator if you want. In this case, you
need a working Objective Caml system. Objective Caml is available
from the Caml web page.
By default, FFTW configures its wrapper routines to work with the
first compiler it finds, e.g. g77
. To configure for a different, incompatible Fortran compiler
foobar
, use ./configure F77=foobar
when installing FFTW. (In the case of g77
, however, FFTW 3.x also includes an extra set of
Fortran-callable routines with one less underscore at the end of
identifiers, which should cover most other Fortran compilers on Linux
at least.)
<complex>
template class is bit-compatible with FFTW's complex-number format
(see the FFTW manual for more details.)
configure --enable-float
. On a non-Unix system: edit config.h
to #define
the symbol FFTW_SINGLE
(for FFTW 3.x). In both cases, you must then
recompile FFTW. All FFTW identifiers will then begin with
fftwf_
instead of fftw_
. Matteo Frigo and Steven G. Johnson / fftw@fftw.org - 16 March 2003