Developer Reference

  • 2020.2
  • 07/15/2020
  • Public Content
Contents

Calling FFTW3 Interface Wrappers from Fortran

Intel® MKL
also provides Fortran 77 interfaces of the FFTW3 wrappers. The Fortran wrappers are available for all FFTW3 interface functions and are based on C interface of the FFTW3 wrappers. Therefore they have the same functionality and restrictions as the corresponding C interface wrappers.
The Fortran wrappers use the default
INTEGER
type for integer arguments. The default
INTEGER
is 32-bit in
Intel® MKL
LP64 interfaces and 64-bit in ILP64 interfaces. Argument
plan
in a Fortran application must have type
INTEGER*8
.
The wrappers that are double-precision subroutines have prefix
dfftw_
, single-precision subroutines have prefix
sfftw_
and provide an equivalent functionality. Long double subroutines (with prefix
lfftw_
) are not provided.
The Fortran FFTW3 wrappers use the default Intel® Fortran compiler convention for name decoration. If your compiler uses a different convention, or if you are using compiler options affecting the name decoration (such as
/Qlowercase
), you may need to compile the wrappers from sources, as described in section Building Your Own Wrapper Library.
For interoperability with C, the declaration of the Fortran FFTW3 interface is provided in header file
include/fftw/fftw3_mkl_f77.h
.
You can call Fortran wrappers from a FORTRAN 77 or Fortran 90 application, although
Intel® MKL
does not provide a Fortran 90 module for the wrappers. For a detailed description of the FFTW Fortran interface, refer to FFTW3 documentation (www.fftw.org).
The following example illustrates calling the FFTW3 wrappers from Fortran:
INTEGER*8 plan INTEGER N INCLUDE 'fftw3.f' COMPLEX*16 IN(*), OUT(*) !...initialize array IN CALL DFFTW_PLAN_DFT_1D(PLAN, N, IN, OUT, -1, FFTW_ESTIMATE) IF (PLAN .EQ. 0) STOP CALL DFFTW_EXECUTE !...result is in array OUT 

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804