Warning: If you are not a programmer and are not comfortable using a compiler, then benchFFT's installation may be difficult for you. You have been warned.
To install the benchmark, you must first download and compile FFTW. (This is necessary not only because FFTW is one of the codes being benchmarked, but also because certain type definitions and timing routines from FFTW are used in the benchmark.) You can download FFTW from the FFTW Home Page, Netlib, and other sites.
Once FFTW is installed and compiled, you must make a few minor
changes to the benchmark Makefile
(or see below if your
system doesn't use make).
FFTWDIR
variable to the location of the
fftw/src
directory on your system.
CC
and
CFLAGS
) to whatever is appropriate. (Use the
same settings that you used when compiling FFTW.)
FC
and FFLAGS
). If not, there are
two lines (alternate definitions of BENCH_CFLAGS
and
OBJECTS
) in the Makefile
that should be
uncommented (they are labelled).
LIBRARIES
variable.
If you wish to include Jens Jorgen Nielsen's FFT in the benchmark, you must take a few extra steps.
The benchmark also supports the transforms from Numerical Recipes (in C and Fortran), but we could not distribute this code on the Internet. Those who have the NR software can include it by following these simple instructions.
The QFT implementation makes some
non-portable assumptions about legal data alignments that can cause
problems on some architectures (e.g. the Alpha and SGI). Because of
this, it is disabled by default. To enable it, #define
the USE_QFT
symbol (you can do this by including
-DUSE_QFT
in the BENCH_CFLAGS
). (We have
commented the problematic place in the code if you want to try and fix
it.)
Makefile
, and link in the FFTW library.
If you have a Fortran compiler, be sure to define the
USE_FORTRAN
symbol (bench_utils.h
would be a
good place to stick the #define
) so that the benchmark
code calls the Fortran routines.
FFTW_REAL
type defined in
fftw.h
. By default, this is double
(double-precision). You can change it to float
to use
single precision (after the modification to fftw.h
, you
must recompile both FFTW and the benchmark). (On systems that support
it, you could also use long double
or some similar type.
The accuracy of most of the FFTs will not increase, however, since
they typically make use of sin
and cos
functions that are limited to double precision.)
The benchmark is designed for machines on which the
int
type contains at least 32 bits (and the
Fortran integer
type should be the same size).
FORTRANIZE
macro in bench_utils.h
. (See how
we handled the Cray, IBM, and Solaris compilers for examples.)
-DUSE_IMSL
,
-DUSE_NAG
, -DUSE_SCILIB
,
-DUSE_SCSL
, -DUSE_SGIMATH
,
-DUSE_ESSL
, -DUSE_DXML
, or
-DUSE_SUNPERF
, respectively, in your CFLAGS
.
You should also change the LIBRARIES
variable to link to
the appropriate libraries. (There are examples of this in the
Makefile
.)