can not perform inverse fft? cufft

Hi Everybody,

I write a short code using cufft library. I wanna perform 2D inverse fft.
However I find the results are not correct: I alwalys get forward fft result, even I have set CUFFT_INVERSE flag in the cufftExecZ2Z function.
The code is:

cufftHandle plan;
cufftDoubleComplex* complex_temp;
cudaMalloc((void**)&complex_temp, sizeof(cufftDoubleComplex)mn);

cufftPlan2d(&plan, m, n, CUFFT_Z2Z);
cufftExecZ2Z(plan,complex_temp,complex_temp,CUFFT_INVERSE);

Has any boday encounter this problem before?

Thanks,
Zhen