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