-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alternative way of running CARLA off-screen choosing GPU #225
Comments
Yes this works for me on linux |
This also works for me in linux ! |
On recent experiments I observed a little bit of instability on the SDL solution. |
I can run this without screen, but it seems that I can only run on GPU 0 no matter what number I set for SDL_HINT_CUDA_DEVICE. |
Can confirm @mahaoran1997 's observation that SDL_HINT_CUDA_DEVICE has no effect. I also observed that SDL_VIDEODRIVER=offscreen isn't necessary if there is no X server present, SDL seems to automatically select that method. @nsubiron do you have any additional information about SDL rendering on CUDA? I couldn't find any infos and the official SDL site doesn't even list it as an option https://wiki.libsdl.org/FAQUsingSDL . |
Tried this, but returns a segmentation fault error |
Are you running with nvidia-docker @bhaprayan, i.e. |
https://hg.libsdl.org/SDL/log?rev=SDL_HINT_CUDA_DEVICE in SDL source code nothing about SDL_HINT_CUDA_DEVICE |
@felipecode @rmst @nsubiron @seken what version SDL you use? @crizCraig |
@crizCraig Nopes, was running on a native machine. Got it to work though. I'm running with passing in |
Like @rmst , running with I also tried placing Finally, I tried using I'm using the version of SDL that ships with Ubuntu 16.04: libsdl2 2.0.4 UPDATE: Upon examining the SDL 2.0.x source code, I can't find evidence that
Unless this variable is somehow generated and not hard coded or has been removed in SDL 2.0+, it appears to be a myth (one which is also propagated in other project discussions, not just CARLA). I have asked for clarification on the SDL web forums. For those interested, here are some other combinations I've tried. Singularity image is the CARLA provided Docker Ubuntu 16.04 turned into a Singularity image, the host is Ubuntu 18.04:
I asked over in the nvidia forums for a general solution to selecting which GPU an OpenGL process runs on: |
UPDATE: CARLA 0.9.6 will now let you select which GPU to run on, for some reason this wasn't working in CARLA 0.9.5 (possibly an artifact of the way UE4 was built). Our contacts at nVidia found where the mysterious
Docker is slightly less intuitive. The environment variable |
Following up on @qhaas comment, it is possible to have GPU selection working inside docker by changing the FROM nvidia/opengl:1.0-glvnd-runtime-ubuntu16.04 in Release.Dockerfile to FROM nvidia/cudagl:10.0-runtime-ubuntu16.04. With this new image, the SDL_HINT_CUDA_DEVICE=1 achieves the desired effect. |
This doesn't work for me. I'm running CARLA 0.9.6-29 on Ubuntu 18.04 the Any suggestions? |
From CARLA 0.9.5 release GPU may also be selected with |
Using Wed Nov 27 13:04:17 2019
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 410.48 Driver Version: 410.48 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 Quadro P400 Off | 00000000:17:00.0 On | N/A |
| 34% 39C P0 N/A / N/A | 1172MiB / 2000MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
| 1 GeForce RTX 208... Off | 00000000:B3:00.0 Off | N/A |
| 41% 30C P8 21W / 250W | 0MiB / 10986MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Sat_Aug_25_21:08:01_CDT_2018
Cuda compilation tools, release 10.0, V10.0.130 lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.3 LTS
Release: 18.04
Codename: bionic |
This appears to no longer work on Ubuntu. Any suggestions? |
I've just downloaded official carla 0.9.6 release and tested with: DISPLAY= CUDA_DEVICE_ORDER=PCI_BUS_ID CUDA_VISIBLE_DEVICES=1 ./CarlaUE4.sh -opengl And
|
Great! But still does not work on my machine. But now at least I see the process showing up on the right GPU DISPLAY= CUDA_DEVICE_ORDER=PCI_BUS_ID CUDA_VISIBLE_DEVICES=1 ./CarlaUE4.sh -opengl
4.22.3-0+++UE4+Release-4.22 517 0
Disabling core dumps.
LowLevelFatalError [File:Unknown] [Line: 102]
Exception thrown: bind: Address already in use
Signal 11 caught.
Malloc Size=65538 LargeMemoryPoolOffset=65554
CommonUnixCrashHandler: Signal=11
Malloc Size=65535 LargeMemoryPoolOffset=131119
Malloc Size=123824 LargeMemoryPoolOffset=254960
Engine crash handling finished; re-raising signal 11 for the default handler. Good bye.
Segmentation fault (core dumped) +-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1614 G /usr/lib/xorg/Xorg 278MiB |
| 0 8992 G /usr/bin/compiz 291MiB |
| 0 13095 G ...uest-channel-token=10380395948321160125 245MiB |
| 1 3445 G .../Binaries/Linux/CarlaUE4-Linux-Shipping 115MiB |
+-----------------------------------------------------------------------------+ Do you mind sharing to X11 config file, I guess that might be related |
Since with DISPLAY set to empty string, simulator is run offscreen mode - it communicates with NVIDIA GPU directly skipping X server. It runs on systems with and without xserver. This error is caused because you have already started simulator which is binded to 2000 port
|
@pawel-ziecina thanks a lot! I had a service running in the background using that port. Now it's working like a charm! Thanks a lot! |
I have got this error:
|
How do I run the Carla training model on a Linux remote server without root access |
How can i do when face it?????please help me [2020.03.06-08.36.02:857][ 0]LogInit: Using OS detected language (en-US). |
This conversation got totally obsolete. The current official way to run CARLA offscreen is using Nvidia-docker. Please open a new issue if further discussion is needed. |
Then this tutorial is also obsolete? |
Supposedly SDL2 already allows off-screen rendering on NVidia devices with CUDA enabled and selecting a specific device using
Please check if this works.
The text was updated successfully, but these errors were encountered: