You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I tried to run python spinup/examples/bench_ppo_cartpole.py as said in homework 1, it failed as the openmpi command called by the python code raised an error saying that openmpi could not run as a root user. link to this issue
It works when I use an alternative command python -m spinup.run ppo --env CartPole-v0, otherwise I need to add a new user, switch the user and run the code.
The text was updated successfully, but these errors were encountered:
I find an easier solution for the OpenMPI's root user issue.
If you dig into Spinningup's source code, you'll notice that it calls mpirun in only one place, which is line 31, spinningup/spinup/utils/mpi_tools.py.
Changing args = ["mpirun", "-np", str(n)] to args = ["mpirun", "--allow-run-as-root", "-np", str(n)] solves the problem.
When I tried to run
python spinup/examples/bench_ppo_cartpole.py
as said in homework 1, it failed as the openmpi command called by the python code raised an error saying that openmpi could not run as a root user. link to this issueIt works when I use an alternative command
python -m spinup.run ppo --env CartPole-v0
, otherwise I need to add a new user, switch the user and run the code.The text was updated successfully, but these errors were encountered: