@@ -114,7 +114,7 @@ def parse_data(indir, outdir, files):
114114 """
115115 # metrics here will be figures of merit, and seconds runtime
116116 p = ps .ResultParser ("amg2023" )
117-
117+
118118 # For flux we can save jobspecs and other event data
119119 data = {}
120120
@@ -170,14 +170,24 @@ def parse_data(indir, outdir, files):
170170
171171 # If this is a flux run, we have a jobspec and events here
172172 if "JOBSPEC" in item :
173- item , _ , metadata = ps .parse_flux_metadata (item )
173+ item , duration , metadata = ps .parse_flux_metadata (item )
174174 data [exp .prefix ].append (metadata )
175175
176+ elif "on-premises" in filename :
177+ # Get the runtime from the err file
178+ err_file = ps .read_file (result .replace (".out" , ".err" ))
179+ duration = float (
180+ [x for x in err_file .split ("\n " ) if "real" in x ][0 ].split (" " )[- 1 ]
181+ )
182+ else :
183+ duration = ps .parse_slurm_duration (item )
184+
176185 # Parse the FOM from the item - I see three.
177186 # This needs to throw an error if we can't find it - indicates the result file is wonky
178187 # Figure of Merit (FOM): nnz_AP / (Setup Phase Time + 3 * Solve Phase Time) 1.148604e+09
179188 fom_overall = get_fom_line (item , "Figure of Merit (FOM)" )
180189 p .add_result ("fom_overall" , fom_overall )
190+ p .add_result ("duration" , duration )
181191
182192 print ("Done parsing amg2023 results!" )
183193
@@ -197,6 +207,8 @@ def plot_results(df, outdir, non_anon=False, log=True):
197207 if not os .path .exists (img_outdir ):
198208 os .makedirs (img_outdir )
199209
210+ ps .print_experiment_cost (df , outdir )
211+
200212 # For anonymization
201213 if not non_anon :
202214 df ["experiment" ] = df ["experiment" ].str .replace (
@@ -240,7 +252,7 @@ def plot_results(df, outdir, non_anon=False, log=True):
240252 x = "nodes" ,
241253 y = "value" ,
242254 hue = "experiment" ,
243- err_kws = {' color' : ' darkred' },
255+ err_kws = {" color" : " darkred" },
244256 hue_order = [
245257 "google/gke/cpu" ,
246258 "google/compute-engine/cpu" ,
@@ -269,7 +281,7 @@ def plot_results(df, outdir, non_anon=False, log=True):
269281 ax = axes [1 ],
270282 x = "gpu_count" ,
271283 y = "value" ,
272- err_kws = {' color' : ' darkred' },
284+ err_kws = {" color" : " darkred" },
273285 hue = "experiment" ,
274286 hue_order = [
275287 "google/compute-engine/gpu" ,
@@ -308,5 +320,6 @@ def plot_results(df, outdir, non_anon=False, log=True):
308320 print (f'Total number of CPU datum: { data_frames ["cpu" ].shape [0 ]} ' )
309321 print (f'Total number of GPU datum: { data_frames ["gpu" ].shape [0 ]} ' )
310322
323+
311324if __name__ == "__main__" :
312325 main ()
0 commit comments