I have tried to put together a real-to-complex, complex-to-real Fourier transform with ifort and the MKL library. I found that often the documentation was spotty: for example, there's no example of a back Fourier transform in the documentation or in the forum. I essentially want to use the CCE storage format: there is an option to specify CCE storage, but it can be forced with the strides system.
I provide an example of 3-D real-to-complex, and complex-to-real Fourier transforms in Fortran. I obtain similar results with FFTW3. The example is functional, but some updates of the descriptor might be redundant:
with the definitions
#define WRITE_MKL_DEBUG_INFO(i) IF (i .NE. 0) THEN; IF (.NOT. DftiErrorClass(i,DFTI_NO_ERROR)) THEN; WRITE_DEBUG_INFO; WRITE (0,*) DftiErrorMessage(i); STOP 1; END IF; END IF