[Swift-commit] r8418 - SwiftApps/subjobs

ketan at ci.uchicago.edu ketan at ci.uchicago.edu
Tue Mar 31 15:46:53 CDT 2015


Author: ketan
Date: 2015-03-31 15:46:53 -0500 (Tue, 31 Mar 2015)
New Revision: 8418

Modified:
   SwiftApps/subjobs/bg.sh
Log:
logging and structuring

Modified: SwiftApps/subjobs/bg.sh
===================================================================
--- SwiftApps/subjobs/bg.sh	2015-03-31 20:19:04 UTC (rev 8417)
+++ SwiftApps/subjobs/bg.sh	2015-03-31 20:46:53 UTC (rev 8418)
@@ -40,34 +40,33 @@
 # If subblock size is provided, do subblock business
 if [ "$SUBBLOCK_SIZE"_ != "_" ]
 then
-    #untested
+    # sub-block size larger than 512 nodes, currently untested
     if [ "$SUBBLOCK_SIZE" -gt 512 ]
     then
-        BLOCKS=$(get-bootable-blocks --size $SUBBLOCK_SIZE $COBALT_PARTNAME)
+        export SWIFT_SUBBLOCKS=$(get-bootable-blocks --size $SUBBLOCK_SIZE $COBALT_PARTNAME)
+        export SWIFT_SUBBLOCK_ARRAY=($SWIFT_SUBBLOCKS)
+
+        if [ "_$SWIFT_SUBBLOCKS" = _ ]; then
+          echo ERROR: "$0": SWIFT_SUBBLOCKS is null.
+          exit 1
+        fi
+        BLOCK=${SWIFT_SUBBLOCK_ARRAY[$SWIFT_JOB_SLOT]}
         
-        for BLOCK in $BLOCKS
-        do
-         boot-block --block $BLOCK &
-        done
-        wait
+        #Some logging
+        echo "$0": running BLOCK="$BLOCK" SLOT="$SWIFT_JOB_SLOT"
+        echo "$0": running cmd: "$0" args: "$@"
+        echo "$0": running runjob --block "$BLOCK" : "$@"
         
-        for BLOCK in $BLOCKS
-        do
-          runjob --block $BLOCK : "$@"
-        done
-        wait
-        
-        for BLOCK in $BLOCKS
-        do
-           boot-block --block $BLOCK --free &
-        done
-        wait
+        boot-block --block $BLOCK
+        runjob --block $BLOCK : "$@"
+        boot-block --block $BLOCK --free 
+
+        echo "Runjob finished"
+
     else
         export SWIFT_SUBBLOCKS=$(get-corners.py "$COBALT_PARTNAME" $SHAPE)
         export SWIFT_SUBBLOCK_ARRAY=($SWIFT_SUBBLOCKS)
         
-        #echo "$0": SWIFT_SUBBLOCKS="$SWIFT_SUBBLOCKS"
-        
         if [ "_$SWIFT_SUBBLOCKS" = _ ]; then
           echo ERROR: "$0": SWIFT_SUBBLOCKS is null.
           exit 1




More information about the Swift-commit mailing list