[Swift-commit] r6062 - in SwiftApps/SciColSim/benchmarks: . conf
davidk at ci.uchicago.edu
davidk at ci.uchicago.edu
Mon Nov 19 14:16:26 CST 2012
Author: davidk
Date: 2012-11-19 14:16:26 -0600 (Mon, 19 Nov 2012)
New Revision: 6062
Added:
SwiftApps/SciColSim/benchmarks/conf/raven.cf
SwiftApps/SciColSim/benchmarks/conf/raven.xml
Modified:
SwiftApps/SciColSim/benchmarks/benchmark.sh
SwiftApps/SciColSim/benchmarks/benchmark.swift
SwiftApps/SciColSim/benchmarks/start-benchmark.sh
Log:
Pass start, stop, step, and timeout values from command line
Modified: SwiftApps/SciColSim/benchmarks/benchmark.sh
===================================================================
--- SwiftApps/SciColSim/benchmarks/benchmark.sh 2012-11-19 19:26:06 UTC (rev 6061)
+++ SwiftApps/SciColSim/benchmarks/benchmark.sh 2012-11-19 20:16:26 UTC (rev 6062)
@@ -5,7 +5,7 @@
TIME_OUTPUT=$ORIGDIR/$3
MEM_OUTPUT=$ORIGDIR/$4
-cd $HOME/SciColSim
+cd $6
# Clean any previous run
if [ -f "bestdb.txt" ]; then
Modified: SwiftApps/SciColSim/benchmarks/benchmark.swift
===================================================================
--- SwiftApps/SciColSim/benchmarks/benchmark.swift 2012-11-19 19:26:06 UTC (rev 6061)
+++ SwiftApps/SciColSim/benchmarks/benchmark.swift 2012-11-19 20:16:26 UTC (rev 6062)
@@ -1,9 +1,9 @@
type file;
# Perform a single benchmark
-app (file timef, file memf, file errorf) benchmark (int target_innovation, int tl)
+app (file timef, file memf, file errorf) benchmark (int target_innovation, int tl, string scidir)
{
- benchmark target_innovation tl @filename(timef) @filename(memf) stderr=@errorf;
+ benchmark target_innovation tl @filename(timef) @filename(memf) scidir stderr=@errorf;
}
# Create a plot from an array of result files
@@ -12,15 +12,14 @@
plot @filename(png);
}
-int target_innovation_start=1;
-int target_innovation_stop=12000;
-int step=1000;
-int time_limit=86300;
+int target_innovation_start=@toInt(@arg("start"));
+int target_innovation_stop=@toInt(@arg("stop"));
+int step=@toInt(@arg("step"));
+int time_limit=@toInt(@arg("limit", "86300"));
+string scicoldir=@arg("scicoldir");
# Run benchmark
-#file graphs[] <filesys_mapper; location="graph", pattern="*">;
file graph <"movie-graph.txt">;
-
file timeresults[];
file memresults[];
Added: SwiftApps/SciColSim/benchmarks/conf/raven.cf
===================================================================
--- SwiftApps/SciColSim/benchmarks/conf/raven.cf (rev 0)
+++ SwiftApps/SciColSim/benchmarks/conf/raven.cf 2012-11-19 20:16:26 UTC (rev 6062)
@@ -0,0 +1,10 @@
+wrapperlog.always.transfer=true
+sitedir.keep=true
+execution.retries=5
+lazy.errors=true
+status.mode=provider
+use.provider.staging=false
+provider.staging.pin.swiftfiles=false
+
+#app raven benchmark=$PWD/benchmark.sh
+#app localhost plot=$PWD/plot.sh
Added: SwiftApps/SciColSim/benchmarks/conf/raven.xml
===================================================================
--- SwiftApps/SciColSim/benchmarks/conf/raven.xml (rev 0)
+++ SwiftApps/SciColSim/benchmarks/conf/raven.xml 2012-11-19 20:16:26 UTC (rev 6062)
@@ -0,0 +1,24 @@
+<config>
+
+ <pool handle="raven">
+ <execution provider="pbs" jobmanager="local:pbs"/>
+ <profile namespace="globus" key="project">CI-SES000031</profile>
+ <profile namespace="globus" key="jobsPerNode">1</profile>
+ <profile namespace="globus" key="providerAttributes">pbs.aprun;pbs.mpp;depth=24</profile>
+ <profile namespace="globus" key="maxWallTime">24:00:00</profile>
+ <profile namespace="globus" key="queue">long</profile>
+ <profile namespace="karajan" key="jobThrottle">60.99</profile>
+ <profile namespace="karajan" key="initialScore">10000</profile>
+ <filesystem provider="local"/>
+ <workdirectory>_WORK_</workdirectory>
+ </pool>
+
+ <pool handle="localhost" >
+ <execution provider="local" url="none" />
+ <profile namespace="karajan" key="jobThrottle">0.09</profile>
+ <profile namespace="karajan" key="initialScore">10000</profile>
+ <filesystem provider="local"/>
+ <workdirectory>_WORK_</workdirectory>
+ </pool>
+
+</config>
Modified: SwiftApps/SciColSim/benchmarks/start-benchmark.sh
===================================================================
--- SwiftApps/SciColSim/benchmarks/start-benchmark.sh 2012-11-19 19:26:06 UTC (rev 6061)
+++ SwiftApps/SciColSim/benchmarks/start-benchmark.sh 2012-11-19 20:16:26 UTC (rev 6062)
@@ -1,22 +1,40 @@
#!/bin/bash
+# Report error and exit
+crash()
+{
+ MSG=$1
+ echo ${MSG} >&2
+ exit 1
+}
+
+# Provide usage info
+usage="Usage: $0 -site sitename -start startval -stop stopval -step stepval [-limit limitval]"
+
# Process command line arguments
while [ $# -gt 0 ]; do
case $1 in
- -p) paramfile=$2; shift 2;;
- -s) execsite=$2; shift 2;;
+ -site) execsite=$2; shift 2;;
+ -start) start=$2; shift 2;;
+ -stop) stop=$2; shift 2;;
+ -step) step=$2; shift 2;;
+ -limit) limit=$2; shift 2;;
*) echo $usage 1>&2
exit 1;;
esac
done
+if [ -z "$execsite" ] || [ -z "$start" ] || [ -z "$stop" ] || [ -z "$step" ]; then
+ crash "$usage"
+fi
+
+
# 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
+ crash "$rundir already exists! exiting." >&2
else
mkdir $rundir
fi
@@ -38,4 +56,9 @@
fi
# Run swift
-swift -sites.file sites.xml -tc.file tc.data benchmark.swift
+scicoldir=$PWD/..
+command="swift -sites.file sites.xml -tc.file tc.data benchmark.swift -scicoldir=$scicoldir -start=$start -stop=$stop -step=$step"
+if [ -n "$limit" ]; then
+ command="$command -limit=$limit"
+fi
+$( echo $command )
More information about the Swift-commit
mailing list