max spitch size in cudaMemcpy2DToArray


I read in the ref. man. that the function cudaMemcpy2DToArray returns an error if the pitch of the source (spitch) memory is greater that the maximum allowed.

I am getting an “unspecified launch failure” when i try to run my program at one of these function calls.

“Cuda error in file in line 306 : unspecified launch failure.”

304 CUDA_SAFE_CALL(cudaMemcpy2DToArray(f1_array, 0, 0, (void *)f1_data, pitch,
305 sizeof(float)*ni, nj,
306 cudaMemcpyDeviceToDevice));

Does anybody know what is the maximum size of spitch allowed or any other idea of why i’m getting that error?

many thanks,

avidday, where are you???