exit(1) in device?

What do you expect it to do? If you want to exit the current thread, use [font=“Courier New”]return[/font].

If you want all other threads to abort as well, use [font=“Courier New”]asm(“trap;”)[/font], potentially with a [font=“Courier New”]threadfence()[/font] or [font=“Courier New”]threadfence_system()[/font] before it if you want to make sure previous writes hit memory first. In the [font=“Courier New”]asm(“trap;”)[/font] case, the next CUDA call will return an error code to indicate that the kernel has been aborted.