cufftDestroy() results in error in CUDA 4.0 RC

Since upgrading to the CUDA 4.0 release candidate I have noticed errors resulting from runtime checks to cudaGetLastError() which were not present in CUDA 3.2. I believe I have traced the problem down to an ‘invalid device pointer’ error code returned by cudaGetLastError() when used after a prior call to cufftDestroy(). It appears to only happen if the plan was created via cufftPlan2d() rather than a 1d fft. The return value from cufftDestroy() still indicates success.

The attached program should demonstrate the error when run under CUDA 4.0 RC (I haven’t tested against CUDA 4.0 RC2).

I am currently using a Tesla C1060 running Ubuntu 10.04

Thank You,

It works on 4.0RC2.

$ nvcc -V
nvcc: NVIDIA ® Cuda compiler driver
Copyright © 2005-2011 NVIDIA Corporation
Built on Sun_Mar_20_16:45:27_PDT_2011
Cuda compilation tools, release 4.0, V0.2.1221

$nvcc test.cpp -L/usr/local/cuda/lib64 -lcufft

$./a.out
cufftPlan2d returns 0
cudaGetLastError() after cufftPlan2d returns no error
cufftDestroy returns 0
cudaGetLastError() after cufftDestroy returns no error

Justinv:

How did you install CUDA 4.0 onto Ubuntu 10.04 LTS? Nvidia only provides installation script for Ubuntu 10.10.

Thank you,

Chris