added a progress bar for job submission
This commit is contained in:
parent
0a0e43f409
commit
20ea028db6
@ -78,18 +78,23 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
results = []
|
results = []
|
||||||
|
|
||||||
|
widgets = ['submit jobs: ', Percentage(), ' ', Bar(), ' ', ETA()]
|
||||||
|
pbar = ProgressBar(widgets = widgets, maxval = count)
|
||||||
|
pbar.start()
|
||||||
submit_start = time.time()
|
submit_start = time.time()
|
||||||
for i in xrange(count):
|
for i in xrange(count):
|
||||||
X = np.random.random((1,3))[0]
|
X = np.random.random((1,3))[0]
|
||||||
tasksq.put((i, options.order, options.extra, X))
|
tasksq.put((i, options.order, options.extra, X))
|
||||||
|
pbar.update(i+1)
|
||||||
submit_end = time.time()
|
submit_end = time.time()
|
||||||
|
pbar.finish()
|
||||||
|
|
||||||
for i in xrange(participants):
|
for i in xrange(participants):
|
||||||
print "sending worker %d start message" % (i+1,)
|
print "sending worker %d start message" % (i+1,)
|
||||||
slavesq.put("start")
|
slavesq.put("start")
|
||||||
|
|
||||||
receive_start = time.time()
|
receive_start = time.time()
|
||||||
widgets = ['Progress: ', Percentage(), ' ', Bar(), ' ', ETA()]
|
widgets = ['interpolate: ', Percentage(), ' ', Bar(), ' ', ETA()]
|
||||||
pbar = ProgressBar(widgets = widgets, maxval = count)
|
pbar = ProgressBar(widgets = widgets, maxval = count)
|
||||||
pbar.start()
|
pbar.start()
|
||||||
for i in xrange(count):
|
for i in xrange(count):
|
||||||
|
Loading…
Reference in New Issue
Block a user