Ignore:
Timestamp:
Aug 29, 2014, 12:05:16 PM (8 years ago)
Author:
cfuguet
Message:

reconfiguration/tsar_generic_iob: adding legend in plot with fault configs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/reconfiguration/platforms/tsar_generic_iob/scripts/parse.py

    r782 r784  
    1919    ffst_end = open(outpath, "w")
    2020    ffst_end.write("#  ffst end (cycles)\n")
     21    ffst_end.write("{0}\n".format(len(faultconfigs)))
     22    for config in faultconfigs:
     23        ffst_end.write("{0}\n".format(config))
    2124
    2225    # repeat while configurations is not empty
    2326    quit = 0
    2427    for x,y in configs:
    25         ffst_end.write("\n")
    26         ffst_end.write(str(x*y))
    27         for f in xrange(faultconfigs):
     28        ffst_end.write("\n{0:<6}".format(str(x*y)))
     29        for f in xrange(len(faultconfigs)):
    2830            temp = "config_{0}c{1}f/".format(x*y, f)
    2931            confdir = os.path.join(confpath, temp)
     
    4446                    found = True
    4547                    value = int(partitions[2])
    46                     ffst_end.write("   {0}".format(value))
     48                    ffst_end.write(" {0:<8}".format(value))
    4749                    break
    4850
    49             if not found: ffst_end.write("   -1")
     51            if not found: ffst_end.write(" {0:<8}".format(-1))
    5052            # end for faultconfig
    5153
     
    5961    configs = []
    6062    configs.append([2 , 2 ])
     63    configs.append([4 , 2 ])
    6164    configs.append([4 , 4 ])
     65    configs.append([8 , 4 ])
    6266    configs.append([8 , 8 ])
     67    configs.append([16, 8 ])
    6368    configs.append([16, 16])
    6469
    65     assert len(sys.argv) > 3,\
    66            "Introduce number of faulty configs, config path and output path"
     70    faultconfigs = []
     71    faultconfigs.append('0 faulty core')
     72    faultconfigs.append('1 faulty core')
     73    faultconfigs.append('2 faulty cores')
     74    faultconfigs.append('1 faulty cluster (3 cores)')
     75    faultconfigs.append('2 faulty clusters (6 cores)')
    6776
    68     parse_ffstend(configs, int(sys.argv[1]), sys.argv[2], sys.argv[3])
     77    assert len(sys.argv) > 2, "Introduce config path and output path"
     78
     79    parse_ffstend(configs, faultconfigs, sys.argv[1], sys.argv[2])
    6980
    7081# vim: tabstop=4 : softtabstop=4 : shiftwidth=4 : expandtab
Note: See TracChangeset for help on using the changeset viewer.