Unspecified launch error

Hi,
i have written a simulation using anumerical method, it seems to work fine untill everything cracks and i get the following error in the console:

Cuda error in file ‘2d_cud.cu’ in line 386 : unspecified launch failure.
when i look at the code i see the following:

line
384 CUDA_SAFE_CALL(cudaMemcpy2DToArray(f2_array, 0, 0, (void *)f2_data, pitch,
385 sizeof(float)*ni, nj,
386 cudaMemcpyDeviceToDevice));

as you can see,in line 386 i do not see a possible error.

can anyone tell me what does “unspecified lauch failure” means? why am i getting this error?
i apreciate any help.
carlos.

Unspecified device errors are usually caused by out of bounds memory access - they are the CUDA equivalent of segfaults. It means that something in your device to device copy is illegal, most probably a pitch or size is wrong.

It could be your previous kernel error.

Try calling cudaThreadSynchronize() after your kernels to catch the errors in spot