← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 3025: Fix calculation speed show in batch-system

 

------------------------------------------------------------
revno: 3025
fixes bug: https://launchpad.net/bugs/931263
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
branch nick: yade
timestamp: Mon 2012-02-13 22:06:43 +0100
message:
  Fix calculation speed show in batch-system
modified:
  core/main/yade-batch.in
  py/remote.py


--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription
=== modified file 'core/main/yade-batch.in'
--- core/main/yade-batch.in	2011-07-21 13:36:28 +0000
+++ core/main/yade-batch.in	2012-02-13 21:06:43 +0000
@@ -79,10 +79,10 @@
 			ret+='<td>'
 			if info['stopAtIter']>0:
 				ret+='<nobr>%2.2f%% done</nobr><br/><nobr>step %d/%d</nobr>'%(info['iter']*100./info['stopAtIter'],info['iter'],info['stopAtIter'])
-				finishTime = str(time.ctime(time.time()+int(round(info['stopAtIter']/(info['iter']/info['realtime'])))))
+				finishTime = str(time.ctime(time.time()+int((round(info['stopAtIter'] - info['iter'])*info['speed']))))
 				ret+='<br/><font size="1"><nobr>%s finishes</nobr></font><br/>'%finishTime
 			else: ret+='<nobr>step %d</nobr>'%(info['iter'])
-			if info['realtime']!=0: ret+='<br/><nobr>avg %g/sec</nobr>'%(info['iter']/info['realtime'])
+			if info['realtime']!=0: ret+='<br/><nobr>speed %g/sec</nobr>'%(info['speed'])
 			ret+='<br/><nobr>%d bodies</nobr><br/><nobr>%d intrs</nobr>'%(info['numBodies'],info['numIntrs'])
 			ret+='</td>'
 		else:

=== modified file 'py/remote.py'
--- py/remote.py	2011-04-07 12:19:45 +0000
+++ py/remote.py	2012-02-13 21:06:43 +0000
@@ -25,7 +25,7 @@
 
 class InfoProvider:
 	def basicInfo(self):
-		ret=dict(iter=O.iter,dt=O.dt,stopAtIter=O.stopAtIter,realtime=O.realtime,time=O.time,id=O.tags['id'] if O.tags.has_key('id') else None,threads=os.environ['OMP_NUM_THREADS'] if os.environ.has_key('OMP_NUM_THREADS') else '0',numBodies=len(O.bodies),numIntrs=len(O.interactions))
+		ret=dict(iter=O.iter,dt=O.dt,stopAtIter=O.stopAtIter,speed=O.speed,realtime=O.realtime,time=O.time,id=O.tags['id'] if O.tags.has_key('id') else None,threads=os.environ['OMP_NUM_THREADS'] if os.environ.has_key('OMP_NUM_THREADS') else '0',numBodies=len(O.bodies),numIntrs=len(O.interactions))
 		sys.stdout.flush(); sys.stderr.flush()
 		return ret
 	def plot(self):