Notice how all routines are called as Fortran subroutines, and the
plan is returned via the first argument to dfftw_plan_dft_1d.
Notice also that we changed fftw_execute to
dfftw_execute_dft (see section FFTW Execution in Fortran). To do
the same thing, but using 8 threads in parallel (see section Multi-threaded FFTW), you would simply prefix these calls with:

Important: Notice that it is the first dimension of the
complex output array that is cut in half in Fortran, rather than the
last dimension as in C. This is a consequence of the interface routines
reversing the order of the array dimensions passed to FFTW so that the
Fortran program can use its ordinary column-major order.