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

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Fri Nov 19 10:02:41 CST 2010


Author: wilde
Date: 2010-11-19 10:02:41 -0600 (Fri, 19 Nov 2010)
New Revision: 3708

Modified:
   SwiftApps/SwiftR/Swift/exec/start-swift
Log:
Fix pbs server - adpated newer pbsf logic to pbs, with needed adjustments to to '&' operator.

Modified: SwiftApps/SwiftR/Swift/exec/start-swift
===================================================================
--- SwiftApps/SwiftR/Swift/exec/start-swift	2010-11-12 23:27:30 UTC (rev 3707)
+++ SwiftApps/SwiftR/Swift/exec/start-swift	2010-11-19 16:02:41 UTC (rev 3708)
@@ -67,11 +67,21 @@
 #PBS -m n
 #PBS -l nodes=$nodes
 #PBS -l walltime=$time
-#PBS -o pbs.stdout
-#PBS -e pbs.stderr
+#PBS -o $HOME
+#PBS -e $HOME
 $queueDirective
 WORKER_LOGGING_ENABLED=true # FIXME: parameterize; fix w PBS -v
-cd / && /usr/bin/perl $SWIFTBIN/worker.pl $CONTACT SwiftR-workers $HOME/.globus/coasters $IDLETIMEOUT
+#cd / && /usr/bin/perl $SWIFTBIN/worker.pl $CONTACT SwiftR-workers $HOME/.globus/coasters $IDLETIMEOUT
+HOST=\$(echo $CONTACT | sed -e 's,^http://,,' -e 's/:.*//')
+PORT=\$(echo $CONTACT | sed -e 's,^.*:,,')
+echo '***' PBS_NODEFILE file: \$PBS_NODEFILE CONTACT:$CONTACT
+cat \$PBS_NODEFILE
+echo '***' unique nodes are:
+sort < \$PBS_NODEFILE|uniq
+for h in \$(sort < \$PBS_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
 }
 
@@ -82,7 +92,7 @@
     usage
     exit 1
   fi
-  if [ $queue != default ]; then
+  if [ $queue != default ]; then # FIXME: this will interfere if user really wants to use "-q default"
     queueDirective="#PBS -q $queue"
   else
     queueDirective=""
@@ -93,14 +103,14 @@
 #PBS -m n
 #PBS -l nodes=$nodes:ppn=$cores
 #PBS -l walltime=$time
-#PBS -o $HOME/mw/work/pbs.stdout
-#PBS -e $HOME/mw/work/pbs.stderr
+#PBS -o $HOME
+#PBS -e $HOME
 $queueDirective
 WORKER_LOGGING_ENABLED=true # FIXME: parameterize; fix w PBS -v
 HOST=\$(echo $CONTACT | sed -e 's,^http://,,' -e 's/:.*//')
 PORT=\$(echo $CONTACT | sed -e 's,^.*:,,')
 CONTACT=http://localhost:\$PORT
-echo '***' PBS_NODEFILE file is \$PBS_NODEFILE
+echo '***' PBS_NODEFILE file: \$PBS_NODEFILE CONTACT:$CONTACT
 cat \$PBS_NODEFILE
 echo '***' unique nodes are:
 sort < \$PBS_NODEFILE|uniq
@@ -144,9 +154,9 @@
 
 usage()
 {
-  echo >&2 "usage: $0 -c cores -h 'host1 ... hostN' -n nodes -q queue -s server -t throttle"
+  echo >&2 "usage: $0 -c cores -h 'host1 ... hostN' -n nodes -q queue -s server -p parallelJobs -t walltime"
   echo >&2 "  valid servers: local, ssh, pbs, pbsf (pbs with firewalled workers)"
-  echo >&2 "  defaults:  cores=2 nodes=1 queue=none server=local throttle=10"
+  echo >&2 "  defaults:  cores=2 nodes=1 queue=none server=local parallelJobs=10 walltime=00:30:00 (hh:mm:ss) "
 }
 
 verify-is-one-of()




More information about the Swift-commit mailing list