INTERNAL_ERROR cufftPlan2d() big problem

I am having trouble with a reeeeally simple code:

int main(void)

{

	const int FFT_W = 1000;

	const int FFT_H = 1000;

	cufftHandle FFTplan;

	CUFFT_SAFE_CALL( cufftPlan2d(&FFTplan, FFT_H, FFT_W, CUFFT_R2C) );

	CUFFT_SAFE_CALL( cufftDestroy(FFTplan) );

}

I get the following errors:

I assume that the second error is caused by the first one, but don’t know how to get rid of them. What am I doing wrong? Does anyone happen to have the same error?

In addition, whenever I do:

unsigned int theFree, theTotal;

cuMemGetInfo( &theFree, &theTotal );

printf( "CARD returns:  free:%d  total:%d\n", theFree, theTotal   );

I always get strange results like

I don’t get this. Can the free memory be greater than the total one? Is my device working correctly?

I am afraid I somehow managed to solve those problems. The thing is that I was compiling in non-emulation mode and loaded the cufftemu.lib, so the compiler didn’t like to mix up libraries. After using the following code the proper error message appeared:

printf("cudaMalloc error: %s\n",cudaGetErrorString( CUDA_SAFE_CALL( cudaMalloc((void **)&padded_Fd, FFT_SIZE))));