Emulation on Linux: basic questions

I’ve been reading the docs and browsing the forum, but I couldn’t get a definitive answer I can I run CUDA in emulation with no CUDA-enabled hardware; but do I need to install CUDA-enabled drivers anyway?

Ubuntu 8.04.2, kernel 2.6.24-24, gcc 4.2.4, nvidia driver 1.696 or something (installed by nvidia-glx ubuntu package); I installed the toolkit, set the path and compiled the sdk examples with “make emu=1”. No one runs: I always get the “feature not yet implemented” message, like [topic=“94651”]here[/topic]. So the answer seems to be: yes.

So I downloaded and installed the 180.22 driver (the module didn’t load until I completely removed all nvidia-* packages), and reinstalled both toolkit and sdk; compilation is ok, but this time only “simpleGL” worked: every other example (everyone using GPU, including deviceQuery) failed to initialize:

Strange thing: the first time I try to run an example, screen is shifted of a couple of pixels and some pixels are messed up until I switch to a char tty and I switch back to the wm (KDE). If i go on the extreme right with the mouse, I see the pointer on the left…! This makes me think that the libraries are trying to connect to real hardware, while they souldn’t: they are supposed to create an emulated one, am I right?

I tried installing the 180.44, but got the same error. If I try to get the deviceprops without a cudaSafeCall, the returned struct is a nonsense (nothing is initialized). Neither CUBLAS or CUFFT are loaded like [topic=“90040”]here[/topic] (but the linked libraries are correct, like [topic=“90677”]here[/topic]).

So, actually the answer is: neither…

Summary: I don’t have CUDA hardware (but a GeForce Go 7300), I can compile all the examples (and they are linked to the correct libraries and placed in the correct emurelease dir) but noone runs: initialization fails, and it seems the libraries are actually looking for CUDA hardware. Upgrading and downgrading the driver didn’t help.

Any tip?

I add a question: in another PC I have two GF 8800 GTX, and though I “make emu=1” the devicequery prints out Device 0: “GeForce 8800 GTX” and Device 1: “GeForce 8800 GTX”; is this ok?

In other words: in emulation mode, on a machine with CUDA capable hardware, is the name of the device supposed to be “CPU” or the same as if it was not emulation mode?

i am also running a ubuntu 8.04. at home i have just a lousy geforce 5600.
but emulation was working.
i installed the toolkit and the sdk, but not the (cuda enabled) drivers.
i am not sure if i really compiled all of the sdk-examples. but some of them worked.
i wrote my own little programs with my own makefile and it works.
ok except from my programs using the driver api, because libcuda is included in the drivers.
a week ago i killed my ubuntu (dont ask), and i had to reinstall it.
i didn’t reinstall the toolkit and sdk, because i now have a test system (with gtx280).
so i cant really check if the examples are all working. (afaik i tested bandwithtest in emulation mode)
if i have time to i will try this again.

Do you remember what was the output of devicequery (more or less, just the name)?

PS: are you Stefan Ry*****? :)

no i am stefan d***

no i think i did not test this example, but the name of the device in device emu

was something like “emulated device” or “device emulation…”

ok, i installed the toolkit and sdk again.

i get the same error:

cudaSafeCall() Runtime API error in file <deviceQuery.cu>, line 59 : feature is not yet implemented.

I think this is a problem with the cudaSaveCall() function, because if I delete it (in the mentioned line)

the program executes without errors.

and the output is:

i think i tested this with a different version of the toolkit.

and with my own programs i get this name: “V @”

the other values in the deviceproperties structure are random(except clock rate or size of global memory).

not really what i would expect after reading the refernece manual:

I get the “feature is not yet implemented” problem with old drivers (i.e. the ones included in nvidia-glx-new packages, they’re a version earlier than CUDA). The strange device names without the cudaSafeCall mean that the deviceprops struct is not initialized. So with this toolkit version (2.1) you get my same problem, that is: emulation device doesn’t initialize.

Anyone else? If it’s not only my problem, maybe a bug report could be useful.

Same problem, here.

My GF 6700 XL is not under the supported cards says nv documentation. But emulation mode won’t work either.

Configuration: suse 10.3, 180.44 driver, CUDA 2.1

Testing with 180.22 driver gives the same result.

It seems to me that the first hardware access in the respective sample programs fails, error is always a safecall() variant.

Good news: with totally unsupported Ubuntu and gcc versions… it works. (K)Ubuntu 9.04, kernel 2.6.28-11, gcc 4.3.3, driver 185.18.08. Compiling with emu=1 was successful for almost all the projects.

Compilation of dwtHaar1D and dct8x8 stopped with this error (localized in italian):

To exclude these two from the list I modified the third line of ~/NVIDIA_CUDA_SDK/prokects/Makefile:

PROJECTS := $(shell find projects -name Makefile | xargs grep -L 'USEDRVAPI' | grep -v Haar | grep -v dct8x8)

I know it’s not very clean… but it did the trick. However, the problem is not in the projects themselves: it seems a glibc bug (e.g. here).

Maybe sdk 2.2 works also on previous versions of Ubuntu? My first attempt was with 2.1 on Ubuntu 8.04. Sorry, but I won’t downgrade again just to test :whistling:

Any news on this one? I have the very same problem. OpenSuse 10.3, nvidia driver 180.22, cuda toolkit/sdk 2.1. Most sdk examples give me an error like the following:

cudaSafeCall() Runtime API error in file <Mandelbrot.cpp>, line 620 : initialization error.

Same problem here:


The cutilSafeCall() and equivalently the __cudaSafeCall() functions/macros add just some error checking around the actual cuda runtime library function. And that is also the reason why it “works” as soon as you remove it. Then the cudaGetDeviceProperties() still returns an error (cudaErrorInitializationError) but it is no longer reported. Instead you get to see bogus values. So the actual problem is that cudaGetDeviceProperties() fails though it actually should return an emulation device.

Another weirdness is that my screen blanks for a short moment as soon as I run any cuda sdk example (may be because I use TwinView?). Do you experience that too?