Hello! Sorry for grammar, in advance.
I’m working on some physics calculations with CUDA. Math is too complicated to show it off. But I’ll make it simple with AddKernel example.
So here is basic Kernel it works just fine:
global void addKernel(int *c, const int *a, const int *b)
{
int i = threadIdx.x, j;
c[i] = a[i] + b[i];
}
But when kernel is running to long:
global void addKernel(int *c, const int *a, const int *b)
{
int i = threadIdx.x, j;
for (j = 0; j < 7000000; j++); // pause long enough to get timeout
c[i] = a[i] + b[i];
}
Driver will be crashed and then restored. As far as I undestand for single GeForce GPU computing there is only one way to solve it. It is to set TdrLevel and TdrDelay. But after I got it done I start getting another error “Unhandled exception at 0x0FDDA3AB (nvcuda.dll) in Example.exe: 0xC0000005: Access violation reading location 0x00000008”. And the window says: nvcuda.pdb not loaded.
So, there is no other change other than creating Tdr values.
I’m not by any means a real programmer, could you help me to understand what is it I’m doing wrong or missing?