Problem with videocard timeout [GeForce, W7, MVS13]

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?

By eliminating the timeout, you may have run into another problem in your application (e.g. stack corruption) that is manifesting itself with the exception in nvcuda.dll. This is just speculation. I think there may be a number of possibilities.

Problem was solved by manipulating values of TDR registers not manually by regedit, but by options of Nsight monitor. Now CUDA debugging is working properly and I had to deal with some memory out of range exceptions, but that’s another story and I will try to solve it myself. Sorry for useless thread.