[Swift-commit] r6028 - in SwiftApps/SciColSim: . benchmarks benchmarks/conf
davidk at ci.uchicago.edu
davidk at ci.uchicago.edu
Tue Nov 13 13:17:59 CST 2012
Author: davidk
Date: 2012-11-13 13:17:59 -0600 (Tue, 13 Nov 2012)
New Revision: 6028
Added:
SwiftApps/SciColSim/benchmarks/
SwiftApps/SciColSim/benchmarks/benchmark.sh
SwiftApps/SciColSim/benchmarks/benchmark.swift
SwiftApps/SciColSim/benchmarks/conf/
SwiftApps/SciColSim/benchmarks/conf/uc3.cf
SwiftApps/SciColSim/benchmarks/conf/uc3.xml
SwiftApps/SciColSim/benchmarks/plot.gp
SwiftApps/SciColSim/benchmarks/plot.sh
SwiftApps/SciColSim/benchmarks/start-benchmark.sh
Modified:
SwiftApps/SciColSim/trimgraph.sh
Log:
Initial commit of some SciColSim benchmark scripts
Added: SwiftApps/SciColSim/benchmarks/benchmark.sh
===================================================================
--- SwiftApps/SciColSim/benchmarks/benchmark.sh (rev 0)
+++ SwiftApps/SciColSim/benchmarks/benchmark.sh 2012-11-13 19:17:59 UTC (rev 6028)
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+# Create run directory
+cd /home/davidk/SciColSim
+
+# Run testgraph
+echo -n "$1 "
+./testgraph.py $1 |grep time | awk '{print $5}'
Property changes on: SwiftApps/SciColSim/benchmarks/benchmark.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: SwiftApps/SciColSim/benchmarks/benchmark.swift
===================================================================
--- SwiftApps/SciColSim/benchmarks/benchmark.swift (rev 0)
+++ SwiftApps/SciColSim/benchmarks/benchmark.swift 2012-11-13 19:17:59 UTC (rev 6028)
@@ -0,0 +1,32 @@
+type file;
+
+# Perform a single benchmark
+app (file o, file e) benchmark (int target_innovation)
+{
+ benchmark target_innovation stdout=@o stderr=@e;
+}
+
+# Create a plot from an array of result files
+app (file png) plot (file in1[], file gpl)
+{
+ plot @filename(png);
+}
+
+int target_innovation_start=100;
+int target_innovation_stop=1000;
+int step=100;
+
+# Run benchmark
+#file graphs[] <filesys_mapper; location="graph", pattern="*">;
+file graph <"movie-graph.txt">;
+
+file results[];
+foreach ti,tidx in [target_innovation_start:target_innovation_stop:step] {
+ file out <single_file_mapper; file=@strcat("results/benchmark-", ti, ".out")>;
+ file error <single_file_mapper; file=@strcat("errors/errors-", ti, ".err")>;
+ (out, error) = benchmark(ti);
+ results[tidx] = out;
+}
+file png <"results/plot.png">;
+file gp <"plot.gp">;
+png = plot(results, gp);
Added: SwiftApps/SciColSim/benchmarks/conf/uc3.cf
===================================================================
--- SwiftApps/SciColSim/benchmarks/conf/uc3.cf (rev 0)
+++ SwiftApps/SciColSim/benchmarks/conf/uc3.cf 2012-11-13 19:17:59 UTC (rev 6028)
@@ -0,0 +1,10 @@
+wrapperlog.always.transfer=false
+sitedir.keep=false
+execution.retries=0
+lazy.errors=true
+status.mode=provider
+use.provider.staging=false
+provider.staging.pin.swiftfiles=false
+
+#app uc3 benchmark=$PWD/benchmark.sh
+#app localhost plot=$PWD/plot.sh
Added: SwiftApps/SciColSim/benchmarks/conf/uc3.xml
===================================================================
--- SwiftApps/SciColSim/benchmarks/conf/uc3.xml (rev 0)
+++ SwiftApps/SciColSim/benchmarks/conf/uc3.xml 2012-11-13 19:17:59 UTC (rev 6028)
@@ -0,0 +1,20 @@
+<config>
+
+ <pool handle="uc3">
+ <execution jobmanager="local:condor" provider="coaster" url="none"/>
+ <filesystem provider="local" url="none" />
+ <workdirectory>_WORK_</workdirectory>
+ <profile key="nodeGranularity" namespace="globus">1</profile>
+ <profile key="jobsPerNode" namespace="globus">1</profile>
+ <profile namespace="karajan" key="jobThrottle">1000</profile>
+ <profile namespace="karajan" key="initialScore">10000</profile>
+ </pool>
+
+ <pool handle="localhost">
+ <filesystem provider="local" />
+ <execution provider="local" />
+ <workdirectory>_WORK_</workdirectory>
+ <profile namespace="karajan" key="jobThrottle">0</profile>
+ </pool>
+
+</config>
Added: SwiftApps/SciColSim/benchmarks/plot.gp
===================================================================
--- SwiftApps/SciColSim/benchmarks/plot.gp (rev 0)
+++ SwiftApps/SciColSim/benchmarks/plot.gp 2012-11-13 19:17:59 UTC (rev 6028)
@@ -0,0 +1,9 @@
+set terminal png enhanced size 1000,1000
+#set style line 1 linecolor rgb "blue"
+set output "`echo $PLOT_OUTPUT`"
+set nokey
+set xlabel "Target Innovation"
+set ylabel "Time in Seconds"
+set title "`basename $PLOT_OUTPUT .png`"
+plot "results.txt" using 1:2 with line
+
Added: SwiftApps/SciColSim/benchmarks/plot.sh
===================================================================
--- SwiftApps/SciColSim/benchmarks/plot.sh (rev 0)
+++ SwiftApps/SciColSim/benchmarks/plot.sh 2012-11-13 19:17:59 UTC (rev 6028)
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+export PLOT_OUTPUT=$1
+export PLOT_TITLE=$( basename $( dirname $1 ))
+find . -name *.out -exec cat {} \; | sort -n > results.txt
+gnuplot plot.gp
Property changes on: SwiftApps/SciColSim/benchmarks/plot.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: SwiftApps/SciColSim/benchmarks/start-benchmark.sh
===================================================================
--- SwiftApps/SciColSim/benchmarks/start-benchmark.sh (rev 0)
+++ SwiftApps/SciColSim/benchmarks/start-benchmark.sh 2012-11-13 19:17:59 UTC (rev 6028)
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+# Process command line arguments
+while [ $# -gt 0 ]; do
+ case $1 in
+ -p) paramfile=$2; shift 2;;
+ -s) execsite=$2; shift 2;;
+ *) echo $usage 1>&2
+ exit 1;;
+ esac
+done
+
+# Create run directory
+rundir=$( echo run??? | sed -e 's/^.*run//' | awk '{ printf("run%03d\n", $1+1)}' )
+
+if [ -d $rundir ];
+then
+ echo "$rundir already exists! exiting." >&2
+ exit 2
+else
+ mkdir $rundir
+fi
+
+cd $rundir
+
+# Copy needed files
+cp ../benchmark.swift .
+cp ../benchmark.sh .
+cp ../../movie_graph.txt .
+cp ../plot.sh .
+cp ../plot.gp .
+
+# Run gensites
+export WORK=$PWD/swiftwork
+if [ ! "$USE_SCS" == 1 ]; then
+ cp ../conf/$execsite.cf cf
+ SWIFT_HOME=../../swift/bin ../../swift/bin/gensites -p ../conf/$execsite.cf ../conf/$execsite.xml > sites.xml
+fi
+
+# Run swift
+swift -sites.file sites.xml -tc.file tc.data benchmark.swift
Property changes on: SwiftApps/SciColSim/benchmarks/start-benchmark.sh
___________________________________________________________________
Added: svn:executable
+ *
Modified: SwiftApps/SciColSim/trimgraph.sh
===================================================================
--- SwiftApps/SciColSim/trimgraph.sh 2012-11-11 20:39:24 UTC (rev 6027)
+++ SwiftApps/SciColSim/trimgraph.sh 2012-11-13 19:17:59 UTC (rev 6028)
@@ -9,7 +9,7 @@
NR == 1 { }
(NR > 1) && ($1 < n) && ($2 < n) && (rand() < fraction) { print $1, $2 }
-' n=$vertices fraction=$fraction <graph.big >$tmp
+' n=$vertices fraction=$fraction < big_graph.v01.txt >$tmp
edges=$(wc -l <$tmp)
More information about the Swift-commit
mailing list