Inconsistent error message: no CUDA-capable device is detected

Hi everyone,

I’m new at CUDA and am stuck at the install stage. I’m using Windows 7, and have an NVIDIA GEFORCE GT 540 M for a notebook, and I installed the CUDA drivers for that (along with the GPU computing SDK, CUDA toolkit, etc). To verify everything, I went to the

C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK 4.0\C\bin\win64\Release

and I ran bandwidthTest.exe, to see if it would work.

So here’s the fun part. When I install and update the drivers and immediately navigate to that folder and run the file, the test passes. But if I then fudge around and try running a few other files (maybe some not compatible with my particular GPU) I get the message: no CUDA capable device is detected. Then after that point, EVERY TIME I try to run bandwidthTest.exe, I get that message (no CUDA capable device is detected). This is pretty much irreversible unless I reinstall the divers and do a clean install.

Is anyone else having this issue? Is there a fix? Or maybe a general reset-to-factory-settings switch? It would be nice not to have to reinstall the drivers every time I make a mistake. Thanks!

I encountered the same problem recently.
Inexplicably, a system environment variable appeared (as far as I could tell, spontaneously) named CUDA_VISIBLE_DEVICES and had the value ‘1’.

If you have this same problem, delete this environment variable and your single GPU (which must be numbered device 0) will once again be detected!

Very strange problem, but maybe this will help you too.

I suspect that a hard or soft reboot will return the card to its normal state and you won’t have to mess with uninstalling/reinstalling the drivers. The fact is as you uninstall/reinstall drivers you do that. What brand of laptop is this? Have you noticed any glitches when running programs that use the NVIDIA video card in the past? You might also try going to the NVIDIA Control Panel and tinker with the settings to select the NVIDIA card as default. See nnando’s post here:

If that doesn’t help, it could be a hardware issue – i.e. the card solder joints could be the issue, but it’s hard to tell without doing more troubleshooting (i.e. install Linux/bumblebee/cuda and see if the problem persists there, if it does, it’s more than likely hardware related)

Also, update to the latest NVIDIA drivers if you haven’t already. The developer drivers that ship with the CUDA install might be older, not sure.