Hi all,
I just started using CUDA and am playing around with the available samples.
My aim is right now to get the sample CUDA FFT code running.
The compilation succeeds, but the processing however fails with this message:
cufft: ERROR: /Volumes/Builds/nv/build/rel/gpgpu/toolkit/r2.0/cufft/src/config.cu, line 106
cufft: ERROR: CUFFT_INTERNAL_ERROR
cufft: ERROR: /Volumes/Builds/nv/build/rel/gpgpu/toolkit/r2.0/cufft/src/cufft.cu, line 112
cufft: ERROR: CUFFT_INVALID_VALUE
cufft: ERROR: /Volumes/Builds/nv/build/rel/gpgpu/toolkit/r2.0/cufft/src/cufft.cu, line 112
cufft: ERROR: CUFFT_INVALID_VALUE
cufft: ERROR: /Volumes/Builds/nv/build/rel/gpgpu/toolkit/r2.0/cufft/src/cufft.cu, line 94
cufft: ERROR: CUFFT_INVALID_PLAN
The path you see in the message seems to be hard coded into the libraries:
$ grep -R -n ‘/Volumes/Builds/nv/build/’ *
Binary file bin/cudafe matches
Binary file bin/cudafe++ matches
Binary file lib/libcublas.dylib matches
Binary file lib/libcublasemu.dylib matches
Binary file lib/libcuda.dylib matches
Binary file lib/libcufft.dylib matches
Binary file lib/libcufftemu.dylib matches
Moreover, the path does not exist on my machine and must be a relict from the installation package?
Does anybody have a clue how to solve that?
Thank you in advance for your help,
Thomas
code:
#include <cuda.h>
#include <cufft.h>
//#include
//#include <cuComplex.h>
#include <device_launch_parameters.h>
#include <cuda_runtime_api.h>
int main(int argc, char** argv){
cufftHandle plan;
cufftComplex *idata, *odata;
cudaMalloc((void**)&idata, sizeof(cufftComplex)*NX*NY);
cudaMalloc((void**)&odata, sizeof(cufftComplex)*NX*NY);
/* Create a 2D FFT plan. */
cufftPlan2d(&plan, NX, NY, CUFFT_C2C);
/* Use the CUFFT plan to transform the signal out of place. */
cufftExecC2C(plan, idata, odata, CUFFT_FORWARD);
/* Note: idata != odata indicates an out-of-place transformation
to CUFFT at execution time
*/
/* Inverse transform the signal in place */
cufftExecC2C(plan, odata, odata, CUFFT_INVERSE);
/* Destroy the CUFFT plan. */
cufftDestroy(plan);
cudaFree(idata); cudaFree(odata);
return 0;
}