I have a program that requires repeatedly launching the same kernel and accumulating the results over time (a fairly typical Monte-Carlo type simulation). On OSX and Linux, everything runs fine and the kernel will successfully execute as many times as specified. On Windows, however, the kernel will successfully launch anywhere between once and a few dozen times before the program will crash with an access violation. The number of successful launches before a crash seems to be random.
Does anyone know of some possible reasons why this may happen?