FFTW 3.3.8: Calling FFTW from Legacy Fortran

Next: Upgrading from FFTW version 2, Previous: Calling FFTW from Modern Fortran, Up: Top [Contents][Index]

## 8 Calling FFTW from Legacy Fortran

This chapter describes the interface to FFTW callable by Fortran code in older compilers not supporting the Fortran 2003 C interoperability features (see Calling FFTW from Modern Fortran). This interface has the major disadvantage that it is not type-checked, so if you mistake the argument types or ordering then your program will not have any compiler errors, and will likely crash at runtime. So, greater care is needed. Also, technically interfacing older Fortran versions to C is nonstandard, but in practice we have found that the techniques used in this chapter have worked with all known Fortran compilers for many years.

The legacy Fortran interface differs from the C interface only in the prefix (‘`dfftw_`’ instead of ‘`fftw_`’ in double precision) and a few other minor details. This Fortran interface is included in the FFTW libraries by default, unless a Fortran compiler isn’t found on your system or `--disable-fortran` is included in the `configure` flags. We assume here that the reader is already familiar with the usage of FFTW in C, as described elsewhere in this manual.

The MPI parallel interface to FFTW is not currently available to legacy Fortran.

Next: Upgrading from FFTW version 2, Previous: Calling FFTW from Modern Fortran, Up: Top [Contents][Index]