Hi,
I’ve a 8800GT 512M card which I can do the CUFFT for size up to 3136 x 3136 on a WinXP PC. With a new 8800GT 1G card which I just got today, I thought that I can at least do a CUFFT on a 4096 x 4096 matrix. But it failed with the “CUFFT_ALLOC_FAILED” error message. Your assistant is greatly appreciated!
The following is the code:
int
main( int argc, char** argv)
{
struct cudaDeviceProp prop;
int dev = 0;
CUT_DEVICE_INIT();
CUDA_SAFE_CALL(cudaGetDeviceCount(&s_gpuCount));
if(s_gpuCount == 0)
{
printf("\nNo Device Found\n");
exit(0);
}
else
{
printf("\n%d Device Found\n",s_gpuCount);
for(dev = 0; dev < s_gpuCount; dev++)
{
CUDA_SAFE_CALL(cudaSetDevice(dev));
cudaGetDevice(&dev);
printf("\nThe Device ID is %d\n",dev);
cudaGetDeviceProperties(&prop,dev);
printf("\nThe Properties of the Device with ID %d are\n",dev);
printf("\tDevice Name : %s",prop.name);
printf("\n\Device Memory Size (in bytes) : %d",prop.totalGlobalMem);
printf("\n\Constant Memory Size (in bytes) : %d",prop.totalConstMem);
printf("\n\tDevice Major Revision Numbers : %d",prop.major);
printf("\n\tDevice Minor Revision Numbers : %d",prop.minor);
printf("\n\n");
}
}
printf("\n");
if(s_gpuCount > 1)
{
CUDA_SAFE_CALL(cudaSetDevice(1));
CUDA_SAFE_CALL(cudaGetDevice(&dev));
printf("Doing it on Device %d\n", dev);
}
int nX = 4096;
int nY = 4096;
unsigned int fftInputSize = (nX * nY) * sizeof(float2);
cufftComplex *idata;
cudaMalloc((void**)&idata, sizeof(cufftComplex)*nX*nY);
cufftHandle plan;
cufftResult rst = cufftPlan2d(&plan, nX, nY, CUFFT_C2C);
cufftExecC2C(plan, idata, idata, CUFFT_FORWARD);
cufftDestroy(plan);
cudaFree(idata);
}
The following is the result:
2 Device Found
The Device ID is 0
The Properties of the Device with ID 0 are
Device Name : GeForce 8800 GT
Device Memory Size (in bytes) : 536543232
Constant Memory Size (in bytes) : 65536
Device Major Revision Numbers : 1
Device Minor Revision Numbers : 1
The Device ID is 1
The Properties of the Device with ID 1 are
Device Name : GeForce 8800 GT
Device Memory Size (in bytes) : 1073479680
Constant Memory Size (in bytes) : 65536
Device Major Revision Numbers : 1
Device Minor Revision Numbers : 1
Doing it on Device 1
cufft: ERROR: C:/cygwin/home/cuda0/cuda/sw/gpgpu_rel1.1/cufft/src/config.cu, line 299
cufft: ERROR: CUFFT_ALLOC_FAILED
cufft: ERROR: C:/cygwin/home/cuda0/cuda/sw/gpgpu_rel1.1/cufft/src/cufft.cu, line 115
cufft: ERROR: CUFFT_INVALID_PLAN
cufft: ERROR: C:/cygwin/home/cuda0/cuda/sw/gpgpu_rel1.1/cufft/src/cufft.cu, line 94
cufft: ERROR: CUFFT_INVALID_PLAN
Press any key to continue . . .