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

ketan at ci.uchicago.edu ketan at ci.uchicago.edu
Mon Feb 3 18:06:36 CST 2014


Author: ketan
Date: 2014-02-03 18:06:36 -0600 (Mon, 03 Feb 2014)
New Revision: 7555

Modified:
   SwiftApps/swift-galaxy/swift/swiftforeachlist.sh
   SwiftApps/swift-galaxy/swift/swiftforeachlist.xml
Log:
compaction and cleanup

Modified: SwiftApps/swift-galaxy/swift/swiftforeachlist.sh
===================================================================
--- SwiftApps/swift-galaxy/swift/swiftforeachlist.sh	2014-02-03 23:40:55 UTC (rev 7554)
+++ SwiftApps/swift-galaxy/swift/swiftforeachlist.sh	2014-02-04 00:06:36 UTC (rev 7555)
@@ -4,6 +4,8 @@
 # numeric range
 site=$1
 shift
+interpreter=$1
+shift
 executable=$1
 shift
 listfile=$1
@@ -34,7 +36,7 @@
 type file;
 
 app (file _out, file _err) anapp(file _exec, int _i, string _args[]){
-    sh @_exec _i _args stdout=@_out stderr=@_err;
+    $interpreter @_exec _i _args stdout=@_out stderr=@_err;
 }
 $arrayexpr
 
@@ -63,18 +65,7 @@
 EOF
 
 cat << EOF > /tmp/tc
-localhost sh /bin/sh
-localhost echo echo
-localhost cat cat
-stampede sh /bin/sh
-stampede echo echo
-stampede cat cat
-uc3 sh /bin/sh
-uc3 echo  /bin/echo
-uc3 cat   cat
-midway echo  echo
-midway sh /bin/sh
-midway cat   cat
+$site $interpreter $interpreter
 EOF
 
 $swift -sites.file /tmp/sites.xml -tc.file /tmp/tc -config /tmp/cf /tmp/script.swift 2>$logfile
@@ -89,3 +80,5 @@
        cat $logfile >&2
 fi
 exit $EXITCODE
+
+#dum ditty dum ditty dum dum dum

Modified: SwiftApps/swift-galaxy/swift/swiftforeachlist.xml
===================================================================
--- SwiftApps/swift-galaxy/swift/swiftforeachlist.xml	2014-02-03 23:40:55 UTC (rev 7554)
+++ SwiftApps/swift-galaxy/swift/swiftforeachlist.xml	2014-02-04 00:06:36 UTC (rev 7555)
@@ -1,66 +1,75 @@
 <tool id="swiftforeachlist" name="listforeach">
-  <description>A tool to run executable over an itemlist via Swift foreach parallel construct</description>
-  
-  <command interpreter="bash">
+    <description>A tool to run executable over an itemlist via Swift foreach parallel construct</description>
+
+    <command interpreter="bash">
         swiftforeachlist.sh
-            $site 
-            $executable
-            $listfile
-            $outloc
-            $log_file
-            $outlist
-            #for $a in $arg
-              ${a.argname}
-            #end for
-  </command>
+        $site 
+        $executable
+        $interpreter
+        $listfile
+        $outloc
+        $log_file
+        $outlist
+        #for $a in $arg
+        ${a.argname}
+        #end for
+    </command>
 
-  <inputs>
-    <param name="site" type="select" label="Execution Location">
-       <option value="localhost">Localhost</option>
-       <option value="midway">Midway</option>
-       <option value="uc3">UC3</option>
-       <option value="stampede">Stampede</option>
-   </param>
+    <inputs>
+        <param name="site" type="select" label="Execution Location">
+            <option value="localhost">Localhost</option>
+            <option value="midway">Midway</option>
+            <option value="uc3">UC3</option>
+            <option value="stampede">Stampede</option>
+        </param>
 
-    <param format="sh" name="executable" type="data" label="Executable"/>
-    <param format="data" name="listfile" type="data" label="List file"/>
-    <repeat name="arg" title="arg">
-       <param name="argname" type="text" label="arg" />
-    </repeat>
+        <param name="interpreter" type="select" label="Execution interpreter">
+            <option value="sh">sh</option>
+            <option value="python">python</option>
+            <option value="java">java</option>
+            <option value="R">R</option>
+            <option value="matlab">matlab</option>
+        </param>
 
