Go to the next, previous, or main section.

Installation

benchFFT is designed to be very portable, and should install on any machine with an ANSI C compiler. If you also have a Fortran compiler, you can take advantage of it to benchmark Fortran FFTs, too.

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).

  1. Change the FFTWDIR variable to the location of the fftw/src directory on your system.
  2. Set the C compiler and options (CC and CFLAGS) to whatever is appropriate. (Use the same settings that you used when compiling FFTW.)
  3. If you have a Fortran compiler, set the Fortran compiler and options (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).
  4. You might also need to link in special libraries (for example, in order to link with Fortran code), depending upon your system. If necessary, modify the 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.)

Systems without make

Some non-UNIX operating systems do not have a make facility. It is still possible to compile the benchmark on these platforms, however. You merely have to compile all of the source code files that are listed in the 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.

Numeric Types

You might also want to customize the floating-point precision used in the benchmark. The benchmark uses the same floating-point type as FFTW; i.e. the 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).

Fortran Headaches

If your system does have a Fortran compiler and you want to use it, you need to know how it munges subroutine names for the linker. Some compilers convert routine names to all lower-case, some to all upper-case, and others do even weirder things. The benchmark, by default, assumes that names are all lower-case with an appended underscore (this seems to be the most common convention). If your system does something different, you will need to change the FORTRANIZE macro in bench_utils.h. (See how we handled the Cray, IBM, and Solaris compilers for examples.)

Other Commercial or Machine-Specific Libraries

benchFFT includes support for the IMSL, NAG, Cray SCILIB, Cray SCSL, SGI CHALLENGEcomplib, IBM ESSL, Digital Extended Math Library (DXML), and Sun Performance libraries (see the FFT Software section). If you have one of these and would like to benchmark it, you should include -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.)
Go to the next, previous, or main section.