@@ -183,12 +183,13 @@ def add_hpcg_result(p, indir, filename, ebpf=None, gpu=False, metrics=None):
183183 others [key ] = values
184184
185185 # If we have fom and duration, calculate cost per unit of fom.
186- if "fom" in metrics :
187- durations = [float (x .rsplit ("=" , 1 )[- 1 ]) for x in lines if "Benchmark Time Summary::Total" in x ]
188- # Convert units of seconds to hours to be in same time unit as cost
189- fraction_of_hour = [x / 3600 for x in durations ]
190- total_costs = [ps .cost_lookup [instance ]* cost for i ,cost in enumerate (fraction_of_hour )]
191- others ['fom_per_dollar' ] = [fom_value / total_costs [i ] for i ,fom_value in enumerate (others ['fom' ])]
186+ # if "fom" in metrics:
187+ # durations = [float(x.rsplit("=", 1)[-1]) for x in lines if "Benchmark Time Summary::Total" in x]
188+ # # Convert units of seconds to hours to be in same time unit as cost
189+ # fraction_of_hour = [x/3600 for x in durations]
190+ # total_costs = [ps.cost_lookup[instance]*cost for i,cost in enumerate(fraction_of_hour)]
191+ # # This should be fom per CORE per dollar
192+ # others['fom_per_dollar'] = [fom_value/ps.core_lookup[instance]/total_costs[i] for i,fom_value in enumerate(others['fom'])]
192193
193194 for key , values in others .items ():
194195 # The ordering is consistent between lists
@@ -315,6 +316,7 @@ def parse_metrics(indir, outdir, files):
315316 if metric == "total_cg_iterations" :
316317 total_cg_iterations = p .df
317318 p .df .to_csv (os .path .join (data_outdir , "csv" , f"hpcg_{ metric } .csv" ))
319+
318320 # Parse the "science per unit cost" and remove from fom df
319321 if metric == "fom" :
320322 cost_df = p .df .copy ()
@@ -360,6 +362,8 @@ def parse_metrics(indir, outdir, files):
360362 df .loc [row .problem_size , row .env ] = value
361363 idx += 1
362364
365+ print (f"Metric { metric } has { p .df .shape [0 ]} datums." )
366+ p .df .to_csv (os .path .join (data_outdir , "csv" , f"hpcg_{ metric } _normalized.csv" ))
363367 fig = plt .figure (figsize = (24 , 24 ))
364368 axes = []
365369 gs = plt .GridSpec (1 , 2 , width_ratios = [7 , 0 ])
0 commit comments