When a kernel fails, returning an “unspecified launch error”, all future calls to the card [Edit: in that same process], including memcpy’s, fail with the same result. How do I reset the current thread’s context so I can run further code? I’m calling cudaGetLastError and cudaGetErrorString (which is how I get the error message), but it never resets it to Success like the documentation suggests it should. I’ve even tried cudaThreadExit (which doesn’t fail), because the documentation says that any subsequent call reinitializes the runtime; but subsequent calls continue to return the same unhelpful error code.
I’m storing debug data in global memory which would be very useful for post-crash analysis, if I could only get at it.
Does anyone know how to reset the current thread’s context using the Runtime API, so that the card may be used again?
[Edit: This is on 64-bit Ubuntu 8.04.]