I seem to get many inexplicable errors when using global variables in device memory
to return values from my kernel.
Here are the relevant portions of my source file:
__device__ long d_iq_corr[1023];
...
kernel(...)
if (tid==0)
{
d_iq_corr[0+quadrature_channel] = accums1[0];
d_iq_corr[2+quadrature_channel] = accums2[0];
d_iq_corr[4+quadrature_channel] = accums3[0];
}
...
__global__ wrapper_function()
kernel invocation<<<>>>(...)
CUDA_SAFE_CALL(cudaMemcpy(iqSums, d_iq_corr, 6*sizeof(long),
cudaMemcpyDeviceToHost));
the last call to cudaMemcpy fails with a cudaError at memory location xxxxx.
I can mail you the full source file.