First I found the post that said that emulation had been changed from a /debug keyword to linking to a different library [cudartemu.lib] in 3.0
Now I find another post that says:
If you have the latest tookit (so CUDA 3.1), there is no device emulation any more. It was deprecated in CUDA 3.0 and removed in CUDA 3.1.
I am using v3.2 of the SDK and there is no cudartemu.lib nor any *emu.lib on my system. So I am guessing that it has indeed been removed.
Can someone from Nvidia give a definitive response about emulation, future of emulation etc.? How do they see debugging GPU programs if we are still on XP and have not transitioned to Win7 and NSight?
Can someone comment on the utility of running under Win7 instead of XP for embedded applications with the GPU?
And which version of Win7 is the recommended system?
It is gone for good. It was apparently a large undertaking to support and not really that useful (debatable - there are other threads that discuss its usefulness). It was very easy to write code that would work in emulation mode and break on the device making it questionable as a debugging tool.
printf and cuPrintf are probably your best bet. You could also use a linux or win7 installation to debug your gpu side code if for some reason you can’t find the bug with the printf/cuPrintf option. There are some projects that could aid in debugging such as ocelot: Google Code Archive - Long-term storage for Google Code Project Hosting. but I think its windows support is pretty limited.
There are three emulators that I know: Ocelot, Barra, and Waste. Of the three, only Waste–which I wrote–runs on Windows. You can find the tool at Google Code Archive - Long-term storage for Google Code Project Hosting. . Each work in a different way, with different capabilities and goals.
Mind you, I don’t know if it works on XP as I’m on Windows 7 and haven’t set up a VirtualBox of XP to test it. Also, the Waste emulator is very slow, and it does not implement a lot of stuff. However, it does work fine on small problems using a small subset of the CUDA runtime and driver API, and should be OK in developing your code. You can use it with CUDA drivers, or without. I provide a NVCUDA.DLL stub substitute if you don’t install the CUDA drivers. Printf in the kernel is supported, and really the only way at the moment to see if your code works. The emulator does work with the Microsoft Visual Studio C++ debugger like the old NVIDIA emulator. But I am working on a debug engine extension now, and it will be available at some point.