Strange semgentation fault

I have two kernels, after running the first, it all goes fine. if I also run the second kernel i get a segmentation fault. And the program will terminate while still in the first kernel. While it looks like the fault is coming from the second kernel.

Can anyone explain what is happening here. between the first kernel call and second kernel call i have a cudaSynchronizeThreads() so i suggest the first kernel needs to be finished before starting with the second right?

Thanks, Jordy

It’s hard to pinpoint your problem from your vague description. Could you explain in more detail? Parts of the sourcecode could also help.

What you can do: if you don’t check for CUDA errors do that after each CUDA call. The programming guide has a short section on error handling.