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

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

added warning message

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

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