[Swift-commit] r4545 - in SwiftApps/SwiftR: . Swift/exec

tga at ci.uchicago.edu tga at ci.uchicago.edu
Thu Jun 2 17:25:02 CDT 2011


Author: tga
Date: 2011-06-02 17:25:02 -0500 (Thu, 02 Jun 2011)
New Revision: 4545

Modified:
   SwiftApps/SwiftR/IMMEDIATE-TODO
   SwiftApps/SwiftR/Swift/exec/configure-server-pbsauto
   SwiftApps/SwiftR/Swift/exec/start-swift
Log:
Fixes to get pbsauto working nicely on pads: now passes test suite and handles time, nodes and cores parameters correctly.


Modified: SwiftApps/SwiftR/IMMEDIATE-TODO
===================================================================
--- SwiftApps/SwiftR/IMMEDIATE-TODO	2011-06-02 21:27:03 UTC (rev 4544)
+++ SwiftApps/SwiftR/IMMEDIATE-TODO	2011-06-02 22:25:02 UTC (rev 4545)
@@ -30,7 +30,7 @@
     - E.g. PBS with Dynamic submission of jobs of various lengths
     -   other batch schedulers
 
-    This informs specifying
+    This involves specifying
     - job walltimes
     - queue
     - staging mechanism

Modified: SwiftApps/SwiftR/Swift/exec/configure-server-pbsauto
===================================================================
--- SwiftApps/SwiftR/Swift/exec/configure-server-pbsauto	2011-06-02 21:27:03 UTC (rev 4544)
+++ SwiftApps/SwiftR/Swift/exec/configure-server-pbsauto	2011-06-02 22:25:02 UTC (rev 4545)
@@ -22,6 +22,7 @@
     <!-- max number of cores in total -->
     <profile namespace="globus" key="slots">$nodes</profile>
     <profile namespace="globus" key="workersPerNode">$cores</profile>
+    <profile namespace="globus" key="ppn">$cores</profile>
     
     <!-- these settings control the size of the request blocks
         put through the batch system -->
@@ -40,8 +41,10 @@
 fi
 
 if [ "$time" != NONE ]; then
+    # Hack: Add 60 seconds to time to convince to request blocks for
+    # full time.
     cat >> sites.xml <<END
-    <profile namespace="globus" key="maxTime">$time_mins</profile>
+    <profile namespace="globus" key="maxTime">$((time_secs + 60))</profile>
 END
 fi
 

Modified: SwiftApps/SwiftR/Swift/exec/start-swift
===================================================================
--- SwiftApps/SwiftR/Swift/exec/start-swift	2011-06-02 21:27:03 UTC (rev 4544)
+++ SwiftApps/SwiftR/Swift/exec/start-swift	2011-06-02 22:25:02 UTC (rev 4545)
@@ -430,20 +430,21 @@
     argname=$1; shift
     #check if positive integer
     if [ "$1" -gt 0 ] 2> /dev/null; then
-        time_mins=$time
- #       echo time_mins: $time_mins
+        time_secs=$time
+ #       echo time_secs: $time_secs
         return 0
     fi
 
-    d=${1%%:*} 
-    hm=${1#*:}
-    h=${hm%%:*} 
-    m=${hm#*:}
-    # check than they are integers >= 0
-    if [ \( "$h" -ge 0 \) -a \( "$m" -ge 0 \) -a \( "$d" -ge 0 \) \
-        -a \( \( "$h" -ge 0 \) -o \( "$m" -ge 0 \) -o \( "$d" -ge 0 \) \) ]; then
-        time_mins=$(($m + 60 * ($h + $d * 24)))
-#        echo time_mins: $time_mins
+    h=${1%%:*} 
+    ms=${1#*:}
+    m=${ms%%:*} 
+    s=${ms#*:}
+    # check than they are integers >= 1
+    if [ \( "$h" -ge 0 \) -a \( "$m" -ge 0 \) -a \( "$s" -ge 0 \) \
+        -a \( \( "$h" -ge 0 \) -o \( "$m" -ge 0 \) -o \( "$s" -ge 0 \) \) \
+        ] 2> /dev/null ; then
+        time_secs=$(($s + 60 * ($m + $h * 60)))
+#        echo time_secs: $time_secs
         return 0
     else
         echo $0: "value for $argname was neither valid d:m:s time, or positive
@@ -513,7 +514,7 @@
 
 server=local
 time="00:30:00"
-time_mins=30
+time_secs=30
 nodes=1
 queue=short
 cores=0




More information about the Swift-commit mailing list