PDA

View Full Version : Crash on Mac Mini



pettersson
01-19-2010, 10:37 PM
Hi there,

I am playing around a bit with OpenCL on my MacMini (Snow Leopard), writing a small raytracer. I just started with global illumination and that's where the code crashes. When doing lots of work per kernel (a rather slow calculation in a loop) it just crashes with "BAD_ACCESS" if i do the loop many times. If i calc fewer loops it doesn't crash. A friend of mine mentioned the possibilty of the driver stopping execution if it takes too long, could that be? (I will try the code on CPU rather than GPU after work today).

Regards and Thanks for any hints,
pettersson

dbs2
01-20-2010, 02:32 AM
BAD_ACCESS is unlikely to be a GPU-specific crash. What is the stack trace for your crash? My guess is it is in your host code, but I don't remember how a GPU-watchdog timer interrupt comes across on the application side. (It might show up as a BAD_ACCESS.) The limit is around 5-7 seconds, so you should make sure your kernel is well under that to avoid it. Also, my experience with Mac Minis is that they can be a bit problematic if you have only 128MB of VRAM.

pettersson
01-20-2010, 03:00 AM
Hi,

thanks for your fast reply. I will look into the stack trace this evening, but the 5-7 second limit matches my hand-stopped timing until the program crashes. Thanks for your insights =)

regards,
pettersson

pettersson
01-24-2010, 03:52 AM
Hi again,

so here is the error message I get when my application crashes:

"Kernel execute caused an error that invalidated the queue (0x100149600). This may be due to a resource allocation failure at execution time."

.pettersson

dbs2
01-24-2010, 09:17 AM
That indicates something bad happened to the context on the card. This could be caused by a failed runtime allocation (which is possible if you are running out of space on the card), writing out of bounds on a buffer, or, I believe, exceeding the watchdog timer. I would suggest trying to debug this by reducing the size/length of your computation and running on the CPU to verify that you are not trying to access data outside of your allocated storage.