[Swift-commit] r7752 - SwiftApps/swift-galaxy/swift

ketan at ci.uchicago.edu ketan at ci.uchicago.edu
Fri Mar 28 13:10:54 CDT 2014


Author: ketan
Date: 2014-03-28 13:10:53 -0500 (Fri, 28 Mar 2014)
New Revision: 7752

Modified:
   SwiftApps/swift-galaxy/swift/swiftforeach.xml
   SwiftApps/swift-galaxy/swift/swiftforeachlist.sh
   SwiftApps/swift-galaxy/swift/swiftforeachrange.sh
Log:
Option to call Swift/T, not tested yet

Modified: SwiftApps/swift-galaxy/swift/swiftforeach.xml
===================================================================
--- SwiftApps/swift-galaxy/swift/swiftforeach.xml	2014-03-28 03:40:26 UTC (rev 7751)
+++ SwiftApps/swift-galaxy/swift/swiftforeach.xml	2014-03-28 18:10:53 UTC (rev 7752)
@@ -14,6 +14,7 @@
         
     #if $rangeorlist.rl == "rng" 
         swiftforeachrange.sh
+        "${k_or_t}"
         "${site}" 
         "${swiftargs}"
         "${interpret}"
@@ -31,6 +32,7 @@
         #end for
     #elif $rangeorlist.rl == "lst"
         swiftforeachlist.sh
+        "${k_or_t}"
         "${site}"
         "${swiftargs}"
         "${interpret}"
@@ -46,6 +48,7 @@
         #end for
     #else
         swiftforeachtest.sh
+        "${k_or_t}"
         "${site}"
         "${swiftargs}"
         "${interpret}"
@@ -72,6 +75,11 @@
        #end if
      -->
     <inputs>
+        <param name="k_or_t" type="select" display="radio" label="choose target execution engine">
+            <option value="swiftK" selected="true">Swift/K</option>
+            <option value="swiftT" >Swift/T</option>
+        </param>
+
         <param name="site" type="select" multiple="true" label="Execution Location" help="Multi-select list - hold the appropriate key while clicking to select multiple items">
             <option value="localhost" selected="true">Localhost</option>
             <option value="midway">Midway</option>
@@ -80,7 +88,6 @@
             <option value="tukey">Tukey</option>
         </param>
 
-
         <param name="interpret" type="select" label="Execution interpreter">
             <option value="sh">sh</option>
             <option value="python">python</option>

Modified: SwiftApps/swift-galaxy/swift/swiftforeachlist.sh
===================================================================
--- SwiftApps/swift-galaxy/swift/swiftforeachlist.sh	2014-03-28 03:40:26 UTC (rev 7751)
+++ SwiftApps/swift-galaxy/swift/swiftforeachlist.sh	2014-03-28 18:10:53 UTC (rev 7752)
@@ -2,7 +2,8 @@
 
 wdir=$(mktemp -d /tmp/swift-gal.XXXX)
 
-# numeric range
+k_or_t=$1
+shift
 sites=$1 # comma separated list of sites
 shift
 swiftargs=$1 
@@ -105,11 +106,13 @@
 done
 
 touch None # Create a "None" file in case user does not specify any stdin file
+if [ "$k_or_t" = "swiftK"  ] ; then
+    $swift -sites.file $wdir/sites.xml -tc.file $wdir/tc -config $wdir/cf $wdir/script.swift "${swiftargs}" 2>$logfile
+    EXITCODE=$?
+else
+    echo "stc + turbine; not implemented yet" > /tmp/swiftT.txt
+fi
 
-#invoke swift
-$swift -sites.file $wdir/sites.xml -tc.file $wdir/tc -config $wdir/cf $wdir/script.swift "${swiftargs}" 2>$logfile
-EXITCODE=$?
-
 `for i in \`find $outloc -type f\`; do echo "\`basename $i\` $i"; done`
 
 cat << EOF > $outlistfile

Modified: SwiftApps/swift-galaxy/swift/swiftforeachrange.sh
===================================================================
--- SwiftApps/swift-galaxy/swift/swiftforeachrange.sh	2014-03-28 03:40:26 UTC (rev 7751)
+++ SwiftApps/swift-galaxy/swift/swiftforeachrange.sh	2014-03-28 18:10:53 UTC (rev 7752)
@@ -3,7 +3,8 @@
 echo $@ > /tmp/args.txt
 wdir=$(mktemp -d /tmp/swift-gal.XXXX)
 
-# numeric range
+k_or_t=$1
+shift
 sites=$1 # comma separated list of sites
 shift
 swiftargs=$1 
@@ -113,8 +114,12 @@
 done
 
 touch None # Create a "None" file in case user does not specify any stdin file
-$swift -sites.file $wdir/sites.xml -tc.file $wdir/tc -config $wdir/cf $wdir/script.swift "${swiftargs}" 2>$logfile
-EXITCODE=$?
+if [ "$k_or_t" = "swiftK"  ] ; then
+    $swift -sites.file $wdir/sites.xml -tc.file $wdir/tc -config $wdir/cf $wdir/script.swift "${swiftargs}" 2>$logfile
+    EXITCODE=$?
+else
+    echo "stc + turbine; not implemented yet" > /tmp/swiftT.txt
+fi
 
 #`for i in \`find $HOME/swift-sandbox -type f\`; do echo "\`basename $i\` $i"; done`
 #Populate output file




More information about the Swift-commit mailing list