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