Problem with CUDA code running as a service

I’m working on a CUDA code that is part of a larger data processing code. The processing code runs as a service on a Windows machine (either XP or Vista at this time). The service processes requests arriving over the network.

The code runs fine as a standalone application, or as a service under XP, but not as a service under Vista (it claims to not see any CUDA devices, only emulation mode).

Could this be related to the issues people report with Remote Desktop (video routed through a dummy video driver), or perhaps a permission issue (service not allowed to talk to video driver)? Note: I’m not using remote desktop, just wonder if this is a similar sort of problem.

I’m using a single EVGA GTX280 as the only video card in the system, with a monitor attached.

Any ideas?

Thanks,

Scott.

I remember hearing rumblings that it is a permission issue. Can you check what permissions the account starting the service has? I don’t have a Vista machine handy to poke at it.

We are running the service from an account with (computer) administrator privileges (note: the computer is not on a domain). We’ve also tried it from the local system account, but neither worked.

Also (just in case it matters), this is 32-bit Vista.

I bet that’s because your service is loading before the NVIDIA’s driver service ( NVIDIA Display Driver Service, nvsvc ) or the Windows Driver Foundation - User-mode Driver Framework ( which I bet is used to display the NVIDIA control panel ).

It appears that CUDA code won’t run as a service on Vista regardless of what order you start the services. Even if you shut the service down (well after the entire system is online) and restart it, it cannot find any CUDA devices. Is it officially true that CUDA isn’t supported in Vista services? Will there be future support of services in Vista? Services work just fine in XP.

Vista is a wonderful animal… Looks like, I may have to get my hands wet with it in near future… Posts like this makes me think its going to be a horrendous experience… :o

The most likely reason for this behavior is Session 0 isolation (which is a Vista feature) not giving services access to the video driver. Please see this post:

http://forums.nvidia.com/index.php?showtopic=67613&hl=

The only way I found to solve this is to turn my app from a service (in fact an ASMX web service) into a WinForms application with a GUI and all.

Another way around the session 0 isolation is to make your service launch the actual provider in session 1 with access to the display driver. See this topic for an example VS2008 project.