Procházet zdrojové kódy

Print hostname in the graphs

Samuel Thibault před 4 roky
rodič
revize
a7c6ee235c
1 změnil soubory, kde provedl 3 přidání a 1 odebrání
  1. 3 1
      tools/starpu_perfmodel_plot.c

+ 3 - 1
tools/starpu_perfmodel_plot.c

@@ -502,13 +502,15 @@ static void dump_data_file(FILE *data_file, struct _perfmodel_plot_options *opti
 
 static void display_selected_models(FILE *gnuplot_file, struct starpu_perfmodel *model, struct starpu_perfmodel *energy_model, struct _perfmodel_plot_options *options)
 {
+	char hostname[64];
 	char *symbol = replace_char(options->symbol, '_', '-');
 
+	_starpu_gethostname(hostname, sizeof(hostname));
 	fprintf(gnuplot_file, "#!/usr/bin/gnuplot -persist\n");
 	fprintf(gnuplot_file, "\n");
 	fprintf(gnuplot_file, "set term postscript eps enhanced color\n");
 	fprintf(gnuplot_file, "set output \"starpu_%s%s.eps\"\n", options->energy_symbol?"power_":options->gflops?"gflops_":"", options->symbol);
-	fprintf(gnuplot_file, "set title \"Model for codelet %s\"\n", symbol);
+	fprintf(gnuplot_file, "set title \"Model for codelet %s on %s\"\n", symbol, hostname);
 	fprintf(gnuplot_file, "set xlabel \"Total data size\"\n");
 	if (options->energy_symbol)
 		fprintf(gnuplot_file, "set ylabel \"Power (W)\"\n");