[Swift-commit] r6765 - SwiftTutorials/ATPESC_2013-08-06/scripts
yadunandb at ci.uchicago.edu
yadunandb at ci.uchicago.edu
Mon Aug 5 15:32:00 CDT 2013
Author: yadunandb
Date: 2013-08-05 15:32:00 -0500 (Mon, 05 Aug 2013)
New Revision: 6765
Added:
SwiftTutorials/ATPESC_2013-08-06/scripts/local_coaster_workers.sh
Log:
Adding script to launch coaster-service on Vesta and qsub
a worker.
Added: SwiftTutorials/ATPESC_2013-08-06/scripts/local_coaster_workers.sh
===================================================================
--- SwiftTutorials/ATPESC_2013-08-06/scripts/local_coaster_workers.sh (rev 0)
+++ SwiftTutorials/ATPESC_2013-08-06/scripts/local_coaster_workers.sh 2013-08-05 20:32:00 UTC (rev 6765)
@@ -0,0 +1,67 @@
+#!/bin/bash
+###########
+#start_coaster_workers.sh
+#
+#This script will start a coaster service on Vesta. It will then
+#submit a worker on the vesta login node via qsub.
+###########
+
+LPORT_F=local_port
+SPORT_F=service_port
+LOCALSYS=localhost # Here VESTA
+
+if [ "$HOSTNAME" != "vestalac1" ]
+then
+ echo "NOT VESTA! - Script designed to run on Vesta"
+ sleep 1;
+fi
+
+# -local is not working properly
+# TODO: Check if this is a reproducible bug.
+# removing -local fixes the problem
+coaster-service -passive -nosec -localportfile $LPORT_F -portfile $SPORT_F > coaster-log 2>&1 &
+echo "Waiting for coaster-service to start ...(3 seconds)"
+sleep 3
+LOCAL_PORT=$(cat $LPORT_F)
+SERV_PORT=$(cat $SPORT_F)
+
+
+# Start a worker on vesta
+# Submit a worker to the queue on Vesta
+# -n 1 : ask for 1 node
+# -t 120 : request for a walltime of 2 hours (I do not know the max time)
+# -q default : submit to default queue
+# --mode script: specify type of submitted job
+[ ! -f "~/worker.pl" ] && cp /home/wilde/swift/rev/swift-0.94.1/bin/worker.pl ~/
+
+qsub -n 1 -t 120 -q default --mode script ~/worker.pl http://localhost:$LOCAL_PORT 1 .
+
+# Generate the sites.xml file
+cat <<EOF > tmp
+<config>
+ <pool handle="persistent-coasters">
+ <execution provider="coaster-persistent"
+ url="http://127.0.0.1:$SERV_PORT"
+ jobmanager="local:local"/>
+ <profile namespace="globus" key="workerManager">passive</profile>
+ <profile namespace="globus" key="jobsPerNode">4</profile>
+ <profile key="jobThrottle" namespace="karajan">100</profile>
+ <profile namespace="karajan" key="initialScore">10000</profile>
+ <filesystem provider="local" url="none" />
+ <workdirectory>/home/$USER/swiftwork</workdirectory>
+ </pool>
+</config>
+EOF
+
+if [ -f "sites.xml" ];then
+ cp sites.xml sites.xml.bak
+fi;
+mv tmp sites.xml
+
+echo "Done!"
+exit 0;
+
+
+
+
+
Property changes on: SwiftTutorials/ATPESC_2013-08-06/scripts/local_coaster_workers.sh
___________________________________________________________________
Added: svn:executable
+ *
More information about the Swift-commit
mailing list