[Swift-commit] r2312 - SwiftApps/adem-osg/swift-execution-example/dock
noreply at svn.ci.uchicago.edu
noreply at svn.ci.uchicago.edu
Mon Oct 20 21:22:21 CDT 2008
Author: houzx
Date: 2008-10-20 21:22:21 -0500 (Mon, 20 Oct 2008)
New Revision: 2312
Added:
SwiftApps/adem-osg/swift-execution-example/dock/prepare-for-dock-swift-submit
Log:
prepare
Added: SwiftApps/adem-osg/swift-execution-example/dock/prepare-for-dock-swift-submit
===================================================================
--- SwiftApps/adem-osg/swift-execution-example/dock/prepare-for-dock-swift-submit (rev 0)
+++ SwiftApps/adem-osg/swift-execution-example/dock/prepare-for-dock-swift-submit 2008-10-21 02:22:21 UTC (rev 2312)
@@ -0,0 +1,48 @@
+#/bin/sh
+DIR="$ADEM_HOME"
+USER=`whoami`
+i=1
+
+VO=$1
+SITE_FILE=$2
+
+if [ "X$VO" == "X" ]; then
+ {
+ echo "Please input the virtual organization name as the first parameter, and the grid sites file as the second parameter.Just use a space to separate the two parameters. For osg, vo can be:"
+ echo "CDF CMS CompBioGrid DES DOSAR DZero Engage Fermilab fMRI GADU geant4 GLOW GPN GRASE GridChem GridEx GROW i2u2 iVDGL LIGO mariachi MIS nanoHUB NWICG Ops OSG OSGEDU SDSS STAR USATLAS"
+ }
+ exit
+fi
+
+if [ "$SITE_FILE" == "" ]; then
+ {
+ echo "Oh,no grid sites file for the application deployment.Please input the grid sites file as the parameter.You can use auto-get-sites to create the available grid sites automatically."
+ }
+ exit
+fi
+
+echo "#sitename transformation path INSTALLED platform profiles" > $DIR/swift-execution-example/dock/dock-tc.data
+for SITE in $(awk '{print $1}' $SITE_FILE)
+do
+ echo $i
+ echo $SITE
+ APP=`sed -n "$i"p $SITE_FILE | awk {'print $2'}`
+ #PACMAN=`sed -n "$i"p $SITE_FILE | awk {'print $3'}`
+ DATA=`sed -n "$i"p $SITE_FILE | awk {'print $5'}`
+ NAME=`sed -n "$i"p $SITE_FILE | awk {'print $7'}`
+
+#(1) make an individual work directory in the VO
+#(2) To transfer the input files for DOCK application
+ globus-job-run $SITE /bin/mkdir -p $DATA/$VO/$USER 2>/dev/null && globus-url-copy file:///disks/tp-gpfs/scratch/houzx/dock-run/dockKAGxNL.tar.gz gsiftp://$SITE$DATA/$VO/$USER/dockKAGxNL.tar.gz &
+
+#(3) To modify and transfer the executable wrapper script for DOCK application
+ /bin/cp $DIR/swift-execution-example/dock/wrapper-bin/rundock-template $DIR/swift-execution-example/dock/wrapper-bin/rundock-$SITE
+ sed -i "s,\$DATA/\$VO/\$USER,$DATA/$VO/$USER,g" $DIR/swift-execution-example/dock/wrapper-bin/rundock-$SITE
+ sed -i "s,\$APP/osg,$APP/osg,g" $DIR/swift-execution-example/dock/wrapper-bin/rundock-$SITE
+ sed -i "s,\$SITES,$SITE,g" $DIR/swift-execution-example/dock/wrapper-bin/rundock-$SITE
+ globus-url-copy file://$DIR/swift-execution-example/dock/wrapper-bin/rundock-$SITE gsiftp://$SITE$DATA/$VO/$USER/rundock && globus-job-run $SITE /bin/chmod +x $DATA/$VO/$USER/rundock && echo "$NAME rundock $DATA/$VO/$USER/rundock INSTALLED INTEL32::LINUX null" >> $DIR/swift-execution-example/dock/dock-tc.data
+
+ i=`expr $i + 1`
+done
+
+echo "The tc.data file for the swift execution of DOCK application is: $DIR/swift-execution-example/dock/dock-tc.data"
Property changes on: SwiftApps/adem-osg/swift-execution-example/dock/prepare-for-dock-swift-submit
___________________________________________________________________
Name: svn:executable
+
More information about the Swift-commit
mailing list