I compiled the code but now when I launch my kernel program crashes :( - why?
I build it on Realease config… should I use debug for printf or what?
It crashes on > program.exe!__tmainCRTStartup() Line 501 + 0xf bytes C
below is some strange file crtexe.c
/*
* do C++ constructors (initializers) specific to this EXE
*/
if (__native_startup_state == __initializing)
{
_initterm( __xc_a, __xc_z ); // <<<<<<<<<<<<<<<<<<<<<<<<<<< this line unhandled exception
__native_startup_state = __initialized;
}
Okay it works now, something strange happened and I had to recompile whole project…
mainCRTStartup is buried in the CUDA runtime library. A failure like that would generally suggest something in your build system, toolchain or CUDA toolkit is badly broken, but I can’t help with Windows or Visual Studio troubleshooting, sorry.
I am having the same problem, and must be doing some boneheaded thing. I have compute capability 2.1, so I should be able to use printf. Here is my code: