I run a fortran multithreaded code that uses ffts. I am now trying to switch to
fttw available thru mkl. When I insert the code below the results more
often than not are nans or infinity even though only the plan call is executed
and no actuall ffts are carried out using fftw. The standard suspect in such cases
would be out-of-bounds operations. I cannot at the moment see any out-of-bounds
problems when creating the plan. But here there is still the problem of the interface.
I wonder if i have set up things correcly. The compile and link calls are
ifort -O3 -r8 -openmp -fpp -parallel -mcmodel=medium -i-dynamic -shared-intel -mkl
This is run on a six core Linux machine.
Has anyone any suggestions as to what may be going on?
module FFTW3 use, intrinsic :: iso_c_binding include 'fftw3.f03' type(C_PTR), save :: plan_r2c real*8, allocatable, SAVE :: WWW1( :, : ), WWW2( :, : ) end module .... Use FFTW3 Integer :: Irank, ndim(1), InEmbeded(1), OutEmbeded(1) ... ! Note NX32 > N1_32 + 4 allocate( WWW1( NX32*M2, M3 ), STAT = IERR ) allocate( WWW2( NX32*M2, M3 ), STAT = IERR ) Irank = 1 ndim(1) = N1_32 InEmbeded(1) = NX32 OutEmbeded(1) = NX32 / 2 call dfftw_plan_many_dft_r2c( plan_r2c, Irank, ndim(1), M2*M3, WKX_1, InEmbeded(1), 1, & NX32, WKX_2, OutEmbeded(1), 1, NX32/2, FFTW_MEASURE )