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.

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. The FFTW directory should be in the same directory as the benchFFT directory.

Installation on Unix systems:

Once FFTW is compiled, compiling the benchmark on Unix systems can be as simple as:
./configure
make
Sad to say, however, complications often arise. First, configure only knows good C and Fortran compiler flags for a few systems; if your system isn't known, a warning will be printed out. You can specify the flags manually by using:
make CFLAGS="..." FFLAGS="..."
Another problem is that the benchmark has a tendency to crash compilers (because of its size and its eclectic origins). (e.g. this has been observed with Sun and SGI compilers.) Typically, the solution is to reduce the optimization level for those particular files. If this doesn't work, you will need to comment out those files from the Makefile and from the benchmark source code. Good luck!

Non-Unix systems.

The configure script does not work on non-Unix systems. 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 HAVE_F77 symbol in bench-config.h so that the benchmark code calls the Fortran routines. You will also have to set up your compiler's include paths appropriately.

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, which is double-precision by default. See the FFTW documentation for instructions on changing the 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).

Numerical Recipes

benchFFT can benchmark the FFT routines from Numerical Recipes. To use them on Unix systems, simply place the NR FFT files in extras/nr (see also extras/nr/README) before running the configure script. They will automatically be patched as necessary and included in the benchmark. On non-Unix systems, you will have to apply the patches manually; we don't document this here.

Bernstein djbfft

D. J. Bernstein wrote a permuted-output C FFT optimized for Pentium/gcc which benchFFT can also benchmark. He declined to give us permission to redistribute his code along with the benchmark, however, so you have to add it yourself. On Unix, simply unpack djbfft-0.60 (the latest version at the time of this writing) in the extras directory before running the configure script. The code will automatically be detected and included in the benchmark.

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). The configure script attempts to automatically detect these libraries if they are present on your system, and includes them in the benchmark if it finds them. Let us know if they are present on your system but configure doesn't find them.
Go to the next, previous, or main section.