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