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

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

added scripts for generating scale experiments figure

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

  • Property mode set to 100755
File size: 1.5 KB
RevLine 
[948e320]1#!/usr/bin/perl
2use Path::Class;
3use File::Basename;
4use autodie;
5use strict;
6use warnings;
7
8#my $civlDir="/Users/zmanchun/civl";
9my $civlDir=".";
10my $numArgs = scalar(@ARGV);
11my $outfile="";
12my $out;
13my $hasCivlDir=0;
14
15if($numArgs > 2){
16 warn "At most ONE argument is needed for this script. Additional arguments will be ignored.\n";
17}
18
19if($numArgs > 0){
20 for(my $i=0; $i < 2; $i++){
21 # print "$ARGV[$i]\n";
22 my $arg=$ARGV[$i];
23
24 if($arg =~ /^\-o(.*)$/){
25 #$outfile=($arg =~ /\-o(\S+)$/);
26 $outfile=$1;
27 # print "outfile is $outfile\n";
28 $out = *STDOUT unless open($out , '>', $outfile );
29 # print "out is $out\n";
30 }else{
31 $civlDir=$arg;
32 $hasCivlDir = 1;
33 }
34 }
35}
36if($hasCivlDir==0){
37 warn "No civl directory is provided, the current directory will be used as the civl directory.\n"
38}
39if(!defined($out)){
40 # print "use stdout.\n";
41 $out=*STDOUT;
42}
43# print "CIVL directory: $civlDir\n";
44# print "output: $out\n";
45
46my $benchPrefix="edu.udel.cis.vsl.civl.bench.scale.";
47my $benchSuffix="BenchmarkScale";
48my @benchmarks=($benchPrefix."Adder".$benchSuffix,
49 $benchPrefix."Barrier".$benchSuffix,
50 $benchPrefix."BlockAdder".$benchSuffix,
51 $benchPrefix."DiningPhilosopher".$benchSuffix,
52 $benchPrefix."MessagePassing".$benchSuffix);
53my $cmdStart="java -classpath $civlDir/civl.jar:$civlDir/bin ";
54
55foreach my $benchmark (@benchmarks){
56 my $result = `$cmdStart $benchmark $civlDir`;
57 print $out $result;
58}
59
60print "Scale benchmarks finished.\n"
61
62
63
Note: See TracBrowser for help on using the repository browser.