[Swift-commit] r6854 - in SwiftTutorials/CIC_2013-08-09: . app bin
wilde at ci.uchicago.edu
wilde at ci.uchicago.edu
Thu Aug 15 11:00:37 CDT 2013
Author: wilde
Date: 2013-08-15 11:00:37 -0500 (Thu, 15 Aug 2013)
New Revision: 6854
Added:
SwiftTutorials/CIC_2013-08-09/app/
SwiftTutorials/CIC_2013-08-09/app/simulate.sh
SwiftTutorials/CIC_2013-08-09/app/stats.sh
SwiftTutorials/CIC_2013-08-09/bin/
SwiftTutorials/CIC_2013-08-09/bin/cleanup
SwiftTutorials/CIC_2013-08-09/bin/hosts
Log:
for cic
Copied: SwiftTutorials/CIC_2013-08-09/app/simulate.sh (from rev 6845, SwiftTutorials/CIC_2013-08-09/simulate.sh)
===================================================================
--- SwiftTutorials/CIC_2013-08-09/app/simulate.sh (rev 0)
+++ SwiftTutorials/CIC_2013-08-09/app/simulate.sh 2013-08-15 16:00:37 UTC (rev 6854)
@@ -0,0 +1,24 @@
+#! /bin/bash
+
+runtime=${1:-0}
+range=${2:-100}
+biasfile=${3:-nobias}
+scale=${4:-1}
+n=${5:-1}
+
+if [ $biasfile = nobias ]; then
+ offset=0
+else
+ read offset <$biasfile
+fi
+
+# run for some number of "timesteps"
+
+sleep $runtime
+
+# emit n "simulation results", scaled and biased by the specified argument values
+
+for ((i=0;i<n;i++)); do
+ value=$(((($RANDOM)*32768)+$RANDOM))
+ echo $(( ($value%range)*scale+offset))
+done
Copied: SwiftTutorials/CIC_2013-08-09/app/stats.sh (from rev 6845, SwiftTutorials/CIC_2013-08-09/stats.sh)
===================================================================
--- SwiftTutorials/CIC_2013-08-09/app/stats.sh (rev 0)
+++ SwiftTutorials/CIC_2013-08-09/app/stats.sh 2013-08-15 16:00:37 UTC (rev 6854)
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+awk '
+
+{ sum += $1}
+
+END { print sum/NR }
+' $*
+
Added: SwiftTutorials/CIC_2013-08-09/bin/cleanup
===================================================================
--- SwiftTutorials/CIC_2013-08-09/bin/cleanup (rev 0)
+++ SwiftTutorials/CIC_2013-08-09/bin/cleanup 2013-08-15 16:00:37 UTC (rev 6854)
@@ -0,0 +1,2 @@
+rm -rf *.log *.rlog *.d *.kml *.swiftx *.out output outdir logs hi.* _concurrent swiftwork
+
Property changes on: SwiftTutorials/CIC_2013-08-09/bin/cleanup
___________________________________________________________________
Added: svn:executable
+ *
Added: SwiftTutorials/CIC_2013-08-09/bin/hosts
===================================================================
--- SwiftTutorials/CIC_2013-08-09/bin/hosts (rev 0)
+++ SwiftTutorials/CIC_2013-08-09/bin/hosts 2013-08-15 16:00:37 UTC (rev 6854)
@@ -0,0 +1 @@
+for h in $(cat hosts.txt); do ssh $h hostname -f; done
Property changes on: SwiftTutorials/CIC_2013-08-09/bin/hosts
___________________________________________________________________
Added: svn:executable
+ *
More information about the Swift-commit
mailing list