Chris@82: Chris@82: Chris@82: Chris@82: Chris@82:
Chris@82:Chris@82: Next: Installation on non-Unix systems, Previous: Installation and Customization, Up: Installation and Customization [Contents][Index]
Chris@82:FFTW comes with a configure
program in the GNU style.
Chris@82: Installation can be as simple as:
Chris@82:
Chris@82:
./configure Chris@82: make Chris@82: make install Chris@82:
This will build the uniprocessor complex and real transform libraries
Chris@82: along with the test programs. (We recommend that you use GNU
Chris@82: make
if it is available; on some systems it is called
Chris@82: gmake
.) The “make install
” command installs the fftw
Chris@82: and rfftw libraries in standard places, and typically requires root
Chris@82: privileges (unless you specify a different install directory with the
Chris@82: --prefix
flag to configure
). You can also type
Chris@82: “make check
” to put the FFTW test programs through their paces.
Chris@82: If you have problems during configuration or compilation, you may want
Chris@82: to run “make distclean
” before trying again; this ensures that
Chris@82: you don’t have any stale files left over from previous compilation
Chris@82: attempts.
Chris@82:
The configure
script chooses the gcc
compiler by default,
Chris@82: if it is available; you can select some other compiler with:
Chris@82:
./configure CC="<the name of your C compiler>"
Chris@82:
The configure
script knows good CFLAGS
(C compiler flags)
Chris@82:
Chris@82: for a few systems. If your system is not known, the configure
Chris@82: script will print out a warning. In this case, you should re-configure
Chris@82: FFTW with the command
Chris@82:
./configure CFLAGS="<write your CFLAGS here>"
Chris@82:
and then compile as usual. If you do find an optimal set of
Chris@82: CFLAGS
for your system, please let us know what they are (along
Chris@82: with the output of config.guess
) so that we can include them in
Chris@82: future releases.
Chris@82:
configure
supports all the standard flags defined by the GNU
Chris@82: Coding Standards; see the INSTALL
file in FFTW or
Chris@82: the GNU web page.
Chris@82: Note especially --help
to list all flags and
Chris@82: --enable-shared
to create shared, rather than static, libraries.
Chris@82: configure
also accepts a few FFTW-specific flags, particularly:
Chris@82:
--enable-float
: Produces a single-precision version of FFTW
Chris@82: (float
) instead of the default double-precision (double
).
Chris@82: See Precision.
Chris@82:
Chris@82: --enable-long-double
: Produces a long-double precision version of
Chris@82: FFTW (long double
) instead of the default double-precision
Chris@82: (double
). The configure
script will halt with an error
Chris@82: message if long double
is the same size as double
on your
Chris@82: machine/compiler. See Precision.
Chris@82:
Chris@82: --enable-quad-precision
: Produces a quadruple-precision version
Chris@82: of FFTW using the nonstandard __float128
type provided by
Chris@82: gcc
4.6 or later on x86, x86-64, and Itanium architectures,
Chris@82: instead of the default double-precision (double
). The
Chris@82: configure
script will halt with an error message if the
Chris@82: compiler is not gcc
version 4.6 or later or if gcc
’s
Chris@82: libquadmath
library is not installed. See Precision.
Chris@82:
Chris@82: --enable-threads
: Enables compilation and installation of the
Chris@82: FFTW threads library (see Multi-threaded FFTW), which provides a
Chris@82: simple interface to parallel transforms for SMP systems. By default,
Chris@82: the threads routines are not compiled.
Chris@82:
Chris@82: --enable-openmp
: Like --enable-threads
, but using OpenMP
Chris@82: compiler directives in order to induce parallelism rather than
Chris@82: spawning its own threads directly, and installing an ‘fftw3_omp’ library
Chris@82: rather than an ‘fftw3_threads’ library (see Multi-threaded FFTW). You can use both --enable-openmp
and --enable-threads
Chris@82: since they compile/install libraries with different names. By default,
Chris@82: the OpenMP routines are not compiled.
Chris@82:
Chris@82: --with-combined-threads
: By default, if --enable-threads
Chris@82: is used, the threads support is compiled into a separate library that
Chris@82: must be linked in addition to the main FFTW library. This is so that
Chris@82: users of the serial library do not need to link the system threads
Chris@82: libraries. If --with-combined-threads
is specified, however,
Chris@82: then no separate threads library is created, and threads are included
Chris@82: in the main FFTW library. This is mainly useful under Windows, where
Chris@82: no system threads library is required and inter-library dependencies
Chris@82: are problematic.
Chris@82:
Chris@82: --enable-mpi
: Enables compilation and installation of the FFTW
Chris@82: MPI library (see Distributed-memory FFTW with MPI), which provides
Chris@82: parallel transforms for distributed-memory systems with MPI. (By
Chris@82: default, the MPI routines are not compiled.) See FFTW MPI Installation.
Chris@82:
Chris@82: --disable-fortran
: Disables inclusion of legacy-Fortran
Chris@82: wrapper routines (see Calling FFTW from Legacy Fortran) in the standard
Chris@82: FFTW libraries. These wrapper routines increase the library size by
Chris@82: only a negligible amount, so they are included by default as long as
Chris@82: the configure
script finds a Fortran compiler on your system.
Chris@82: (To specify a particular Fortran compiler foo, pass
Chris@82: F77=
foo to configure
.)
Chris@82:
Chris@82: --with-g77-wrappers
: By default, when Fortran wrappers are
Chris@82: included, the wrappers employ the linking conventions of the Fortran
Chris@82: compiler detected by the configure
script. If this compiler is
Chris@82: GNU g77
, however, then two versions of the wrappers are
Chris@82: included: one with g77
’s idiosyncratic convention of appending
Chris@82: two underscores to identifiers, and one with the more common
Chris@82: convention of appending only a single underscore. This way, the same
Chris@82: FFTW library will work with both g77
and other Fortran
Chris@82: compilers, such as GNU gfortran
. However, the converse is not
Chris@82: true: if you configure with a different compiler, then the
Chris@82: g77
-compatible wrappers are not included. By specifying
Chris@82: --with-g77-wrappers
, the g77
-compatible wrappers are
Chris@82: included in addition to wrappers for whatever Fortran compiler
Chris@82: configure
finds.
Chris@82:
Chris@82:
Chris@82: --with-slow-timer
: Disables the use of hardware cycle counters,
Chris@82: and falls back on gettimeofday
or clock
. This greatly
Chris@82: worsens performance, and should generally not be used (unless you don’t
Chris@82: have a cycle counter but still really want an optimized plan regardless
Chris@82: of the time). See Cycle Counters.
Chris@82:
Chris@82: --enable-sse
(single precision),
Chris@82: --enable-sse2
(single, double),
Chris@82: --enable-avx
(single, double),
Chris@82: --enable-avx2
(single, double),
Chris@82: --enable-avx512
(single, double),
Chris@82: --enable-avx-128-fma
,
Chris@82: --enable-kcvi
(single),
Chris@82: --enable-altivec
(single),
Chris@82: --enable-vsx
(single, double),
Chris@82: --enable-neon
(single, double on aarch64),
Chris@82: --enable-generic-simd128
,
Chris@82: and
Chris@82: --enable-generic-simd256
:
Chris@82:
Chris@82: Enable various SIMD instruction sets. You need compiler that supports
Chris@82: the given SIMD extensions, but FFTW will try to detect at runtime
Chris@82: whether the CPU supports these extensions. That is, you can compile
Chris@82: with--enable-avx
and the code will still run on a CPU without AVX
Chris@82: support.
Chris@82:
gcc
flags for generating
Chris@82: NEON code. In general, you will have to provide them on the command line.
Chris@82: This command line is known to have worked at least once:
Chris@82: ./configure --with-slow-timer --host=arm-linux-gnueabi \ Chris@82: --enable-single --enable-neon \ Chris@82: "CC=arm-linux-gnueabi-gcc -march=armv7-a -mfloat-abi=softfp" Chris@82:
To force configure
to use a particular C compiler foo
Chris@82: (instead of the default, usually gcc
), pass CC=
foo to the
Chris@82: configure
script; you may also need to set the flags via the variable
Chris@82: CFLAGS
as described above.
Chris@82:
Chris@82:
Chris@82: Next: Installation on non-Unix systems, Previous: Installation and Customization, Up: Installation and Customization [Contents][Index]
Chris@82: