Error - unable to use CUDA device even though it's not busy


I am trying to run a simple example program from the “CUDA by Example” book. The source code is given here: and the code is “chapter03/”. I am able to compile the code on my Tesla C2070 but it gives me the following error when I try to run the code:

all CUDA-capable devices are busy or unavailable in at line 26

Any idea on how to fix this? I am able to query the device just fine, and I am the only one trying to run any jobs on the device so I know it is not busy. Any help is appreciated.

What happens when you run the device query example from the SDK?