From 4ca9441078b3a51cec7272a6600c32eac9a5f4af Mon Sep 17 00:00:00 2001 From: Leon Arber Date: Tue, 5 Jul 2005 14:31:11 -0500 Subject: [svn-r11020] Purpose: Bug fix Description: When plotting, if the minimum number of processors was not 1, gen_report.pl would fail. Solution: The minimum number of processors in the datafile was inadvertantly hard-coded to be 1. Fixed it to dynamically determine the number of processors from the data. Platforms tested: colonelk. Misc. update: --- perform/gen_report.pl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/perform/gen_report.pl b/perform/gen_report.pl index f5c21f3..63d14a0 100755 --- a/perform/gen_report.pl +++ b/perform/gen_report.pl @@ -61,6 +61,7 @@ use IO::Handle; use Getopt::Long; +use List::Util qw[max]; if ($#ARGV == -1) { usage(); @@ -154,8 +155,6 @@ while () { } } - - sub usage { print "Usage: gen_reporl.pl [options] FILE options are:\n @@ -424,11 +423,13 @@ sub plot_default_graph1 { } + sub plot_default_graph2 { open(GNUPLOT_DATA_OUTPUT, ">gnuplot.data") or die "error: cannot open file gnuplot.data: $!\n"; - $num_procs_graph = 1 if !$num_procs_graph; + $num_procs_graph = max(sort { $a <=> $b }( keys %results )); + print "min-rpocs: " . $num_procs_graph; $data_type = "write-only" if !$data_type; #set up the plot @@ -441,7 +442,7 @@ sub plot_default_graph2 { #the next line attempts to hack gnuplot to get around it's inability to linearly scale, but logarithmically label an axis print GNUPLOT_PIPE "set xtics (\"4K\" 4*1024, \"8K\" 8*1024, \"16K\" 16*1024, \"32K\" 32*1024, \"64K\" 64*1024, \"128K\" 128*1024, \"256K\" 256*1024, \"512K\" 512*1024, \"1M\" 1024*1024, \"2M\" 2048*1024, \"4M\" 4096*1024, \"8M\" 8192*1024, \"16M\" 16384*1024)\n"; - foreach $xfer (sort {$a <=> $b} ( keys %{$results{1}} )) + foreach $xfer (sort {$a <=> $b} ( keys %{$results{$num_procs_graph}} )) { print GNUPLOT_DATA_OUTPUT $xfer . "\t"; if($io_type & 1) { -- cgit v0.12