Chris@19: Chris@19: Chris@19: Calling FFTW from Legacy Fortran - FFTW 3.3.4 Chris@19: Chris@19: Chris@19: Chris@19: Chris@19: Chris@19: Chris@19: Chris@19: Chris@19: Chris@19: Chris@19: Chris@19: Chris@19:
Chris@19: Chris@19:

Chris@19: Next: , Chris@19: Previous: Calling FFTW from Modern Fortran, Chris@19: Up: Top Chris@19:


Chris@19:
Chris@19: Chris@19:

8 Calling FFTW from Legacy Fortran

Chris@19: Chris@19:

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

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

The MPI parallel interface to FFTW is not currently available Chris@19: to legacy Fortran. Chris@19: Chris@19:

Chris@19: Chris@19: Chris@19: Chris@19: