Changeset 243 for tbroadcast/v2/scripts
- Timestamp:
- Sep 1, 2006, 3:33:44 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tbroadcast/v2/scripts/tbroadcast
r242 r243 19 19 print '# <command>: command to execute' 20 20 print '# global options :' 21 print '# -nb=<num_worker>] : Total number of threads' 21 print '# -check : Check execution (deadlocks)' 22 print '# -f=<file> : Input file' 23 print '# -help : Print help' 24 print '# -local : ' 25 print '# -ignore_cycles : ' 26 print '# -nb=<num_worker> : Total number of threads' 27 print '# -output=<location> : Output directory to store output files with the form <package>.log' 28 print '# -print : Print dependency graph' 22 29 print '# -test : Simulate execution' 23 print '# -check : Check execution (deadlocks)'24 print '# -print : Print dependency graph'25 print '# -help] : Print help'26 30 27 31 if __name__ == '__main__': 28 32 # Default options 29 num_worker = 20 30 command = '' 31 test = False 32 check = False 33 print_graph = False 33 num_worker = 20 34 command = '' 35 test = False 36 check = False 37 print_graph = False 38 local = False 39 ignore_cycles = False 40 output = None 41 file = None 34 42 for arg in sys.argv[1:len(sys.argv)]: 35 43 if arg[0]=='-': 36 44 option = string.split(arg,'=')[0] 37 45 if option == '-nb': 38 num_worker = int (string.split(arg,'=')[1]) 39 elif option == '-test': 40 test = True 46 num_worker = int (string.split(arg,'=')[1]) 47 if option == '-f': 48 file = string.split(arg,'=')[1] 49 if option == '-output': 50 output = string.split(arg,'=')[1] 51 if option == '-local': 52 local= True 53 if option == '-ignore_cycles': 54 ignore_cycles = True 55 if option == '-help': 56 usage() 57 sys.exit(-1) 58 59 if option == '-test': 60 test = True 41 61 elif option == '-check': 42 check = True62 check = True 43 63 elif option == '-print': 44 print_graph = True 45 else: 46 usage() 47 sys.exit(-1) 64 print_graph = True 48 65 else: 49 66 command = arg 50 67 51 master = Scheduler (num_workers=num_worker )68 master = Scheduler (num_workers=num_worker, file=file, ignore_cycles=ignore_cycles, local=local, output=output) 52 69 if test: 53 70 master.simulate_execution()
Note: See TracChangeset
for help on using the changeset viewer.