Question about -deviceemu and non-nVidia PC's.

Can I simulate OR compile CUDA programs on a PC that doesn’t have a nVidia CUDA-compatible VGA?
Does -deviceemu runs all the code on the host?
I managed to install the SDK and Toolkit, but when i try to compile i get some errors about .h’s and functions not found. Those headers and libs are inside the driver or SDK?


You can build and run cuda programs without an CUDA compatible vga card installed. Some of the SDK examples expect a few openGL headers and libraries that come with the NVIDIA driver package, but for any of the console based applications, you should be able to build and run them without error.

What the -deviceemu flag does is it compiles your program in a completely threaded way, but with the threading behavior of the card is emulated by actual CPU threads. This is useful for debug, since you can print from inside kernels, and since applications such as Valgrind can run your code properly. The other major benefit is that since threading is performed on the CPU, then the code can be run and developed on machines that do not have nVidia cards.

As for compiling the examples, some of them use libraries outside of CUDA. I’m guessing you saw -Lxi and -Lxmu mentioned? If so, those correspond to libxi-dev and libxmu-dev on Ubuntu, and I assume the names would be similar on other Linux flavors.

How can I get those libraries from the driver package without installing the driver? As soon as I execute the script it gives me an error that i don’t have a nVidia card installed and the instalation aborts.

Wasn’t -Lxi and -Lxmu, can’t remember the name right now because i’m not home, I’ll try as soon as I get there and post the results here.

Thanks for now :)

The driver has an advanced mode which allows greater control whether to install the driver, and where to put libraries, but that is mostly irrelevant - if you don’t have a suitable NVIDIA gpu installed, you can’t use them. What you need to do modify the build (and probably source too) to work with whatever accelerated GL hardware you do have (or MesaGL if you don’t). The effort to do so is not trivial. If you are desperate to run the GL SDK examples, the simplest thing to do it spend $50 and pick up an entry level 9400GT or 9500GT pci-express card and skip emulation all together.

So after a long time i answer…

The first library missing is libcutil. I tried searching for it and i don’t have it anywhere. Probably it is in the driver, and i can’t install the driver because it says i have no compatible bla bla bla. I can’t even get the libraries from the driver because its closed.

What if i get the libraries from a pc with nvidia and just paste them here? would it work?

libcutil is distributed in the SDK.