cudaMemcpy unknown error

Hi Guys,

I am currently playing around with my Geforce GTX 560 Ti Phantom and CUDA under Visual Studio 2010 Cuda SDK 4.1 and NSight 2.1. I bought the book “Cuda By Example” and tried to run the Julia Set sample. It works, but there are problems copying the Device image data to host memory via cudaMemcpy. I tried to synchroniz threads and read the last error, but I still get “unknown error”. Furthermore, my Device driver must restart because of unknown problems. This error can be reproducted in changed a scale factor from 1.5 to 0.2. HEre some code:

This works:

__device__ int julia(int x,int y)

{

	const float scale = 1.5f;

	float jx = scale * (float)(DIM / 2 - x) / (float)(DIM/2);

	float jy = scale * (float)(DIM / 2 - y) / (float)(DIM/2);

	cuComplex c(-0.8f, 0.156f);

	cuComplex a(jx, jy);

	int i = 0;

	for(i=0; i < 200; i++)

	{

		a = a*a + c;

		if (a.magnitude2() > 1000)

			return 0;

	}

	return 1;

}

This does not work (changed const float):

__device__ int julia(int x,int y)

{

	const float scale = 0.2f;

	float jx = scale * (float)(DIM / 2 - x) / (float)(DIM/2);

	float jy = scale * (float)(DIM / 2 - y) / (float)(DIM/2);

	cuComplex c(-0.8f, 0.156f);

	cuComplex a(jx, jy);

	int i = 0;

	for(i=0; i < 200; i++)

	{

		a = a*a + c;

		if (a.magnitude2() > 1000)

			return 0;

	}

	return 1;

}

This does not make really sense. I use the current drivers. Does anyone have any idea?

Greetz TrommlBomml

You are probably triggering the watchdog timer, as changing [font=“Courier New”]scale[/font] changes the kernel runtime via different image content.

Do you know a way how to find out whether this could be the problem?