source: CIVL/scripts/scale/run.pl@ bfbc5f3

1.23 2.0 main test-branch
Last change on this file since bfbc5f3 was 2138309, checked in by Manchun Zheng <zmanchun@…>, 11 years ago

minor correction of scripts; added run.pl to run benchmarks and draw the figure at a time.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@2439 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100755
File size: 970 bytes
Line 
1#!/usr/bin/perl
2
3my $civlDir="."; # directory to civl
4my $numArgs = scalar(@ARGV);
5my $out = "scale.pdf";
6my $benchOut = "bench.scale.out";
7
8for(my $i=0; $i < $numArgs; $i++){
9 my $arg = $ARGV[$i];
10
11 if($arg =~ /^\-d(.*)$/){
12 $civlDir=$1;
13 }elsif ($arg =~ /^\-o(.*)$/){
14 $out = $1;
15 if(!($out =~ /\.pdf$/)){
16 warn "$out is not a pdf file name, $out.pdf will be used for output file instead.\n";
17 $out="$out.pdf";
18 }
19 }else{
20 warn "Arguments should start with -d or -o, invalid argument $arg would be ignored.\n";
21 }
22}
23
24my $scriptPrefix="$civlDir/scripts/scale";
25
26print "running scale benchmarks...\n";
27my $cmd = `$scriptPrefix/runBenchScale.pl $civlDir -o$benchOut`;
28print "scale benchmarks finished, now generating .dat file...\n";
29$cmd = `$scriptPrefix/parseScale.pl $benchOut`;
30print ".dat file finished, now generating figure...\n";
31$cmd = `gnuplot $scriptPrefix/plotScale`;
32print "scaling figure is successfully generated in $out\n";
33
Note: See TracBrowser for help on using the repository browser.