-    <param name="outloc" size="50" type="text" value="$HOME/swift-sandbox" label="location for output files" help="Swift will write output files here on disc">
-        <sanitizer sanitize="False"/>
-    </param>
-    
-    <conditional name="configuration">
-        <param name="mode" type="select" label="Swift configuration">
-          <option value="default">default configuration</option>
-          <option value="advanced">advanced configuration</option>
-       </param>
+        <param format="sh, binexec" name="executable" type="data" label="Executable"/>
+        <param format="data" name="listfile" type="data" label="List file"/>
+        <repeat name="arg" title="arg">
+            <param name="argname" type="text" label="arg" />
+        </repeat>
 
-        <when value="default">
-        </when>
-        <when value="advanced">
-           <param name="remoteurl" size="50" type="text" value="swift.rcc.uchicago.edu" label="remote url" help="remote resource to run jobs on"></param>
-           <param name="throttle" size="5" type="float" value="0.07" label="job throttle" help="number of parallel jobs to run"></param>
-           <param name="project" type="text" value="TG-STA110005S" label="Project allocation" help="name/code of project"></param>
-           <param name="slots" size="5" type="integer" value="1" label="slots" help="number of scheduler jobs"></param>
-           <param name="queue" size="5" type="text" value="normal" label="queue" help="queue to run jobs on"></param>
-           <param name="nodes" size="5" type="integer" value="1" label="nodes" help="number of nodes requested"></param>
-           <param name="nodegranularity" size="5" type="integer" value="1" label="node granularity" help="node granularity"></param>
-           <param name="jobspernode" size="5" type="integer" value="8" label="jobs per node" help="number of jobs per node requested"></param>
-           <param name="ppn" size="5" type="integer" value="8" label="ppn" help="processes per node requested"></param>
-           <param name="walltime" size="5" type="text" value="00:10:00" label="Job walltime" help="time in hh:mm:ss to request to scheduler for this job"></param>
-           <param name="maxtime" size="5" type="integer" value="700" label="application maxtime" help="Application maxtime in seconds for this job"></param>
-        </when>
-    </conditional>
-  </inputs>
+        <param name="outloc" size="50" type="text" value="$HOME/swift-sandbox" label="location for output files" help="Swift will write output files here on disc">
+            <sanitizer sanitize="False"/>
+        </param>
 
-  <outputs>
-     <data format="txt" name="log_file" type="data" label="Swift output" />
-     <data format="txt" name="outlist" type="data" label="Output list" />
-  </outputs>
+        <conditional name="configuration">
+            <param name="mode" type="select" label="Swift configuration">
+                <option value="default">default configuration</option>
+                <option value="advanced">advanced configuration</option>
+            </param>
 
+            <when value="default">
+            </when>
+            <when value="advanced">
+                <param name="remoteurl" size="50" type="text" value="swift.rcc.uchicago.edu" label="remote url" help="remote resource to run jobs on"></param>
+                <param name="throttle" size="5" type="float" value="0.07" label="job throttle" help="number of parallel jobs to run"></param>
+                <param name="project" type="text" value="TG-STA110005S" label="Project allocation" help="name/code of project"></param>
+                <param name="slots" size="5" type="integer" value="1" label="slots" help="number of scheduler jobs"></param>
+                <param name="queue" size="5" type="text" value="normal" label="queue" help="queue to run jobs on"></param>
+                <param name="nodes" size="5" type="integer" value="1" label="nodes" help="number of nodes requested"></param>
+                <param name="nodegranularity" size="5" type="integer" value="1" label="node granularity" help="node granularity"></param>
+                <param name="jobspernode" size="5" type="integer" value="8" label="jobs per node" help="number of jobs per node requested"></param>
+                <param name="ppn" size="5" type="integer" value="8" label="ppn" help="processes per node requested"></param>
+                <param name="walltime" size="5" type="text" value="00:10:00" label="Job walltime" help="time in hh:mm:ss to request to scheduler for this job"></param>
+                <param name="maxtime" size="5" type="integer" value="700" label="application maxtime" help="Application maxtime in seconds for this job"></param>
+            </when>
+        </conditional>
+    </inputs>
+
+    <outputs>
+        <data format="txt" name="log_file" type="data" label="Swift output" />
+        <data format="txt" name="outlist" type="data" label="Output list" />
+    </outputs>
+
 <help>
 .. class:: warningmark
 




More information about the Swift-commit mailing list