darknet_ros icon indicating copy to clipboard operation
darknet_ros copied to clipboard

CUDA Error: no CUDA-capable device is detected

Open burak052 opened this issue 4 years ago • 16 comments

`0 CUDA Error: no CUDA-capable device is detected CUDA Error: no CUDA-capable device is detected: Bad file descriptor [darknet_ros-1] process has died [pid 15933, exit code -6, cmd /home/zaphkiel/catkin_ws/devel/lib/darknet_ros/darknet_ros __name:=darknet_ros __log:=/home/zaphkiel/.ros/log/c17b16f2-4839-11eb-aa2e-f0038c4d290f/darknet_ros-1.log]. log file: /home/zaphkiel/.ros/log/c17b16f2-4839-11eb-aa2e-f0038c4d290f/darknet_ros-1*.log

` how can i fix this error?

Ekran Görüntüsü - 2020-12-27 15-07-03

burak052 avatar Dec 27 '20 12:12 burak052

Hey. Same issue how to solve it?

TumVink avatar Feb 05 '21 16:02 TumVink

Does nvidia-smi show you any results?

tomlankhorst avatar Feb 08 '21 14:02 tomlankhorst

nvidia-smi no result for me

patrick1bauer avatar Mar 24 '21 02:03 patrick1bauer

I am having this same error as well. I am using VMWare with Ubuntu 18.04. Is there a way to run darknet without needing a CUDA GPU?

RotorBoy2020 avatar Apr 14 '21 20:04 RotorBoy2020

I'm having the same problem, the nvidia-smi output comes out like this

스크린샷, 2021-04-20 11-23-34

leeisack avatar Apr 20 '21 02:04 leeisack

If you don't have / want to use a NVidia GPU, don't install CUDA on your system.

Try commenting out line 17 https://github.com/leggedrobotics/darknet_ros/blob/master/darknet_ros/CMakeLists.txt#L17 of the CMakeLists.txt when you get CUDA errors but you don't have a CUDA GPU.

If you do see output, like @leeisack , then you actually should not get this error. Try running darknet with the following environment variable set:

CUDA_VISIBLE_DEVICES=0, this will instruct CUDA to only make the first device visible.

(In a single bash session for example, run export CUDA_VISIBLE_DEVICES=0)

tomlankhorst avatar Apr 20 '21 06:04 tomlankhorst

Hi, I have the same issue. nvidia-smi works, like for @leeisack, but doing hat @tomlankhorst suggested did not work. Any other suggestions?

enekorodriguezplaza avatar May 11 '21 09:05 enekorodriguezplaza

If you don't want to use GPU, you can delete "find_ package(CUDA QUIET)" in Cmakelists

ThornsOoO avatar May 18 '21 05:05 ThornsOoO

I solved this, thank you

leeisack avatar May 18 '21 06:05 leeisack

@leeisack could you please share how you solved it?

enekorodriguezplaza avatar May 18 '21 07:05 enekorodriguezplaza

Well... I don't know we build the same problem first. However, in the case of me, the driver was automatically installed when cuda was installed, but if you do this, the latest driver is installed and the version of cuda is automatically increased. So, I installed the driver and cuda by setting the correct version separately.

leeisack avatar May 18 '21 07:05 leeisack

@leeisack Thank you for your reply. Can you maybe share what you mean with "So, I installed the driver and cuda by setting the correct version separately."? Maybe you can provide us with the commands you used.

tomlankhorst avatar May 19 '21 20:05 tomlankhorst

i still have the same problem. image my nvidia-smi; image

tayfurg7 avatar May 24 '21 12:05 tayfurg7

I didn't use a special method... It was solved by installing the driver according to the gpu version I am using. It seems that cuda and cudnn are installed according to the driver. So, in my case, I wanted to install the old versions of cuda and cudnn, but since the gpu is gtx1080, relatively latest version of the driver was installed and cuda and cudnn were automatically upgraded. As a result, it was resolved by completely removing cuda, driver, and cudnn, and installing all three by entering the desired version directly. There is nothing I can advise other than this...

leeisack avatar May 28 '21 06:05 leeisack

I dont know which version required to be installed according to my gpu. When i choose GPU as hardware acceleration from notebook settings, gpu is not connected to backend. Can be it caused of this problem?


From: Lee Isack @.> Sent: Friday, May 28, 2021 9:22:14 AM To: leggedrobotics/darknet_ros @.> Cc: tayfurg7 @.>; Comment @.> Subject: Re: [leggedrobotics/darknet_ros] 0 CUDA Error (#288)

I didn't use a special method... It was solved by installing the driver according to the gpu version I am using. It seems that cuda and cudnn are installed according to the driver. So, in my case, I wanted to install the old versions of cuda and cudnn, but since the gpu is gtx1080, relatively latest version of the driver was installed and cuda and cudnn were automatically upgraded. As a result, it was resolved by completely removing cuda, driver, and cudnn, and installing all three by entering the desired version directly. There is nothing I can advise other than this...

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/leggedrobotics/darknet_ros/issues/288#issuecomment-850172200, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATPWFC4KTV6VSFXTMYGG4KLTP4ZBNANCNFSM4VKYCSLA.

tayfurg7 avatar May 28 '21 07:05 tayfurg7

i still have the same problem. image my nvidia-smi; image

did you solve the issue?

PankaChakma avatar Feb 20 '23 16:02 PankaChakma