Skip to content
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

Running soft body envs on multiple GPUs #73

Closed
cchang021 opened this issue Mar 29, 2023 · 2 comments
Closed

Running soft body envs on multiple GPUs #73

cchang021 opened this issue Mar 29, 2023 · 2 comments
Labels
question Further information is requested

Comments

@cchang021
Copy link

Hi there! I'm trying to run soft body envs on multiple GPUs, but it's only okay to run on the first card (that card has monitor plugged in). When I'm running on other cards, I did the followings:

export CUDA_VISIBLE_DEVICES=1
python -m mani_skill2.examples.demo_random_action -e Pinch-v0

But I get the following error

RuntimeError: vk::PhysicalDevice::createDeviceUnique: ErrorInitializationFailed
@xuanlinli17
Copy link
Collaborator

xuanlinli17 commented Mar 29, 2023

We found that if you are running ManiSkill2 on a device where the DISPLAY variable is non-empty (e.g., if you are using (or vnc into) a device with a monitor connected), then ErrorInitializationFailed will occur on GPUs that are not rendering the screen, regardless of rigid & soft body environments. Instead, if you ssh into the machine or if you are using a headless machine, in which case the DISPLAY environment variable is empty, then you can run ManiSkill2 envs (regardless of rigid or soft body) on all GPUs.

The current temporary solution is to unset the DISPLAY variable by using the command unset DISPLAY, or remove the DISPLAY variable during program execution by using this command (which I prefer):

DISPLAY="" python -m mani_skill2.examples.demo_random_action -e PickCube-v0
CUDA_VISIBLE_DEVICES=1  DISPLAY="" python -m mani_skill2.examples.demo_random_action -e Pinch-v0

We'll figure out a permanent solution later.

@cchang021
Copy link
Author

OK, I run the code on the other GPU successfully! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants