using cufftPlanMany for batch FFT

I am using the cufftPlanMany construct for doing a batched inverse transform (CUDA 3.1 on Centos 5.0)

/*IFFT*/

		int rank[2] ={pix1,pix2};

int pix3 = pix1*pix2*n; //n = Batchsize

	cufftHandle plan_backward; 

	/* Create a batched 2D plan */ 

	cufftPlanMany(&plan_backward,2,rank,NULL,1,0,NULL,1,0,CUFFT_C2C,n);

	/* Execute the transform out-of-place */ 

	cufftExecC2C(plan_backward, f3_d, out1_d, CUFFT_INVERSE);

	/* Destroy the CUFFT plan */ 

	cufftDestroy(plan_backward); 

	

	/*Check values<--Debug*/

	cufftComplex* out1h;

	cudaMallocHost((void**) &out1h, sizeof(cufftComplex) * pix3);

	cudaMemcpy(out1h, out1_d, sizeof(cufftComplex) * pix3, cudaMemcpyDeviceToHost);

	

	for(size_t i = 0; i < pix3; ++i)

	{

		printf ( " xcout[%d]  %le  %f \n", i, out1h[i].x/400, out1h[i].y);

	}

When I check my values, the inverse FFT is done only for the pix1*pix2 elements The remaining values are all zero.

Any idea what is wrong here??

Thanks in advance

I am using the cufftPlanMany construct for doing a batched inverse transform (CUDA 3.1 on Centos 5.0)

/*IFFT*/

		int rank[2] ={pix1,pix2};

int pix3 = pix1*pix2*n; //n = Batchsize

	cufftHandle plan_backward; 

	/* Create a batched 2D plan */ 

	cufftPlanMany(&plan_backward,2,rank,NULL,1,0,NULL,1,0,CUFFT_C2C,n);

	/* Execute the transform out-of-place */ 

	cufftExecC2C(plan_backward, f3_d, out1_d, CUFFT_INVERSE);

	/* Destroy the CUFFT plan */ 

	cufftDestroy(plan_backward); 

	

	/*Check values<--Debug*/

	cufftComplex* out1h;

	cudaMallocHost((void**) &out1h, sizeof(cufftComplex) * pix3);

	cudaMemcpy(out1h, out1_d, sizeof(cufftComplex) * pix3, cudaMemcpyDeviceToHost);

	

	for(size_t i = 0; i < pix3; ++i)

	{

		printf ( " xcout[%d]  %le  %f \n", i, out1h[i].x/400, out1h[i].y);

	}

When I check my values, the inverse FFT is done only for the pix1*pix2 elements The remaining values are all zero.

Any idea what is wrong here??

Thanks in advance

At a glance, everything seems ok. Have you tried copying and printing f3_d to make sure it is properly set up? That seems like the most likely source of error.

At a glance, everything seems ok. Have you tried copying and printing f3_d to make sure it is properly set up? That seems like the most likely source of error.

At a glance, everything seems ok. Have you tried copying and printing f3_d to make sure it is properly set up? That seems like the most likely source of error.