[Swift-commit] r7558 - in SwiftApps/swift-galaxy: . swift

ketan at ci.uchicago.edu ketan at ci.uchicago.edu
Mon Feb 3 20:00:33 CST 2014


Author: ketan
Date: 2014-02-03 20:00:33 -0600 (Mon, 03 Feb 2014)
New Revision: 7558

Modified:
   SwiftApps/swift-galaxy/swift/swiftforeach.xml
   SwiftApps/swift-galaxy/tool_conf.xml
Log:
simplification of unified tool

Modified: SwiftApps/swift-galaxy/swift/swiftforeach.xml
===================================================================
--- SwiftApps/swift-galaxy/swift/swiftforeach.xml	2014-02-04 01:12:46 UTC (rev 7557)
+++ SwiftApps/swift-galaxy/swift/swiftforeach.xml	2014-02-04 02:00:33 UTC (rev 7558)
@@ -1,20 +1,34 @@
-<tool id="swiftforeachrange" name="numrangeforeach">
+<tool id="swiftforeach" name="foreach">
     <description>A generic tool to run executable via Swift foreach parallel construct</description>
 
     <command interpreter="bash">
-        swiftforeachrange.sh
-        $site 
-        $interpreter
-        $executable
-        $rstart
-        $rend
-        $stepsize
-        $outloc
-        $logfile
-        $outlist
-        #for $a in $arg
-            ${a.argname}
-        #end for
+        #if $rangeorlist.kind == "range" 
+         swiftforeachrange.sh
+         $site 
+         $interpreter
+         $executable
+         $rstart
+         $rend
+         $stepsize
+         $outloc
+         $logfile
+         $outlist
+         #for $a in $arg
+          ${a.argname}
+         #end for
+        #else
+         swiftforeachlist.sh
+         $site 
+         $interpreter
+         $executable
+         $listfile
+         $outloc
+         $logfile
+         $outlist
+         #for $a in $arg
+         ${a.argname}
+         #end for
+        #end if
     </command>
 
     <inputs>
@@ -35,9 +49,23 @@
 
         <param format="sh,binexec" name="executable" type="data" label="Executable"/>
 
-        <param name="rstart" size="2" type="integer"  value="0" label="start"/>
-        <param name="rend" size="2" type="integer"  value="9" label="end"/>
-        <param name="stepsize" size="2" type="integer"  value="1" label="stepsize"/>
+        <conditional name="rangeorlist">
+            <param name="kind" type="select" label="Select range or list">
+                <option value="range">numeric range</option>
+                <option value="list">items list</option>
+            </param>
+
+            <when value="range">
+                <param name="rstart" size="2" type="integer"  value="0" label="start"/>
+                <param name="rend" size="2" type="integer"  value="9" label="end"/>
+                <param name="stepsize" size="2" type="integer"  value="1" label="stepsize"/>
+            </when>
+
+            <when value="list">
+                <param format="data" name="listfile" type="data" label="List file"/>
+            </when>
+        </conditional>
+        
         <repeat name="arg" title="arg">
             <param name="argname" type="text" label="arg" />
         </repeat>

Modified: SwiftApps/swift-galaxy/tool_conf.xml
===================================================================
--- SwiftApps/swift-galaxy/tool_conf.xml	2014-02-04 01:12:46 UTC (rev 7557)
+++ SwiftApps/swift-galaxy/tool_conf.xml	2014-02-04 02:00:33 UTC (rev 7558)
@@ -7,9 +7,10 @@
 <toolbox>
   <section name="swift" id="swift">
     <tool file="swift/genericswift.xml" />
+    <tool file="swift/swiftforeach.xml" />
+<!--
     <tool file="swift/swiftforeachrange.xml" />
     <tool file="swift/swiftforeachlist.xml" />
-<!--
     <tool file="swift/catsn.xml" />
     <tool file="swift/mysim.xml" />
     <tool file="swift/dssat.xml" />




More information about the Swift-commit mailing list