Node:Installation on Unix, Next:Installation on non-Unix systems, Previous:Installation and Customization, Up:Installation and Customization
FFTW comes with a
configure program in the GNU style.
Installation can be as simple as:
./configure make make install
This will build the uniprocessor complex and real transform libraries
along with the test programs. (We recommend that you use GNU
make if it is available; on some systems it is called
gmake.) The "
make install" command installs the fftw
and rfftw libraries in standard places, and typically requires root
privileges (unless you specify a different install directory with the
--prefix flag to
configure). You can also type
make check" to put the FFTW test programs through their paces.
If you have problems during configuration or compilation, you may want
to run "
make distclean" before trying again; this ensures that
you don't have any stale files left over from previous compilation
configure script chooses the
gcc compiler by default,
if it is available; you can select some other compiler with:
./configure CC="<the name of your C compiler>"
configure script knows good
CFLAGS (C compiler flags)
for a few systems. If your system is not known, the
script will print out a warning. In this case, you should re-configure
FFTW with the command
./configure CFLAGS="<write your CFLAGS here>"and then compile as usual. If you do find an optimal set of
CFLAGSfor your system, please let us know what they are (along with the output of
config.guess) so that we can include them in future releases.
configure supports all the standard flags defined by the GNU
Coding Standards; see the
INSTALL file in FFTW or
the GNU web page.
--help to list all flags and
--enable-shared to create shared, rather than static, libraries.
configure also accepts a few FFTW-specific flags, particularly:
--enable-float: Produces a single-precision version of FFTW (
float) instead of the default double-precision (
double). See Precision.
--enable-long-double: Produces a long-double precision version of FFTW (
long double) instead of the default double-precision (
configurescript will halt with an error message is
long doubleis the same size as
doubleon your machine/compiler. See Precision.
--enable-threads: Enables compilation and installation of the FFTW threads library (see Multi-threaded FFTW), which provides a simple interface to parallel transforms for SMP systems. (By default, the threads routines are not compiled.)
--with-sgimp: In conjunction with
--enable-threads, causes the multi-threaded FFTW library to use OpenMP or SGI MP compiler directives in order to induce parallelism, rather than spawning its own threads directly. (Useful especially for programs already employing such directives, in order to minimize conflicts between different parallelization mechanisms.)
--disable-fortran: Disables inclusion of Fortran-callable wrapper routines (see Calling FFTW from Fortran) in the standard FFTW libraries. These wrapper routines increase the library size by only a negligible amount, so they are included by default as long as the
configurescript finds a Fortran compiler on your system.
--with-slow-timer: Disables the use of hardware cycle counters, and falls back on
clock. This greatly worsens performance, and should generally not be used (unless you don't have a cycle counter but still really want an optimized plan regardless of the time). See Cycle Counters.
--enable-altivec: Enable the compilation of SIMD code for SSE (Pentium III+), SSE2 (Pentium IV+), 3dNow! (AMD K7 and others), or AltiVec (PowerPC G4+). SSE, 3dNow!, and AltiVec only work with
--enable-float(above), while SSE2 only works in double precision (the default). The resulting code will still work on earlier CPUs lacking the SIMD extensions (SIMD is automatically disabled, although the FFTW library is still larger).
--enable-k7(which uses assembly), require a compiler supporting SIMD extensions, and compiler support is still a bit flaky. We have tested SIMD with
gccversions 3.x (which miscompile AltiVec permutations on Linux, but we have an assembly workaround) and with Intel's
icc6.0 (which misaligns SSE constants, but we have a workaround). Some 3.x versions of
gcccrash during compilation, and
gcc2.95 miscompiles AltiVec on MacOS X.
gcc, you may have to use the
-mabi=altivecoption when compiling any code that links to FFTW, in order to properly align the stack; otherwise, FFTW could crash when it tries to use an AltiVec feature. (This is not necessary on MacOS X.)
gcc, you should use a version of gcc that properly aligns the stack when compiling any code that links to FFTW. By default,
gcc2.95 and later versions align the stack as needed, but you should not use the
-Osoption or the
-mpreferred-stack-boundaryoption with an argument less than 4.
configure to use a particular C compiler (instead of the
gcc), set the environment variable
the name of the desired compiler before running
may also need to set the flags via the variable