Skip to content

Commit

Permalink
Update interactive_run.py
Browse files Browse the repository at this point in the history
  • Loading branch information
bichengying committed Jan 12, 2021
1 parent 0998d55 commit 384c05d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bluefog/run/interactive_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,11 @@ def main():
print(bluefog.__version__)
exit(0)

def handler(signum, frame):
_maybe_kill_ipcontroller_process(args.profile)
raise KeyboardInterrupt
signal.signal(signal.SIGINT, handler)

env = os.environ.copy()
env['BLUEFOG_CYCLE_TIME'] = str(20) # Increase the cycle time

Expand Down Expand Up @@ -303,6 +308,7 @@ def main():
multiple_machines_launch(args, env, all_host_names=all_host_names,
hosts_arg=hosts_arg,
remote_host_names=remote_host_names)
_maybe_kill_ipcontroller_process(args.profile)
except Exception as e:
print("Fail to launch ibfrun. Error: ", e)
_maybe_kill_ipcontroller_process(args.profile)
Expand Down

0 comments on commit 384c05d

Please sign in to comment.