[Swift-commit] r6857 - SwiftTutorials/CIC_2013-08-09/cloud
wilde at ci.uchicago.edu
wilde at ci.uchicago.edu
Thu Aug 15 11:14:05 CDT 2013
Author: wilde
Date: 2013-08-15 11:14:05 -0500 (Thu, 15 Aug 2013)
New Revision: 6857
Added:
SwiftTutorials/CIC_2013-08-09/cloud/apps
SwiftTutorials/CIC_2013-08-09/cloud/sitecount.sh
SwiftTutorials/CIC_2013-08-09/cloud/startcloud
SwiftTutorials/CIC_2013-08-09/cloud/stopcloud
Removed:
SwiftTutorials/CIC_2013-08-09/cloud/catsn.swift
SwiftTutorials/CIC_2013-08-09/cloud/setup
SwiftTutorials/CIC_2013-08-09/cloud/tc
Modified:
SwiftTutorials/CIC_2013-08-09/cloud/dynamic_bias.dat
SwiftTutorials/CIC_2013-08-09/cloud/hosts.txt
SwiftTutorials/CIC_2013-08-09/cloud/p8.swift
SwiftTutorials/CIC_2013-08-09/cloud/p9.swift
SwiftTutorials/CIC_2013-08-09/cloud/sites.xml
SwiftTutorials/CIC_2013-08-09/cloud/tc.data
Log:
for cic
Added: SwiftTutorials/CIC_2013-08-09/cloud/apps
===================================================================
--- SwiftTutorials/CIC_2013-08-09/cloud/apps (rev 0)
+++ SwiftTutorials/CIC_2013-08-09/cloud/apps 2013-08-15 16:14:05 UTC (rev 6857)
@@ -0,0 +1,9 @@
+persistent-coasters echo echo
+persistent-coasters sh /bin/bash
+localhost local_sh /bin/bash
+persistent-coasters cat cat
+persistent-coasters random /root/cloud/bin/random.sh
+persistent-coasters average /root/cloud/bin/avg.sh
+persistent-coasters randpl /root/cloud/bin/random.pl
+persistent-coasters calcpi /root/cloud/bin/pi.sh
+
Deleted: SwiftTutorials/CIC_2013-08-09/cloud/catsn.swift
===================================================================
--- SwiftTutorials/CIC_2013-08-09/cloud/catsn.swift 2013-08-15 16:13:49 UTC (rev 6856)
+++ SwiftTutorials/CIC_2013-08-09/cloud/catsn.swift 2013-08-15 16:14:05 UTC (rev 6857)
@@ -1,26 +0,0 @@
-type file;
-
-// app declaration
-app (file o) cat (file i){
- cat @i stdout=@o;
-}
-
-// input data
-file data<"data.txt">;
-
-/*
-* output data mapped to files with
-* prefix f and suffix .out in the outdir
-* directory
-*/
-
-file out[]<simple_mapper; location="outdir", prefix="f.",suffix=".out">;
-
-/*
-* @arg means n could be specified as commandline argument
-* foreach loop executes 1 to n calls of cat in parallel
-*/
-foreach j in [1:@toInt(@arg("n","1"))] {
- out[j] = cat(data);
-}
-
Modified: SwiftTutorials/CIC_2013-08-09/cloud/dynamic_bias.dat
===================================================================
--- SwiftTutorials/CIC_2013-08-09/cloud/dynamic_bias.dat 2013-08-15 16:13:49 UTC (rev 6856)
+++ SwiftTutorials/CIC_2013-08-09/cloud/dynamic_bias.dat 2013-08-15 16:14:05 UTC (rev 6857)
@@ -1 +1 @@
-201
+821
Modified: SwiftTutorials/CIC_2013-08-09/cloud/hosts.txt
===================================================================
--- SwiftTutorials/CIC_2013-08-09/cloud/hosts.txt 2013-08-15 16:13:49 UTC (rev 6856)
+++ SwiftTutorials/CIC_2013-08-09/cloud/hosts.txt 2013-08-15 16:14:05 UTC (rev 6857)
@@ -1,3 +1,3 @@
-54.212.170.216
+54.212.81.224
54.244.171.51
-54.212.140.138
+54.212.37.161
Modified: SwiftTutorials/CIC_2013-08-09/cloud/p8.swift
===================================================================
--- SwiftTutorials/CIC_2013-08-09/cloud/p8.swift 2013-08-15 16:13:49 UTC (rev 6856)
+++ SwiftTutorials/CIC_2013-08-09/cloud/p8.swift 2013-08-15 16:14:05 UTC (rev 6857)
@@ -14,7 +14,7 @@
app (file out) analyze (file script, file s[])
{
- sh @script @filenames(s) stdout=@filename(out);
+ local_sh @script @filenames(s) stdout=@filename(out);
}
# Command line params to this script:
Modified: SwiftTutorials/CIC_2013-08-09/cloud/p9.swift
===================================================================
--- SwiftTutorials/CIC_2013-08-09/cloud/p9.swift 2013-08-15 16:13:49 UTC (rev 6856)
+++ SwiftTutorials/CIC_2013-08-09/cloud/p9.swift 2013-08-15 16:14:05 UTC (rev 6857)
@@ -9,7 +9,7 @@
app (file out) genrand (file script, int timesteps, int sim_range)
{
- sh @filename(script) timesteps sim_range stdout=@filename(out);
+ local_sh @filename(script) timesteps sim_range stdout=@filename(out);
}
app (file out) simulation (file script, int timesteps, int sim_range, file bias_file, int scale, int sim_count)
@@ -19,7 +19,7 @@
app (file out) analyze (file script, file s[])
{
- sh @script @filenames(s) stdout=@filename(out);
+ local_sh @script @filenames(s) stdout=@filename(out);
}
# Command line params to this script:
Deleted: SwiftTutorials/CIC_2013-08-09/cloud/setup
===================================================================
--- SwiftTutorials/CIC_2013-08-09/cloud/setup 2013-08-15 16:13:49 UTC (rev 6856)
+++ SwiftTutorials/CIC_2013-08-09/cloud/setup 2013-08-15 16:14:05 UTC (rev 6857)
@@ -1,30 +0,0 @@
-#!/bin/bash
-
-#pick 3 random hosts from pool
-sort -R pool.txt |head -n 3 > hosts.txt
-
-while read line
-do
- count=$(cat ~/.ssh/config | grep $line | wc -l)
-
- if [ $count -eq 0 ]
- then
- echo -ne "Host $line \n IdentityFile ~/.ssh/tutorial.pem \n User root \n" >> ~/.ssh/config
- fi
-done < hosts.txt
-
-count=$(cat ~/.ssh/config | grep StrictHostKeyChecking | wc -l)
-
-if [ $count -eq 0 ]
-then
- echo -ne "\n Host * \n StrictHostKeyChecking=no \n" >> ~/.ssh/config
-fi
-
-export WORKER_HOSTS=`cat hosts.txt`
-chmod 0600 ~/.ssh/tutorial.pem
-
-eval $(ssh-agent)
-ssh-add ~/.ssh/tutorial.pem
-
-start-coaster-service
-
Added: SwiftTutorials/CIC_2013-08-09/cloud/sitecount.sh
===================================================================
--- SwiftTutorials/CIC_2013-08-09/cloud/sitecount.sh (rev 0)
+++ SwiftTutorials/CIC_2013-08-09/cloud/sitecount.sh 2013-08-15 16:14:05 UTC (rev 6857)
@@ -0,0 +1 @@
+grep "submitting" cps*.log | awk '{print $5}' | sed -e 's/:.*//' | sort | uniq -c
Property changes on: SwiftTutorials/CIC_2013-08-09/cloud/sitecount.sh
___________________________________________________________________
Added: svn:executable
+ *
Modified: SwiftTutorials/CIC_2013-08-09/cloud/sites.xml
===================================================================
--- SwiftTutorials/CIC_2013-08-09/cloud/sites.xml 2013-08-15 16:13:49 UTC (rev 6856)
+++ SwiftTutorials/CIC_2013-08-09/cloud/sites.xml 2013-08-15 16:14:05 UTC (rev 6857)
@@ -1,7 +1,7 @@
<config>
<pool handle="persistent-coasters">
<execution provider="coaster-persistent"
- url="http://localhost:43261"
+ url="http://localhost:55592"
jobmanager="local:local"/>
<profile namespace="globus" key="workerManager">passive</profile>
<profile namespace="globus" key="jobsPerNode">8</profile>
@@ -10,4 +10,10 @@
<filesystem provider="local" url="none" />
<workdirectory>/tmp/ketan</workdirectory>
</pool>
+ <pool handle="localhost">
+ <execution provider="coaster" jobmanager="local:local" url="http://localhost"/>
+ <profile key="jobThrottle" namespace="karajan">.23</profile>
+ <profile namespace="karajan" key="initialScore">10000</profile>
+ <workdirectory>/home/wilde/swift/demo/CIC.2013.0815/svn/cloud/swiftwork</workdirectory>
+ </pool>
</config>
Copied: SwiftTutorials/CIC_2013-08-09/cloud/startcloud (from rev 6845, SwiftTutorials/CIC_2013-08-09/cloud/setup)
===================================================================
--- SwiftTutorials/CIC_2013-08-09/cloud/startcloud (rev 0)
+++ SwiftTutorials/CIC_2013-08-09/cloud/startcloud 2013-08-15 16:14:05 UTC (rev 6857)
@@ -0,0 +1,67 @@
+#!/bin/bash
+
+if [ ${BASH_VERSINFO[0]} -gt 2 -a "${BASH_SOURCE[0]}" = "${0}" ] ; then
+ echo ERROR: script ${BASH_SOURCE[0]} must be executed as: source ${BASH_SOURCE[0]}
+ exit 1
+fi
+
+addlocalpool()
+{
+cat <<END
+ <pool handle="localhost">
+ <execution provider="coaster" jobmanager="local:local" url="http://localhost"/>
+ <profile key="jobThrottle" namespace="karajan">.23</profile>
+ <profile namespace="karajan" key="initialScore">10000</profile>
+ <workdirectory>$PWD/swiftwork</workdirectory>
+ </pool>
+END
+}
+
+echo -e "\nSwift cloud setup\n"
+
+#pick 3 random hosts from pool
+# sort -R pool.txt |head -n 3 > hosts.txt
+
+head -n 3 pool.txt > hosts.txt # FIXME: disabled for now because sort -R is not univerally available
+
+echo "Enabling cloud host access in $HOME/.ssh/config"
+touch ~/.ssh/config
+chmod 600 ~/.ssh/config
+
+while read line
+do
+ count=$(grep $line ~/.ssh/config | wc -l)
+ if [ $count -eq 0 ]
+ then
+ echo -ne "Host $line \n IdentityFile ~/.ssh/tutorial.pem \n User root \n" >> ~/.ssh/config
+ fi
+done < hosts.txt
+
+count=$(grep StrictHostKeyChecking ~/.ssh/config | wc -l)
+if [ $count -eq 0 ]
+then
+ echo -ne "\n Host * \n StrictHostKeyChecking=no \n" >> ~/.ssh/config
+fi
+
+export WORKER_HOSTS=`cat hosts.txt`
+chmod 0600 ~/.ssh/tutorial.pem
+
+echo "Starting ssh-agent"
+eval $(ssh-agent)
+ssh-add ~/.ssh/tutorial.pem
+
+echo "Starting Swift coaster service"
+start-coaster-service
+
+mv sites.xml cloud.xml
+grep -v config cloud.xml | (
+ echo "<config>"
+ cat
+ addlocalpool
+ echo "</config>"
+) >sites.xml
+
+echo "Swift cloud setup complete"
+rm -rf hi.* hi-*
+
+
Added: SwiftTutorials/CIC_2013-08-09/cloud/stopcloud
===================================================================
--- SwiftTutorials/CIC_2013-08-09/cloud/stopcloud (rev 0)
+++ SwiftTutorials/CIC_2013-08-09/cloud/stopcloud 2013-08-15 16:14:05 UTC (rev 6857)
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+echo "stopping coaster service"
+stop-coaster-service
+
+echo "Killing ssh-agent"
+killall -u $USER ssh-agent
+
Property changes on: SwiftTutorials/CIC_2013-08-09/cloud/stopcloud
___________________________________________________________________
Added: svn:executable
+ *
Deleted: SwiftTutorials/CIC_2013-08-09/cloud/tc
===================================================================
--- SwiftTutorials/CIC_2013-08-09/cloud/tc 2013-08-15 16:13:49 UTC (rev 6856)
+++ SwiftTutorials/CIC_2013-08-09/cloud/tc 2013-08-15 16:14:05 UTC (rev 6857)
@@ -1,8 +0,0 @@
-persistent-coasters echo echo
-persistent-coasters sh /bin/bash
-persistent-coasters cat cat
-persistent-coasters random /root/cloud/bin/random.sh
-persistent-coasters average /root/cloud/bin/avg.sh
-persistent-coasters randpl /root/cloud/bin/random.pl
-persistent-coasters calcpi /root/cloud/bin/pi.sh
-
Modified: SwiftTutorials/CIC_2013-08-09/cloud/tc.data
===================================================================
--- SwiftTutorials/CIC_2013-08-09/cloud/tc.data 2013-08-15 16:13:49 UTC (rev 6856)
+++ SwiftTutorials/CIC_2013-08-09/cloud/tc.data 2013-08-15 16:14:05 UTC (rev 6857)
@@ -91,3 +91,21 @@
persistent-coasters cat /bin/cat null null null
persistent-coasters bash /bin/bash null null null
persistent-coasters echo /bin/echo null null null
+persistent-coasters cat /bin/cat null null null
+persistent-coasters bash /bin/bash null null null
+persistent-coasters echo /bin/echo null null null
+persistent-coasters cat /bin/cat null null null
+persistent-coasters bash /bin/bash null null null
+persistent-coasters echo /bin/echo null null null
+persistent-coasters cat /bin/cat null null null
+persistent-coasters bash /bin/bash null null null
+persistent-coasters echo /bin/echo null null null
+persistent-coasters cat /bin/cat null null null
+persistent-coasters bash /bin/bash null null null
+persistent-coasters echo /bin/echo null null null
+persistent-coasters cat /bin/cat null null null
+persistent-coasters bash /bin/bash null null null
+persistent-coasters echo /bin/echo null null null
+persistent-coasters cat /bin/cat null null null
+persistent-coasters bash /bin/bash null null null
+persistent-coasters echo /bin/echo null null null
More information about the Swift-commit
mailing list