Mercurial > cgi-bin > hgwebdir.cgi > VMS > 2__runs_and_data
changeset 19:b77d4ace3619
make stats treatment general for any number of cores
author | Nina Engelhardt <nengel@mailbox.tu-berlin.de> |
---|---|
date | Fri, 09 Mar 2012 20:02:39 +0100 |
parents | c946cba3fda0 |
children | 0175af93cc54 |
files | scripts/ucc_and_loop_graph_treatment/column_view.py scripts/ucc_and_loop_graph_treatment/parse_loop_graph.py |
diffstat | 2 files changed, 12 insertions(+), 7 deletions(-) [+] |
line diff
1.1 --- a/scripts/ucc_and_loop_graph_treatment/column_view.py Thu Mar 08 18:52:19 2012 +0100 1.2 +++ b/scripts/ucc_and_loop_graph_treatment/column_view.py Fri Mar 09 20:02:39 2012 +0100 1.3 @@ -29,10 +29,11 @@ 1.4 else: 1.5 raise NameError('Node insufficiently annotated') 1.6 y2 = y1 + graph.node[node]['weight'] 1.7 - if positioning != None and node[0]>7: 1.8 - f='blue' 1.9 - elif node[0]>7: 1.10 - f='red' 1.11 + if node[0]>= 2*graph.node['start']['numcores']: 1.12 + if positioning != None: 1.13 + f='blue' 1.14 + else: 1.15 + f='red' 1.16 else: 1.17 f='gray' 1.18 r = sf.Rect(x1,y1,x2,y2,fill=f) 1.19 @@ -53,7 +54,7 @@ 1.20 y2 = graph.node[node]['Timestamp_end'] - tscstarttime 1.21 else: 1.22 y2 = y1 + graph.node[node]['weight'] 1.23 - if node[0]>7: 1.24 + if node[0]>=2*graph.node['start']['numcores']: 1.25 f='yellow' 1.26 else: 1.27 f='gray'
2.1 --- a/scripts/ucc_and_loop_graph_treatment/parse_loop_graph.py Thu Mar 08 18:52:19 2012 +0100 2.2 +++ b/scripts/ucc_and_loop_graph_treatment/parse_loop_graph.py Fri Mar 09 20:02:39 2012 +0100 2.3 @@ -70,6 +70,7 @@ 2.4 starttimes = {} 2.5 tscstarttimes = {} 2.6 tscendtimes = {} 2.7 + highestcore = 0 2.8 for n in g: 2.9 try: 2.10 if n!="start" and n!="end": 2.11 @@ -101,12 +102,15 @@ 2.12 if g.node[n].has_key('Timestamp_start'): 2.13 if not tscendtimes.has_key(g.node[n]['core']) or tscendtimes[g.node[n]['core']] < g.node[n]['Timestamp_start']: 2.14 tscendtimes[g.node[n]['core']] = g.node[n]['Timestamp_start'] 2.15 + if g.node[n].has_key('core') and g.node[n]['core'] > highestcore: 2.16 + highestcore = g.node[n]['core'] 2.17 except Exception as e: 2.18 print e,n 2.19 g.node['start']['starttimes']=starttimes 2.20 g.node['start']['tscstarttimes']=tscstarttimes 2.21 g.node['start']['tscstarttime']=min(tscstarttimes.values()) 2.22 g.node['start']['tscendtime']=max(tscendtimes.values()) 2.23 + g.node['start']['numcores']=highestcore+1 2.24 2.25 def path_length(graph,path): 2.26 length = 0 2.27 @@ -199,8 +203,8 @@ 2.28 print "(Difference:", dif, "- Relative Error:", 100*float(dif)/float(lend['end']),"%)" 2.29 print g.node['start']['starttimes'] 2.30 print g.node['start']['tscstarttimes'] 2.31 - column_view.save_column_view(g,4,max(actual_time,lend['end']),lend) 2.32 - #column_view.save_tsc_scale(g,4,lend['end']) 2.33 + column_view.save_column_view(g,g.node['start']['numcores'],max(actual_time,lend['end']),lend) 2.34 + #column_view.save_tsc_scale(g,g.node['start']['numcores'],lend['end']) 2.35 return # 2.36 print "Node \tCalculated\t Actual\tCore\tDifference\tNon-cumulative part" 2.37 drf = 0