Changeset 248 for tbroadcast
- Timestamp:
- Sep 25, 2006, 3:39:11 PM (18 years ago)
- Location:
- tbroadcast/HEAD
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
tbroadcast/HEAD/python/tbroadcast.py
r245 r248 39 39 self.silent = silent 40 40 self.perf = perf 41 if self.perf :42 f = open ( 'performances.log', 'w+')41 if self.perf is not False: 42 f = open (self.perf, 'w+') 43 43 f.close() 44 44 if output is not None: … … 444 444 if self.perf: 445 445 self.semaphore.acquire () 446 f = open ( 'performances.log', 'a')446 f = open (self.perf, 'a') 447 447 f.write (arg['package']+" "+str(self.packages[arg['package']] ['startTime'])+" "+str(self.packages[arg['package']] ['endTime'] )+'\n') 448 448 f.close() -
tbroadcast/HEAD/scripts/generateGantt
r247 r248 1 1 #!/usr/bin/env python 2 #----------------------------------# 3 # -- Author: V. Garonne 4 # -- Mail: garonne@lal.in2p3.fr 5 # -- Date: 08/25/2006 6 # -- Name: generateGantt 7 # -- Description: script to generate 8 # -- the gantt chart from a input file 9 # -- It uses Paw. 10 #----------------------------------# 2 11 3 12 import os … … 5 14 import time 6 15 import string 16 import commands 17 18 def usage (): 19 print 'Usage : > generateGannt <input file>' 7 20 8 21 if __name__ == '__main__': 9 file = sys.argv[1] 10 f = open (file) 22 if len(sys.argv) != 2: 23 usage () 24 sys.exit(-1) 25 26 # First read the file 27 file = sys.argv[1] 28 f = open (file) 11 29 lines = f.readlines() 12 30 f.close () 31 32 # Instanciate constants 13 33 total = len(lines) 14 34 min = time.time() … … 22 42 max = float(end) 23 43 44 # then compute for each package its line 24 45 packages = {} 25 46 for line in lines: … … 40 61 packages[package]['index']= index 41 62 done.append(package) 42 print i,index, package63 #print i,index, package 43 64 if not package in start: 44 65 if packages[package]['start']> i: … … 50 71 y = 0 51 72 for package in packages: 73 print package 52 74 if packages[package]['index'] > y: 53 75 y = packages[package]['index'] … … 105 127 106 128 f = open ("exec.kumac", "w+") 107 f.write ("\n\n kumac/"+string.lower(Site)+".kumac")129 f.write ("\n\n gantt.kumac") 108 130 f.close () 109 131 110 status, output = commands.getstatusoutput ("paw<exec.kumac") 111 # status, output = commands.getstatusoutput (cmd) 112 # 113 # 114 # 115 # for package in packages: 116 # #print packages[package]['start'], packages[package]['end'] 117 # concurent = list() 118 # for pack in packages: 119 # if (packages[package]['start'] < packages[pack]['start'] and packages[pack]['start'] < packages[package]['end'])\ 120 # or (packages[package]['start'] < packages[pack]['end'] and packages[pack]['end'] < packages[package]['end']): 121 # concurent.append (pack) 122 # packages[package]['concurent'] = concurent 123 # 124 # total = 0 125 # for package in packages: 126 # if len(packages[package]['concurent'])> total: 127 # total = len(packages[package]['concurent']) 128 # if not packages[package].has_key('index'): 129 # index = 1 130 # for pack in packages[package]['concurent']: 131 # if packages[package]['end']<packages[pack]['end']: 132 # index = index + 1 133 # packages[package]['index'] = index 134 # 132 status, output = commands.getstatusoutput ("paw<exec.kumac") 133 #--------- EoF --------# -
tbroadcast/HEAD/scripts/tbroadcast
r245 r248 19 19 print '# <command>: command to execute' 20 20 print '# global options :' 21 print '# -check : Check execution (deadlocks)'22 21 print '# -f=<file> : Input file' 23 22 print '# -help : Print help' 24 print '# -local : ' 25 print '# -ignore_cycles : ' 26 print '# -nb=<num_worker> : Total number of threads' 23 print '# -local : Reach packages only within the current project' 24 print '# -global : Reach packages in all CMTPATH/CMTPROJECTPATH items' 25 print '# -ignore_cycles : Suppress automatically the cycles' 26 print '# -nb=<num_worker> : Change the total number of threads[default is 20]' 27 27 print '# -output=<location> : Output directory to store output files with the form <package>_output.log' 28 28 print '# -error=<location> : Output directory to store error output with the form <package>_error.log' 29 print '# -print : Print dependency graph' 29 print '# -perf=<file> : Store for each package the time for executing the command in the <file> file' 30 print '# -print : Print dependencies for each package' 31 print '# -silent : Disable print' 30 32 print '# -test : Simulate execution' 31 33 … … 52 54 file = string.split(arg,'=')[1] 53 55 if option == '-perf': 54 perf = True56 perf = string.split(arg,'=')[1] 55 57 if option == '-output': 56 58 output = string.split(arg,'=')[1]
Note: See TracChangeset
for help on using the changeset viewer.