diff --git a/tracker/rabit_demo.py b/tracker/rabit_demo.py index 14d8b7601..aa0edc20e 100755 --- a/tracker/rabit_demo.py +++ b/tracker/rabit_demo.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python """ This is the demo submission script of rabit for submitting jobs in local machine """ diff --git a/tracker/rabit_hadoop_streaming.py b/tracker/rabit_hadoop_streaming.py index 2587a6872..22b534d79 100755 --- a/tracker/rabit_hadoop_streaming.py +++ b/tracker/rabit_hadoop_streaming.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python """ Deprecated diff --git a/tracker/rabit_mpi.py b/tracker/rabit_mpi.py index e8ddb45e7..f62696050 100755 --- a/tracker/rabit_mpi.py +++ b/tracker/rabit_mpi.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python """ Submission script to submit rabit jobs using MPI """ diff --git a/tracker/rabit_sge.py b/tracker/rabit_sge.py index e2c84cc78..0a6130639 100755 --- a/tracker/rabit_sge.py +++ b/tracker/rabit_sge.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python """ Submit rabit jobs to Sun Grid Engine """ @@ -38,7 +38,7 @@ else: runscript = '%s/runrabit.sh' % args.logdir fo = open(runscript, 'w') -fo.write('\"$@\"') +fo.write('\"$@\"\n') fo.close() # # submission script using MPI @@ -63,7 +63,7 @@ def sge_submit(nslave, worker_args, worker_envs): cmd += ' %s %s' % (runscript, ' '.join(args.command + worker_args)) print cmd subprocess.check_call(cmd, shell = True) - print 'Waiting for the jobs to get up...' % args.jobname + print 'Waiting for the jobs to get up...' # call submit, with nslave, the commands to run each job and submit function tracker.submit(args.nworker, [], fun_submit = sge_submit, verbose = args.verbose) diff --git a/tracker/rabit_tracker.py b/tracker/rabit_tracker.py index 61ad32497..7c625cbd8 100644 --- a/tracker/rabit_tracker.py +++ b/tracker/rabit_tracker.py @@ -13,6 +13,7 @@ import socket import struct import subprocess import random +import time from threading import Thread """ @@ -258,6 +259,7 @@ class Tracker: job_map[s.jobid] = rank if len(todo_nodes) == 0: self.log_print('@tracker All of %d nodes getting started' % nslave, 2) + self.start_time = time.time() s.assign_rank(rank, wait_conn, tree_map, parent_map, ring_map) if s.cmd != 'start': self.log_print('Recieve %s signal from %d' % (s.cmd, s.rank), 1) @@ -266,6 +268,8 @@ class Tracker: if s.wait_accept > 0: wait_conn[rank] = s self.log_print('@tracker All nodes finishes job', 2) + self.end_time = time.time() + self.log_print('@tracker %s secs between node start and job finish' % str(self.end_time - self.start_time), 2) def submit(nslave, args, fun_submit, verbose, hostIP = 'auto'): master = Tracker(verbose = verbose, hostIP = hostIP) diff --git a/tracker/rabit_yarn.py b/tracker/rabit_yarn.py index 81f590851..6b471c4b3 100755 --- a/tracker/rabit_yarn.py +++ b/tracker/rabit_yarn.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python """ This is a script to submit rabit job via Yarn rabit will run as a Yarn application