SIGGRAPH 2011 NURBS tessellation example crashes in cudaEventSynchronize

I’m attempting to get the CUDA NURBS tessellation example code, presented during SIGGRAPH in 2011, to run on Linux (the example code is here: http://www.nvidia.com/content/siggraph/CudaNURBSTessellation_Updated.zip). However the program crashes inside a call to cudaEventSynchronize (itself called from within the sample’s ComputeNURBSTessellationLevel() function). I don’t have much experience with these synchronization primitives myself, but, other sample programs from the SDK (like nbody) that use cudaEventSynchronize work fine.

Was wondering if anyone had experience with this sample program, or might know why cudaEventSynchronize might cause problems in Linux (the program segfaults within a call placed by cudaEventSynchronize to pthread_attr_setdetachstate).

My system runs CentOS 5.7 (x86_64). I’ve got a GTX 480 card, driver version 295.41, CUDA toolkit version 4.2.9.

Many thanks!

– Alex

Nevermind - I got this example to work on Linux. If anyone’s interested, here’s what the issues were:

cudaEventSynchronize failed because a kernel didn’t launch earlier. The reason for that was that some of the pointers being passed to the kernel were getting truncated to 32 bits. To fix this, change the types for g_VertexStart, g_NormalStart, gIndexStart to uint64_t, and adjust the related calls to cudaMemcpyToSymbol appropriately. I also needed to increase the stack limit to 2048 in order to get the normals to compute correctly.

– Alex