no CUDA-capable device is detected

Hi, I am trying to get CUDA to work with the four NVIDIA Tesla c2050 GPUs
in my SuperMicro SuperServer 7046. My OS is 64-bit Windows 7 and I have already
installed the 270.90 drivers that NVIDIA suggests for the c2050 GPUs, the
CUDA toolkit, CUDA SDK, and SDK code samples (versions 4.0).
The GPUs are recognized as Display Adapters (Control Panel)and their drivers
appear to be properly installed (Drivers are recognized by Windows as the
latest drivers). However, when I try to run a code sample (namely, the
sample bandwidthTest), I get the following error message:

cudaGetDeviceProperties returned 38
-> no CUDA-capable device is detected

Support at SuperMicro did not shed any light on the issue and I have run
out of ideas. Does anyone know how I can conquer this problem?

What kind of display card are you using? Due to Windows driver limitations, you can’t run the standard NVIDIA WDDM driver at the same time as the standard VGA driver, which is what older onboard chipsets generally use.

If you’re not using the C2050, use the C2050 as a display card once, run nvidia-smi to enable all adapters as TCC devices (you’ll probably have to use the force flag for the display device), then reboot with the onboard video as the display card.

I encountered the same problem recently, with a Maximus 2.0 setup.
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 the CUDA runtime will enumerate your GPUs normally according to their PCIe config and everything will work again!

Very strange problem, and I could not for the longest time figure out what was going on… but maybe this will help you too.


i am trying to write some code with cuda but i get an error “cudaErrorNoDevice” (cudaSetDevice failed! Do you have a CUDA-capable GPU installed?)
in visual studio 2010 in file in windows 8.

i have installed “cuda_5.5.20_winvista_win7_win8_general_64.exe” and the driver of gt540 m “320.49-notebook-win8-win7-64bit-international-whql”

i changed the 0 on the below to 1 because i have two gpus on my computer. One is intel hd graphics 3000, the other one is geforce gt 540 m.

cudaStatus = cudaSetDevice(0);

and tried below code to count the device count but it says 0.

int dCount=0;

cudaGetDeviceCount( &dCount );

i also tried command prompt for running devicequery.exe and bandwithtest.exe. They give me some messages too.

cudaGetDeviceCount returned 38 ->no CUDA-capable device is detected Result = FAIL

cudaGetDeviceProperties returned 38

Also, i can see my GPU in visual studio nsight->start performance analysis
It shows green button for my device.

My gpu is on the list of devices that can run CUDA.

Can you help me solve my problem.