FFTW FAQ - Section 2
Installation and use of FFTW


Question 2.1. Which systems does FFTW run on?

FFTW is written in ANSI C, and should work on any system with a decent C compiler. (See also Q2.2 `Does FFTW run on DOS/Windows?' and Q2.3 `My compiler crashes when compiling FFTW.'.)

Question 2.2. Does FFTW run on DOS/Windows?

It should. FFTW was not developed on DOS or Windows, but the source code is straight ANSI C. Some users have reported using FFTW on DOS/Windows using various compilers. See also the FFTW Windows installation notes and Q2.3 `My compiler crashes when compiling FFTW.'

Question 2.3. My compiler crashes when compiling FFTW.

Complain fiercely to the vendor of the compiler.

FFTW is a heavily-optimized piece of software that is likely to push compilers to their limits. We had no problems with gcc 2.7.2, Sun's C compiler SC4.0, IBM's XLC compiler for AIX, Metrowerks' compilers for the Macintosh, and SGI's compilers for IRIX 6.2. Users have also reported successful compilations of FFTW using Borland's C/C++ compilers on Windows.

Sun's SC4.0 C compiler produces incorrect code for the test program when -xO5 is enabled. You must use -xO2. In the test program, we compare results against Singleton's venerable FFT program (translated from Fortran to C by f2c). Sun's compiler works fine with FFTW, but produces wrong code for Singleton's program. [In an unbelievable conspiracy of events, Sun's Fortran compiler also produces the same incorrect code for the original version.]

Visual C++ 4.0 crashes when compiling FFTW with all optimizations turned on.

Question 2.4. Can I save FFTW's plans?

Yes. Starting with version 1.2, FFTW provides the wisdom mechanism for saving plans. See Q3.3 `What is this wisdom thing?' and the FFTW manual.

Question 2.5. Which language is FFTW written in?

FFTW is written in ANSI C. Most of the code, however, has been automatically generated by a program called genfft, written in the Caml Light dialect of ML. You do not need to know ML or to have a Caml Light compiler in order to use FFTW.

genfft is provided with the FFTW sources, which means that you can play with the code generator if you want. In this case, you need a working Caml Light system. Caml Light is available from ftp.inria.fr in the directory /lang/caml-light.

Question 2.6. Can I call FFTW from FORTRAN?

Not directly. The main problem is that Fortran cannot pass parameters by value. However, FFTW can be called indirectly from Fortran through the use of special C "wrapper" routines. You can download a package of appropriate wrapper code from the FFTW web page.

Question 2.7. Can I call FFTW from C++?

Most definitely. FFTW should compile and run under any C++ compiler.

Question 2.8. Why isn't FFTW written in FORTRAN/C++?

Because we like neither language. (Additionally, in the case of C++, we see no advantage to using object-oriented methodologies and syntax for the FFT.)
Next: Internals of FFTW.
Back: Introduction and General Information.
Return to contents.

Matteo Frigo and Steven G. Johnson / fftw@theory.lcs.mit.edu - 08 September 1997

Extracted from FFTW Frequently Asked Questions with Answers, Copyright © 1997 Massachusetts Institute of Technology.