My CUDA program crashed during execution, before memory was flushed. As a result, device memory remained occupied.
I\'m running on a GTX 580, for which nvidia-
nvidia-
I also had the same problem, and I saw a good solution in quora, using
sudo kill -9 PID.
see https://www.quora.com/How-do-I-kill-all-the-computer-processes-shown-in-nvidia-smi