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

Changed Gloo mode to attempt changing directory into the current working directory that the command was launched from, if it exists, to be consistent with MPI #1298

Merged
merged 2 commits into from Aug 13, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 4 additions & 6 deletions horovod/run/gloo_run.py
Expand Up @@ -141,10 +141,7 @@ def _exec_command(_command, _index, event_):
'message: {message}'.format(message=e))
return 0

if settings.ssh_port:
ssh_port_arg = "-p {ssh_port}".format(ssh_port=settings.ssh_port)
else:
ssh_port_arg = ""
ssh_port_arg = '-p {ssh_port}'.format(ssh_port=settings.ssh_port) if settings.ssh_port else ''

# Create a event for communication between threads
event = threading.Event()
Expand All @@ -171,7 +168,7 @@ def set_event_on_sigterm(signum, frame):
local_command = '{horovod_env} {env} {run_command}' .format(
horovod_env=horovod_rendez_env,
env=' '.join(['%s=%s' % (key, quote(value)) for key, value in env.items()
if env_util.is_exportable(key)]),
if env_util.is_exportable(key)]),
run_command=_run_command)

if host_name not in remote_host_names:
Expand All @@ -181,7 +178,8 @@ def set_event_on_sigterm(signum, frame):
'{local_command}'.format(
host=host_name,
ssh_port_arg=ssh_port_arg,
local_command=quote(local_command)
local_command=quote('cd {pwd} >& /dev/null ; {local_command}'
.format(pwd=os.getcwd(), local_command=local_command))
)
args_list.append([command, alloc_info.rank, event])

Expand Down