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

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Tue Feb 15 17:31:55 CST 2011


Author: tga
Date: 2011-02-15 17:31:55 -0600 (Tue, 15 Feb 2011)
New Revision: 4106

Modified:
   SwiftApps/SwiftR/Swift/exec/start-swift
Log:
Got SwiftR working on Eureka!!


Modified: SwiftApps/SwiftR/Swift/exec/start-swift
===================================================================
--- SwiftApps/SwiftR/Swift/exec/start-swift	2011-02-15 21:48:43 UTC (rev 4105)
+++ SwiftApps/SwiftR/Swift/exec/start-swift	2011-02-15 23:31:55 UTC (rev 4106)
@@ -162,6 +162,27 @@
 END
 }
 
+make-cobalt-submit-file() 
+{
+# Most cobalt options are passed through the command line, we just need to
+# include relevant arguments for worker.pl in here.
+
+cat > $HOME/batch.sub <<END
+#!/bin/sh
+export WORKER_LOGGING_LEVEL=$workerLogging
+echo '***' COBALT_NODEFILE file: \$COBALT_NODEFILE CONTACT:$CONTACT
+cat \$COBALT_NODEFILE
+echo '***' unique nodes are:
+sort < \$COBALT_NODEFILE|uniq
+for h in \$(sort < \$COBALT_NODEFILE|uniq); do
+  ssh \$h "echo Swift R startup running on host; hostname; cd /; /usr/bin/perl $SWIFTBIN/worker.pl $CONTACT SwiftR-\$h $HOME/.globus/coasters $IDLETIMEOUT" &
+done
+wait
+
+END
+chmod +x $HOME/batch.sub
+}
+
 # FIXME: for big systems like Ranger, need to use ssh_tree to avoid socket FD exhastion?
 
 make-sge-submit-file()
@@ -254,9 +275,7 @@
   IDLETIMEOUT=$((60*60*240)) # 10 days: FIXME: make this a command line arg
 
   # FIXME: set up for capturing batch job id: rm -rf remotepid.* # FIXME: should not be needed if we start in a new dir each time
-  if [ "$server" != "cobalt" ]; then
-    make-${server}-submit-file
-  fi
+  make-${server}-submit-file
   #FIXME: doesn't work for SGE on IBI cluster as there is additional text
   # returned by qsub
   
@@ -294,18 +313,14 @@
     # so we have multiple workers per node.  In future could
     # add support for virtual node mode, etc
     #CONTACT="http://10.40.9.151:$(echo $CONTACT | sed -e 's,^.*:,,')"
-    logdir=`pwd`
+    wkdir=`pwd`
     qsub -t "$time" -n $nodes $queueDirective $kernDirective \
-	$projDirective -e $logdir/SwiftR-workers.err \
-        -o $logdir/SwiftR-workers.out --debuglog $logdir/cobalt.log \
-        --cwd / \
-	--env WORKER_LOGGING_LEVEL=$workerLogging \
-	 /usr/bin/perl $SWIFTBIN/worker.pl $CONTACT SwiftR-workers \
-         $HOME/.globus/coasters $IDLETIMEOUT >$jobidfile     
-    #TODO: change current working directory
+	$projDirective -e $wkdir/SwiftR-workers.err \
+        -o $wkdir/SwiftR-workers.out --debuglog $wkdir/cobalt.log \
+        --cwd / $HOME/batch.sub > $jobidfile
     succ=$?
   else
-    qsub batch.sub >$jobidfile
+    qsub batch.sub > $jobidfile
     succ=$?
   fi
 




More information about the Swift-commit mailing list