2

I'm trying to do some CUDA development on a PC without CUDA-capable GPU via emulation mode. The OS is Linux Mint Debian (can be considered Debian testing for all practical purposes) 32bit (2.6.32-5-686 kernel). Here's what I did so far:

echo "# CUDA stuff PATH=\$PATH:/usr/local/cuda/bin LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/local/cuda/lib export PATH export LD_LIBRARY_PATH" >> ~/.bashrc

  • Added the path to /etc/ld.so.conf.d/cuda.conf: /usr/local/cuda/lib

  • Executed "sudo ldconfig"

  • Restarted the session

  • Then installed the SDK in /home/user/NVIDIA_GPU_Computing_SDK folder

  • When I got to NVIDIA_GPU_Computing_SDK/C and type "make emu=1" to compile the examples I get:

nvcc warning : option 'device-emulation' has been deprecated and is ignored /usr/bin/ld: cannot find -lcudartemu /usr/bin/ld: cannot find -lcudartemu collect2: ld returned 1 exit status

Seems like a library missing (rt = runtime ?). There is libcudart3 in the package manager, but wants a whole bunch of nvidia stuff as a dependency, including drivers and I don't even have an NVIDIA card on this machine. Also apparently the GPU emulation is now deprecated... Does anybody have some experience with CUDA emulation?

fbielejec
  • 3,492
  • 4
  • 27
  • 35

2 Answers2

3

There is no emulation in CUDA any more. It was deprecated and removed during the 3.x release cycle. There is no emulation support beyond CUDA 3.1 IIRC. Certainly there is nothing you can do in CUDA 4.0.

On Linux, your best bet is to try gpuocelot, which provides a PTX level emulation on x86 processors and a reimplementation of the CUDA APIs.

talonmies
  • 70,661
  • 34
  • 192
  • 269
  • I can give it a spin. I can see here: http://code.google.com/p/gpuocelot/ that they provide a .deb package. Is it usable or should I compile ? – fbielejec Jul 06 '11 at 16:38
  • I don't know, to be honest, I have always built it from source for the roughly two years I have been using it. – talonmies Jul 06 '11 at 17:53
  • I have pulled the sources from svn, it's an intimidating 2.2GB, do I really need it all, or just whats under gpuocelot/ocelot ? Could You also please roughly sketch the steps I need to compile as I have found at least two contradicting tutorials, one mentions to compile hydrazine and copy all folders under hydrazine/hydrazine/* into gpuocelot/ocelot/hydrazine/*, the one provided one projects page says to just compile by calling libtoolize; aclocal; autoconf; automake; ./configure; make in gpuocelot/ocelot/hydrazine/. – fbielejec Jul 06 '11 at 21:12
  • The release tarballs are under 1Mb in size, so I have no idea what you pulled from their SVN. Ocelot has a [mailing list](http://groups.google.com/group/gpuocelot/topics), if you have specific installation questions, that is the place to ask them, not here. – talonmies Jul 07 '11 at 07:47
0

Although I agree with the suggestion to try Ocelot, when I was in the same boat I found it easiest to go on eBay and get a cheap CUDA capable card to use for testing (I think I paid < $40). If you have the ability to open the hardware (I realize this isn't an option for some people) and to install drivers, that's what I'd suggest.

Chris Gregg
  • 2,376
  • 16
  • 30
  • 1
    I already have a CUDA capable machine, GeForce GTX 590 for main development. I want the emulation "when on the go" with toshiba laptop, or when working from home. – fbielejec Jul 07 '11 at 13:03
  • @fbielejec -- That makes sense. I `ssh` into my workhorse machines if I'm on a non-CUDA laptop. – Chris Gregg Jul 07 '11 at 13:26