[Swift-commit] r4548 - SwiftApps/SwiftR/Swift/exec

tga at ci.uchicago.edu tga at ci.uchicago.edu
Fri Jun 3 11:12:34 CDT 2011


Author: tga
Date: 2011-06-03 11:12:34 -0500 (Fri, 03 Jun 2011)
New Revision: 4548

Modified:
   SwiftApps/SwiftR/Swift/exec/configure-server-pbsauto
   SwiftApps/SwiftR/Swift/exec/start-swift
Log:
Tweaked time settings for pbsauto so that time parameter is better respected.


Modified: SwiftApps/SwiftR/Swift/exec/configure-server-pbsauto
===================================================================
--- SwiftApps/SwiftR/Swift/exec/configure-server-pbsauto	2011-06-03 15:12:39 UTC (rev 4547)
+++ SwiftApps/SwiftR/Swift/exec/configure-server-pbsauto	2011-06-03 16:12:34 UTC (rev 4548)
@@ -1,7 +1,21 @@
 #! /usr/bin/env bash
 
-#TODO: make configurable
-maxwalltime="00:10:00"
+#TODO: is this best way to do this.
+
+# we assume that $time_secs specifies the lengths of jobs 
+# that should be submitted to pbs.  
+#We don't really know the expected duration of R jobs, so we will come up
+# with a sensible value based on $time-secs
+# 
+#Swift kills jobs that run for double maxwalltime, so maxwalltime should be
+# > 0.5 $time_secs
+# Ideally we want to run multiple jobs in each batch allocation, so we don't
+# want coasters to mistakenly decide that it can't schedule a job when we 
+# have most of the batch allocation left.  So we really want
+# maxwalltime to be just over 0.5 $time_secs, once we round both to minutes
+maxwalltime=$(( ($time_secs + 120) / 120 ))
+
+
 cat >tc <<END
 pbscoast  bash      /bin/bash null null ENV::PATH="$PATH";GLOBUS::maxwalltime="$maxwalltime"
 END
@@ -28,8 +42,9 @@
         put through the batch system -->
     <profile namespace="globus" key="maxNodes">1</profile>
     <profile namespace="globus" key="nodeGranularity">1</profile>
+    <profile namespace="globus" key="lowOverallocation">2</profile>
+    <profile namespace="globus" key="highOverallocation">2</profile>
 
-
 END
 if [ "$queue" != NONE ]; then
     #TODO: error handling

Modified: SwiftApps/SwiftR/Swift/exec/start-swift
===================================================================
--- SwiftApps/SwiftR/Swift/exec/start-swift	2011-06-03 15:12:39 UTC (rev 4547)
+++ SwiftApps/SwiftR/Swift/exec/start-swift	2011-06-03 16:12:34 UTC (rev 4548)
@@ -427,6 +427,10 @@
 
 verify-is-time()
 {
+    # Three valid formats, following maxWallTime globus param:
+    # minutes (single int)
+    # h:m
+    # h:m:s
     argname=$1; shift
     #check if positive integer
     if [ "$1" -gt 0 ] 2> /dev/null; then
@@ -439,9 +443,14 @@
     ms=${1#*:}
     m=${ms%%:*} 
     s=${ms#*:}
-    # check than they are integers >= 1
+
+    # if in h:m format, then #*: won't have deleted anything from m
+    if [ "$ms" = "$s" ]; then
+        s=0
+    fi
+    # check than they are integers >= 0 and at least one is > 0
     if [ \( "$h" -ge 0 \) -a \( "$m" -ge 0 \) -a \( "$s" -ge 0 \) \
-        -a \( \( "$h" -ge 0 \) -o \( "$m" -ge 0 \) -o \( "$s" -ge 0 \) \) \
+        -a \( \( "$h" -gt 0 \) -o \( "$m" -gt 0 \) -o \( "$s" -gt 0 \) \) \
         ] 2> /dev/null ; then
         time_secs=$(($s + 60 * ($m + $h * 60)))
 #        echo time_secs: $time_secs




More information about the Swift-commit mailing list