Changeset 243 for tbroadcast/v2/scripts


Ignore:
Timestamp:
Sep 1, 2006, 3:33:44 PM (18 years ago)
Author:
garonne
Message:

MàJ

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tbroadcast/v2/scripts/tbroadcast

    r242 r243  
    1919    print '#   <command>: command to execute'
    2020    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'
    2229    print '#   -test                 : Simulate execution'
    23     print '#   -check                : Check execution (deadlocks)'
    24     print '#   -print                : Print dependency graph'   
    25     print '#   -help]                : Print help'
    2630
    2731if __name__ == '__main__':
    2832    # 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
    3442    for arg in sys.argv[1:len(sys.argv)]:           
    3543         if arg[0]=='-':
    3644             option = string.split(arg,'=')[0]
    3745             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   
    4161             elif option == '-check':
    42                  check = True   
     62                     check = True   
    4363             elif option == '-print':
    44                  print_graph = True   
    45              else:
    46                 usage()
    47                 sys.exit(-1)     
     64                     print_graph = True   
    4865         else:
    4966              command = arg
    5067
    51     master = Scheduler (num_workers=num_worker)   
     68    master = Scheduler (num_workers=num_worker, file=file, ignore_cycles=ignore_cycles, local=local, output=output)
    5269    if test:
    5370        master.simulate_execution()
Note: See TracChangeset for help on using the changeset viewer.