[Swift-commit] r2784 - in SwiftApps/LigandAtlas: . MTIO MTIO/bin MTIO/lib

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Mon Mar 30 11:49:57 CDT 2009


Author: zzhang
Date: 2009-03-30 11:49:57 -0500 (Mon, 30 Mar 2009)
New Revision: 2784

Added:
   SwiftApps/LigandAtlas/MTIO/
   SwiftApps/LigandAtlas/MTIO/bin/
   SwiftApps/LigandAtlas/MTIO/bin/.__acl
   SwiftApps/LigandAtlas/MTIO/bin/bashrc
   SwiftApps/LigandAtlas/MTIO/bin/bcast.sh
   SwiftApps/LigandAtlas/MTIO/bin/broadcast.sh
   SwiftApps/LigandAtlas/MTIO/bin/chtclient.rb
   SwiftApps/LigandAtlas/MTIO/bin/chtget.rb
   SwiftApps/LigandAtlas/MTIO/bin/chtput.rb
   SwiftApps/LigandAtlas/MTIO/bin/cn-ipfwd.2409
   SwiftApps/LigandAtlas/MTIO/bin/cnip-work.sh
   SwiftApps/LigandAtlas/MTIO/bin/cnip.sh
   SwiftApps/LigandAtlas/MTIO/bin/collector.sh
   SwiftApps/LigandAtlas/MTIO/bin/hashserver.rb
   SwiftApps/LigandAtlas/MTIO/bin/ipcal
   SwiftApps/LigandAtlas/MTIO/bin/torus-falkon-start-bgp-ram.sh
   SwiftApps/LigandAtlas/MTIO/bin/toruscp.sh
   SwiftApps/LigandAtlas/MTIO/bin/wrapper.sh
   SwiftApps/LigandAtlas/MTIO/bin/zoid-user-script.sh
   SwiftApps/LigandAtlas/MTIO/lib/
   SwiftApps/LigandAtlas/MTIO/lib/libcrypt.so.1
   SwiftApps/LigandAtlas/MTIO/lib/libnsl.so.1
   SwiftApps/LigandAtlas/MTIO/lib/libresolv.so.2
Log:
The collection of APIs that MTIO is built on.


Added: SwiftApps/LigandAtlas/MTIO/bin/.__acl
===================================================================
--- SwiftApps/LigandAtlas/MTIO/bin/.__acl	                        (rev 0)
+++ SwiftApps/LigandAtlas/MTIO/bin/.__acl	2009-03-30 16:49:57 UTC (rev 2784)
@@ -0,0 +1,2 @@
+address:192.168.1.* rwlda
+address:10.* rwlda

Added: SwiftApps/LigandAtlas/MTIO/bin/bashrc
===================================================================
--- SwiftApps/LigandAtlas/MTIO/bin/bashrc	                        (rev 0)
+++ SwiftApps/LigandAtlas/MTIO/bin/bashrc	2009-03-30 16:49:57 UTC (rev 2784)
@@ -0,0 +1,3 @@
+export PATH=/home/zzhang/chirp/bin:$PATH
+export PATH=/home/zzhang/ruby-1.8.7-p72/bin/bin:$PATH
+PATH=/fuse/bin:/fuse/usr/bin:$PATH
\ No newline at end of file

Added: SwiftApps/LigandAtlas/MTIO/bin/bcast.sh
===================================================================
--- SwiftApps/LigandAtlas/MTIO/bin/bcast.sh	                        (rev 0)
+++ SwiftApps/LigandAtlas/MTIO/bin/bcast.sh	2009-03-30 16:49:57 UTC (rev 2784)
@@ -0,0 +1,16 @@
+#!/fuse/bin/bash
+
+export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/zzhang/cio/lib
+PATH=/fuse/bin:/fuse/usr/bin:$PATH
+
+IP=`/sbin/ifconfig | grep inet | tail -n 1 | cut -d ':' -f 2 |awk '{print $1}'`
+#mkdir -p /dev/shm/share/common
+#cp -r common/* /dev/shm/share/
+#chmod -R 755 /dev/shm/share/common
+#exit 1
+# tree network path
+DESTHOSTS=`seq 0 63 | sed "s/^/10.128.0./" | xargs`
+echo ${DESTHOSTS/$IP/" "}
+/home/zzhang/chirp/bin/chirp_distribute -a address -D 127.0.0.1 / ${DESTHOSTS/$IP/" "}
+
+exit 0
\ No newline at end of file


Property changes on: SwiftApps/LigandAtlas/MTIO/bin/bcast.sh
___________________________________________________________________
Name: svn:executable
   + *

Added: SwiftApps/LigandAtlas/MTIO/bin/broadcast.sh
===================================================================
--- SwiftApps/LigandAtlas/MTIO/bin/broadcast.sh	                        (rev 0)
+++ SwiftApps/LigandAtlas/MTIO/bin/broadcast.sh	2009-03-30 16:49:57 UTC (rev 2784)
@@ -0,0 +1,16 @@
+#!/fuse/bin/bash
+
+export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/zzhang/cio/lib
+PATH=/fuse/bin:/fuse/usr/bin:$PATH
+
+IP=`/sbin/ifconfig | grep inet | tail -n 1 | cut -d ':' -f 2 |awk '{print $1}'`
+#mkdir -p /dev/shm/share/common
+cp -r common/* /dev/shm/share/
+#chmod -R 755 /dev/shm/share/common
+#exit 1
+# tree network path
+DESTHOSTS=`seq 0 63 | sed "s/^/10.128.0./" | xargs`
+#DESTHOSTS1=`seq 0 255 | sed "s/^/10.128.1./" | xargs`
+echo ${DESTHOSTS/$IP/" "}
+echo start
+/home/zzhang/chirp/bin/chirp_distribute -a address -D 127.0.0.1 / ${DESTHOSTS/$IP/" "}


Property changes on: SwiftApps/LigandAtlas/MTIO/bin/broadcast.sh
___________________________________________________________________
Name: svn:executable
   + *

Added: SwiftApps/LigandAtlas/MTIO/bin/chtclient.rb
===================================================================
--- SwiftApps/LigandAtlas/MTIO/bin/chtclient.rb	                        (rev 0)
+++ SwiftApps/LigandAtlas/MTIO/bin/chtclient.rb	2009-03-30 16:49:57 UTC (rev 2784)
@@ -0,0 +1,75 @@
+#!/home/espinosa/local/bin/ruby
+
+require 'drb'
+
+DRb.start_service
+cht = DRbObject.new(nil, 'druby://192.168.1.64:9000')
+
+cht.put("/x/0", 0)
+cht.put("/x/1", 1)
+cht.put("/x/2", 2)
+cht.put("/x/3", 3)
+cht.put("/x/4", 4)
+cht.put("/x/5", 5)
+cht.put("/x/6", 6)
+cht.put("/x/7", 7)
+cht.put("/x/8", 8)
+cht.put("/x/9", 9)
+cht.put("/x/10", 10)
+cht.put("/x/11", 11)
+cht.put("/x/12", 12)
+cht.put("/x/13", 13)
+cht.put("/x/14", 14)
+cht.put("/x/15", 15)
+cht.put("/x/16", 16)
+cht.put("/x/17", 17)
+cht.put("/x/18", 18)
+cht.put("/x/19", 19)
+cht.put("/x/20", 20)
+cht.put("/x/21", 21)
+cht.put("/x/22", 22)
+cht.put("/x/23", 23)
+cht.put("/x/24", 24)
+cht.put("/x/25", 25)
+cht.put("/x/26", 26)
+cht.put("/x/27", 27)
+cht.put("/x/28", 28)
+cht.put("/x/29", 29)
+cht.put("/x/20", 20)
+cht.put("/x/31", 31)
+cht.put("/x/32", 32)
+cht.put("/x/33", 33)
+cht.put("/x/34", 34)
+cht.put("/x/35", 35)
+cht.put("/x/36", 36)
+cht.put("/x/37", 37)
+cht.put("/x/38", 38)
+cht.put("/x/39", 39)
+cht.put("/x/40", 40)
+cht.put("/x/41", 41)
+cht.put("/x/42", 42)
+cht.put("/x/43", 43)
+cht.put("/x/44", 44)
+cht.put("/x/45", 45)
+cht.put("/x/46", 46)
+cht.put("/x/47", 47)
+cht.put("/x/48", 48)
+cht.put("/x/49", 49)
+cht.put("/x/50", 50)
+cht.put("/x/51", 51)
+cht.put("/x/52", 52)
+cht.put("/x/53", 53)
+cht.put("/x/54", 54)
+cht.put("/x/55", 55)
+cht.put("/x/56", 56)
+cht.put("/x/57", 57)
+cht.put("/x/58", 58)
+cht.put("/x/59", 59)
+cht.put("/x/60", 60)
+cht.put("/x/61", 61)
+cht.put("/x/62", 62)
+cht.put("/x/63", 63)
+#ARGV.each do|a|
+#  puts "Argument: #{a}"
+#  puts cht.get"#{a}"
+#end


Property changes on: SwiftApps/LigandAtlas/MTIO/bin/chtclient.rb
___________________________________________________________________
Name: svn:executable
   + *

Added: SwiftApps/LigandAtlas/MTIO/bin/chtget.rb
===================================================================
--- SwiftApps/LigandAtlas/MTIO/bin/chtget.rb	                        (rev 0)
+++ SwiftApps/LigandAtlas/MTIO/bin/chtget.rb	2009-03-30 16:49:57 UTC (rev 2784)
@@ -0,0 +1,16 @@
+#!/home/espinosa/local/bin/ruby
+
+require 'drb'
+
+DRb.start_service
+cht = DRbObject.new(nil, 'druby://10.128.0.0:9000')
+
+#cht.put("/x/y", 0)
+#cht.put("/x/z", 0)
+#cht.put("/x/a", 3)
+#cht.put("/x/b", 2)
+#cht.put("/x/c", 2)
+#cht.put("/x/d", 2)
+
+  puts cht.get(ARGV[0])
+


Property changes on: SwiftApps/LigandAtlas/MTIO/bin/chtget.rb
___________________________________________________________________
Name: svn:executable
   + *

Added: SwiftApps/LigandAtlas/MTIO/bin/chtput.rb
===================================================================
--- SwiftApps/LigandAtlas/MTIO/bin/chtput.rb	                        (rev 0)
+++ SwiftApps/LigandAtlas/MTIO/bin/chtput.rb	2009-03-30 16:49:57 UTC (rev 2784)
@@ -0,0 +1,16 @@
+#!/home/espinosa/local/bin/ruby
+
+require 'drb'
+
+DRb.start_service
+cht = DRbObject.new(nil, 'druby://10.128.0.0:9000')
+
+#cht.put("/x/y", 0)
+#cht.put("/x/z", 0)
+#cht.put("/x/a", 3)
+#cht.put("/x/b", 2)
+#cht.put("/x/c", 2)
+puts ARGV[0]
+puts ARGV[1]
+cht.put(ARGV[0], ARGV[1])
+


Property changes on: SwiftApps/LigandAtlas/MTIO/bin/chtput.rb
___________________________________________________________________
Name: svn:executable
   + *

Added: SwiftApps/LigandAtlas/MTIO/bin/cn-ipfwd.2409
===================================================================
(Binary files differ)


Property changes on: SwiftApps/LigandAtlas/MTIO/bin/cn-ipfwd.2409
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: SwiftApps/LigandAtlas/MTIO/bin/cnip-work.sh
===================================================================
--- SwiftApps/LigandAtlas/MTIO/bin/cnip-work.sh	                        (rev 0)
+++ SwiftApps/LigandAtlas/MTIO/bin/cnip-work.sh	2009-03-30 16:49:57 UTC (rev 2784)
@@ -0,0 +1,69 @@
+#!/fuse/bin/bash
+LD_LIBRARY_PATH=/lib:/fuse/lib:/fuse/usr/lib
+PATH=/fuse/bin:/fuse/usr/bin:$PATH
+
+#Torus START
+/home/iskra/ZeptoOS/packages/cnip/prebuilt/cn-ipfwd.2409 &
+
+while [ ! -f /tmp/ifconfig.cmd ]; do
+    sleep 1
+done
+
+. /tmp/ifconfig.cmd
+
+#IP Calculation
+RANK=`echo $CONTROL_INIT | awk -F, '{print $4}'`
+FIRST=`expr $RANK % 256`
+SECOND=`expr $RANK / 256`
+
+BASE=`expr $FIRST / 64`
+MODULO=`expr $FIRST % 64`
+CHIRP_BASE=`expr $BASE \* 64`
+CHIRP_1=`expr $CHIRP_BASE + 1`
+CHIRP_2=`expr $CHIRP_BASE + 2`
+CHIRP_3=`expr $CHIRP_BASE + 3`
+CHIRP_4=`expr $CHIRP_BASE + 4`
+export CHIRP_ADD=10.128.$SECOND.$CHIRP_1
+#Chirp START
+if [ -d /dev/shm/share ];
+    then
+    rm -rf /dev/shm/share 
+fi
+mkdir /dev/shm/share
+echo "address:192.168.1.* rwlda" >>/dev/shm/share/.__acl
+echo "address:10.* rwlda" >> /dev/shm/share/.__acl
+echo "address:127.0.0.1 rwlda" >> /dev/shm/share/.__acl
+
+/home/zzhang/chirp/bin/chirp_server -r /dev/shm/share &
+
+#MAIN
+if [ "$RANK" = "0" ] 
+then
+    /home/zzhang/cio/bin/hashserver.rb &
+elif [ "$MODULO" = "1" ] 
+then
+    cd /dev/shm/share
+    mkdir stripe
+    cd stripe
+    cp ../.__acl .
+    mkdir root
+    cp .__acl root/
+    echo 10.128.$SECOND.$CHIRP_1 >> hosts
+    echo 10.128.$SECOND.$CHIRP_2 >> hosts
+    echo 10.128.$SECOND.$CHIRP_3 >> hosts
+    echo 10.128.$SECOND.$CHIRP_4 >> hosts
+    echo bigvolfiles > key
+
+    mkdir /chirp
+    /home/zzhang/chirp/bin/chirp_fuse -a address /chirp
+    /home/zzhang/cio/bin/collector.sh &
+elif [ "$MODULO" = "2" ] || [ "$MODULO" = "3" ] || [ "$MODULO" = "4" ] 
+then
+    sleep 3600
+else
+    mkdir /chirp
+    /home/zzhang/chirp/bin/chirp_fuse -a address /chirp
+    /home/zzhang/falkon/worker/run.worker-c-bgp.sh $1 $2 $3 $4 $5 $6 $7
+fi
+
+sleep 3600


Property changes on: SwiftApps/LigandAtlas/MTIO/bin/cnip-work.sh
___________________________________________________________________
Name: svn:executable
   + *

Added: SwiftApps/LigandAtlas/MTIO/bin/cnip.sh
===================================================================
--- SwiftApps/LigandAtlas/MTIO/bin/cnip.sh	                        (rev 0)
+++ SwiftApps/LigandAtlas/MTIO/bin/cnip.sh	2009-03-30 16:49:57 UTC (rev 2784)
@@ -0,0 +1,34 @@
+#!/fuse/bin/bash
+LD_LIBRARY_PATH=/lib:/fuse/lib:/fuse/usr/lib
+PATH=/fuse/bin:/fuse/usr/bin:$PATH
+
+/home/iskra/ZeptoOS/packages/cnip/prebuilt/cn-ipfwd.2409 &
+
+while [ ! -f /tmp/ifconfig.cmd ]; do
+    sleep 1
+done
+
+. /tmp/ifconfig.cmd
+
+RANK=`echo $CONTROL_INIT | awk -F, '{print $4}'`
+
+if [ -d /dev/shm/share ];
+    then
+    rm -rf /dev/shm/share 
+fi
+mkdir /dev/shm/share
+echo "address:192.168.1.* rwlda" >>/dev/shm/share/.__acl
+echo "address:10.* rwlda" >> /dev/shm/share/.__acl
+echo "address:127.0.0.1 rwlda" >> /dev/shm/share/.__acl
+
+/home/zzhang/chirp/bin/chirp_server -r /dev/shm/share &
+
+if [ "$RANK" = "0" ];
+then
+    /home/zzhang/cio/bin/hashserver.rb &
+else    
+    /home/zzhang/falkon/worker/run.worker-c-bgp.sh $1 $2 $3 $4 $5 $6 $7
+fi
+
+echo $RANK > /dev/shm/rank
+sleep 3600


Property changes on: SwiftApps/LigandAtlas/MTIO/bin/cnip.sh
___________________________________________________________________
Name: svn:executable
   + *

Added: SwiftApps/LigandAtlas/MTIO/bin/collector.sh
===================================================================
--- SwiftApps/LigandAtlas/MTIO/bin/collector.sh	                        (rev 0)
+++ SwiftApps/LigandAtlas/MTIO/bin/collector.sh	2009-03-30 16:49:57 UTC (rev 2784)
@@ -0,0 +1,60 @@
+#!/fuse/bin/bash
+LD_LIBRARY_PATH=/lib:/fuse/lib:/fuse/usr/lib
+PATH=/fuse/bin:/fuse/usr/bin:$PATH
+
+i=0
+RANK=`echo $CONTROL_INIT | awk -F, '{print $4}'`
+IOPATH=`cat /fuse/tmp/iohost`
+CHIRP_ADDR=`echo $CHIRP_ADD`
+LOG=/dev/shm/collector
+echo "CHIRP: $CHIRP_ADD" >> $LOG 2>&1
+echo "START RANK: $RANK" >> $LOG 2>&1
+function send()
+{
+    ext=$1
+    cd /chirp/multi/${CHIRP_ADDR}@stripe/
+    time tar cf /tmp/${RANK}_${i}_${ext}.tar `ls /dev/shm/share/stripe/root/` >> $LOG 2>&1
+    DATE=`date`
+    echo "${DATE}: ${i}th tar done with exit code $?" >> $LOG 2>&1
+    time dd if=/tmp/${RANK}_${i}_${ext}.tar of=${IOPATH}/${RANK}_${i}_${ext}.tar bs=128k >> $LOG 2>&1
+    DATE=`date`
+    echo "${DATE}: ${i}th copy done with exit code $?" >> $LOG 2>&1
+    rm /tmp/${MACH_ID}_${i}_${ext}.tar
+    i=$[$i+1]
+}
+
+function loopminute()
+{
+    while true; do
+	sleep 60
+
+	num=`ls -l /dev/shm/share/stripe/root/ | wc -l` >> $LOG 2>&1
+	DATE=`date`
+	echo "${DATE}: there are $num result files in output" >> $LOG 2>&1
+	if [ "${num}" -gt "1" ]; then
+	    send minute
+	fi
+	DATE=`date`
+        echo "${DATE}: loopminute over" >> $LOG 2>&1
+    done
+}
+
+function loopsecond()
+{
+    while true; do
+	sleep 1
+	filesize=`ls -l /dev/shm/share/stripe/root/ | awk 'NR>1 {a[1]=a[1]+$5} END{print a[1]}'`
+	if [ "${filesize}" -gt "268000000" ]; then
+	    DATE=`date`
+	    echo "${DATE}: $filesize reaches limit" >> $LOG 2>&1
+	    mkdir ${FLAG}
+	    send seconds
+	    rmdir ${FLAG}
+	    DATE=`date`
+	    echo "${DATE}: $filesize reaches limit over" >> $LOG 2>&1
+	fi	    
+    done
+}
+
+#loopsecond &
+loopminute
\ No newline at end of file


Property changes on: SwiftApps/LigandAtlas/MTIO/bin/collector.sh
___________________________________________________________________
Name: svn:executable
   + *

Added: SwiftApps/LigandAtlas/MTIO/bin/hashserver.rb
===================================================================
--- SwiftApps/LigandAtlas/MTIO/bin/hashserver.rb	                        (rev 0)
+++ SwiftApps/LigandAtlas/MTIO/bin/hashserver.rb	2009-03-30 16:49:57 UTC (rev 2784)
@@ -0,0 +1,26 @@
+#!/home/espinosa/local/bin/ruby
+
+require 'drb'
+
+class HashServer
+  attr_reader :file
+
+  def initialize
+    @file = {}
+  end
+
+  def put(fname, rank)
+    @file[fname] = rank
+  end
+
+  def get(fname)
+    @file[fname]
+  end
+
+end
+
+server = HashServer.new
+
+DRb.start_service('druby://*:9000', server)
+DRb.thread.join
+


Property changes on: SwiftApps/LigandAtlas/MTIO/bin/hashserver.rb
___________________________________________________________________
Name: svn:executable
   + *

Added: SwiftApps/LigandAtlas/MTIO/bin/ipcal
===================================================================
(Binary files differ)


Property changes on: SwiftApps/LigandAtlas/MTIO/bin/ipcal
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: SwiftApps/LigandAtlas/MTIO/bin/torus-falkon-start-bgp-ram.sh
===================================================================
--- SwiftApps/LigandAtlas/MTIO/bin/torus-falkon-start-bgp-ram.sh	                        (rev 0)
+++ SwiftApps/LigandAtlas/MTIO/bin/torus-falkon-start-bgp-ram.sh	2009-03-30 16:49:57 UTC (rev 2784)
@@ -0,0 +1,174 @@
+#!/bin/bash
+
+
+ if [ -z "$3" ]; then 
+              echo "usage: $0 <QueueName> <NumNodes> <MaxTimeMin>"
+              echo "usage: $0 prod 1024 60"
+              echo "-- or --"
+              echo "usage: $0 <QueueName> <NumNodes> <MaxTimeMin> <WorkersPerNode>"
+              echo "usage: $0 prod 1024 60 4"
+              exit 1
+          fi
+
+          
+if [ -z "${FALKON_HOME}" ]; then
+    echo "ERROR: environment variable FALKON_HOME not defined"
+    exit 1
+fi
+
+
+QUEUE_NAME=$1
+PROFILE_NAME="zeptocn"
+NUM_NODES=$2
+let NUM_ION=NUM_NODES/64
+MAX_TIME_MIN=$3
+SERVICE_IP="192.168.1.254"
+SERVICE_PORT1=55000
+SERVICE_PORT2=55001
+WORKERS_PER_NODE=4
+if [ ! -z $4 ];then
+   WORKERS_PER_NODE=$4
+fi 
+
+
+cp /home/zzhang/cio/bin/zoid-user-script.sh ${HOME}/zoid-user-script.sh
+chmod +x ${HOME}/zoid-user-script.sh
+
+FALKON_JOB_ID=`falkon-id-get.sh N/A`                   
+EXIT_CODE=$? 
+
+
+    if [ "${EXIT_CODE}" -ne "0" ]; then
+    echo "Error in geting a unique falkon ID.. 'falkon-get-id.sh N/A'"
+    cqdel ${ZOID_JOB_ID}
+    exit ${EXIT_CODE}
+    fi
+
+
+
+#ZOID_JOB_ID=`cqsub -q ${QUEUE_NAME} -k ${PROFILE_NAME} -C ${HOME} -t ${MAX_TIME_MIN} -n ${NUM_NODES} -e LD_LIBRARY_PATH=/lib:/fuse/lib:/fuse/usr/lib /bgsys/linux/1.2.020080512/bin/bash /home/zzhang/falkon/worker/run.worker-c-bgp.sh ${SERVICE_IP} ${SERVICE_PORT1} ${SERVICE_PORT2} ${WORKERS_PER_NODE} ${USER} ${FALKON_JOB_ID} ${FALKON_ROOT}`
+
+ZOID_JOB_ID=`cqsub -q ${QUEUE_NAME} -k ${PROFILE_NAME} -C ${HOME} -t ${MAX_TIME_MIN} -n ${NUM_NODES} -e LD_LIBRARY_PATH=/lib:/fuse/lib:/fuse/usr/lib /bgsys/linux/1.2.020080512/bin/bash /home/zzhang/cio/bin/cnip-work.sh ${SERVICE_IP} ${SERVICE_PORT1} ${SERVICE_PORT2} ${WORKERS_PER_NODE} ${USER} ${FALKON_JOB_ID} ${FALKON_ROOT}`
+
+#ZOID_JOB_ID=`cqsub -q ${QUEUE_NAME} -k ${PROFILE_NAME} -C ${HOME} -t ${MAX_TIME_MIN} -n ${NUM_NODES} -e LD_LIBRARY_PATH=/lib:/fuse/lib:/fuse/usr/lib /bin/sleep 1800`
+
+EXIT_CODE=$? 
+
+    if [ "${EXIT_CODE}" -ne "0" ]; then
+    echo "Error in submitting job to Cobalt.. 'cqsub -q ${QUEUE_NAME} -k ${PROFILE_NAME} -C ${HOME} -t ${MAX_TIME_MIN} -n ${NUM_NODES} -e LD_LIBRARY_PATH=/lib:/fuse/lib:/fuse/usr/lib /bgsys/linux/1.2.020080512/bin/bash /fuse/${FALKON_WORKER_HOME}/run.worker-c-bgp.sh ${SERVICE_IP} ${SERVICE_PORT1} ${SERVICE_PORT2} ${WORKERS_PER_NODE} ${USER} ${FALKON_JOB_ID} ${FALKON_ROOT}' "
+    exit ${EXIT_CODE}
+    fi
+
+falkon-id-update.sh ${FALKON_JOB_ID} ${ZOID_JOB_ID}
+
+EXIT_CODE=$? 
+
+    if [ "${EXIT_CODE}" -ne "0" ]; then
+    echo "Error in updating cobalt job info for falkon.. 'falkon-update-id.sh ${ZOID_JOB_ID}'"
+    cqdel ${ZOID_JOB_ID}
+    exit ${EXIT_CODE}
+    fi
+
+
+FALKON_JOBID_HOME=${FALKON_ROOT}/users/${USER}/${FALKON_JOB_ID}
+
+echo "Submitted job ${ZOID_JOB_ID} to Cobalt, creating the job specific Falkon tree for logs and configuration in ${FALKON_JOBID_HOME}..."     
+                                            
+mkdir -p ${FALKON_JOBID_HOME}
+
+cp ${FALKON_HOME}/falkon.env.bgp* ${FALKON_JOBID_HOME}/
+cp -r ${FALKON_HOME}/config ${FALKON_JOBID_HOME}/
+cp ${FALKON_JOBID_HOME}/config/Client-service-URIs.config2 ${FALKON_JOBID_HOME}/config/Client-service-URIs.config
+mkdir -p ${FALKON_JOBID_HOME}/logs/client ${FALKON_JOBID_HOME}/logs/service ${FALKON_JOBID_HOME}/logs/provisioner ${FALKON_JOBID_HOME}/logs/worker
+
+                           
+DATE=`date +%s`      
+echo "$DATE: pre-creating log dirs for Falkon service..."
+RACK_START=0
+RACK_END=48
+SEQUENCE_DIR=`seq -w ${RACK_START} ${RACK_END}`
+PSET_START=1
+PSET_END=16
+for a in ${SEQUENCE_DIR}
+do
+    for ((b=${PSET_START}; b <= ${PSET_END} ; b++))  # Double parentheses, and "LIMIT" with no "$".
+    do
+        DIR_NAME="ion-R${a}-${b}"
+        mkdir -p ${FALKON_JOBID_HOME}/logs/service/$DIR_NAME
+    done
+done
+
+for ((b=${PSET_START}; b <= ${PSET_END} ; b++))  # Double parentheses, and "LIMIT" with no "$".
+do
+        DIR_NAME="ion-${b}"
+        mkdir -p ${FALKON_JOBID_HOME}/logs/service/$DIR_NAME
+done
+
+
+DATE=`date +%s`      
+echo "$DATE: done creating log dirs for Falkon service!"
+
+
+
+DATE=`date +%s`      
+echo "$DATE: pre-creating data dirs for Falkon service..."
+RACK_START=0
+RACK_END=48
+SEQUENCE_DIR=`seq -w ${RACK_START} ${RACK_END}`
+PSET_START=1
+PSET_END=16
+for a in ${SEQUENCE_DIR}
+do
+    for ((b=${PSET_START}; b <= ${PSET_END} ; b++))  # Double parentheses, and "LIMIT" with no "$".
+    do
+        DIR_NAME="ion-R${a}-${b}"
+        mkdir -p ${FALKON_JOBID_HOME}/data/$DIR_NAME
+    done
+done
+
+for ((b=${PSET_START}; b <= ${PSET_END} ; b++))  # Double parentheses, and "LIMIT" with no "$".
+do
+        DIR_NAME="ion-${b}"
+        mkdir -p ${FALKON_JOBID_HOME}/data/$DIR_NAME
+done
+
+
+DATE=`date +%s`      
+echo "$DATE: done creating data dirs for Falkon service!"
+
+
+
+FALKON_HOME_RAM=/tmp/${USER}/falkon
+
+ln -s ${FALKON_HOME}/apps ${FALKON_JOBID_HOME}/apps
+ln -s ${FALKON_HOME_RAM}/container ${FALKON_JOBID_HOME}/container
+ln -s ${FALKON_HOME}/service ${FALKON_JOBID_HOME}/service
+ln -s ${FALKON_HOME}/worker ${FALKON_JOBID_HOME}/worker
+ln -s ${FALKON_HOME}/AstroPortal ${FALKON_JOBID_HOME}/AstroPortal
+ln -s ${FALKON_HOME}/client ${FALKON_JOBID_HOME}/client
+ln -s ${FALKON_HOME}/monitor ${FALKON_JOBID_HOME}/monitor
+ln -s ${FALKON_HOME}/bin ${FALKON_JOBID_HOME}/bin
+ln -s ${FALKON_HOME}/config ${FALKON_JOBID_HOME}/config
+ln -s ${FALKON_HOME}/ploticus ${FALKON_JOBID_HOME}/ploticus
+ln -s ${FALKON_HOME}/webserver ${FALKON_JOBID_HOME}/webserver
+ln -s ${FALKON_HOME}/workloads ${FALKON_JOBID_HOME}/workloads
+ln -s ${FALKON_HOME}/id ${FALKON_JOBID_HOME}/id
+ln -s ${FALKON_HOME}/apache-ant-1.7.0 ${FALKON_JOBID_HOME}/apache-ant-1.7.0
+ln -s ${FALKON_HOME}/ibm-java2-ppc64-50 ${FALKON_JOBID_HOME}/ibm-java2-ppc64-50
+ln -s ${FALKON_HOME_RAM}/ibm-java2-ppc-50 ${FALKON_JOBID_HOME}/ibm-java2-ppc-50
+ln -s ${FALKON_HOME}/falkon.tgz ${FALKON_JOBID_HOME}/falkon.tgz
+
+
+if [ ! -d "${FALKON_JOBID_HOME}" ]; then
+    echo "ERROR: invalid path ${FALKON_JOBID_HOME}... exiting"
+    cqdel ${ZOID_JOB_ID}
+    exit 1
+fi
+
+echo "Succesfully submitted the job to Cobalt, and setup job specific Falkon tree!"
+echo "To monitor the job status, type 'cqstat | grep ${USER}'; once it is in running state, you can use the Falkon specific command ...."
+echo "To submit your Falkon-based workload, type: ....; you can do this any time, the falkon workload will wait for the resources to come online, and will only be submitted when everything is ready; the script is run in the background, so the workload will run even if the ssh session gets disconnected."
+echo ""
+echo "Remember, your job id is ${ZOID_JOB_ID}, and if you need to look through the logs manually for anything, remember that you can find them at ${HOME}/${ZOID_JOB_ID}.output, ${HOME}/${ZOID_JOB_ID}.error, and ${FALKON_JOBID_HOME}/logs/..."
+
+


Property changes on: SwiftApps/LigandAtlas/MTIO/bin/torus-falkon-start-bgp-ram.sh
___________________________________________________________________
Name: svn:executable
   + *

Added: SwiftApps/LigandAtlas/MTIO/bin/toruscp.sh
===================================================================
--- SwiftApps/LigandAtlas/MTIO/bin/toruscp.sh	                        (rev 0)
+++ SwiftApps/LigandAtlas/MTIO/bin/toruscp.sh	2009-03-30 16:49:57 UTC (rev 2784)
@@ -0,0 +1,18 @@
+#!/fuse/bin/bash
+
+if [ -z "$2" ]; then
+    echo "usage: $0 <FileName> <Path>"
+    echo "usage: $0 hello /dev/shm"
+    exit 1
+fi
+
+FILENAME=$1
+FILEPATH=$2
+echo "Full name : $FILENAME"
+FILE=`basename $FILENAME`
+echo "FILE name: $FILENAME"
+RANK=`/home/zzhang/cio/bin/chtget.rb $FILENAME`
+echo "RANK: $RANK"
+IP=`/home/zzhang/cio/bin/ipcal 10.128.0.0 $RANK`
+echo "IP: $IP"
+/home/zzhang/chirp/bin/chirp_get -a address $IP $FILE $FILEPATH/$FILE


Property changes on: SwiftApps/LigandAtlas/MTIO/bin/toruscp.sh
___________________________________________________________________
Name: svn:executable
   + *

Added: SwiftApps/LigandAtlas/MTIO/bin/wrapper.sh
===================================================================
--- SwiftApps/LigandAtlas/MTIO/bin/wrapper.sh	                        (rev 0)
+++ SwiftApps/LigandAtlas/MTIO/bin/wrapper.sh	2009-03-30 16:49:57 UTC (rev 2784)
@@ -0,0 +1,288 @@
+# this script must be invoked inside of bash, not plain sh
+PATH=/fuse/bin:/fuse/usr/bin:$PATH
+infosection() {
+	echo >& "$INFO"
+	echo "_____________________________________________________________________________" >& "$INFO"
+	echo >& "$INFO"
+	echo "        $1" >& "$INFO" 
+	echo "_____________________________________________________________________________" >& "$INFO"
+	echo >& "$INFO"
+}
+
+info() {
+	infosection "uname -a"
+	uname -a 2>&1 >& "$INFO"
+	infosection "id"
+	id 2>&1 >& "$INFO"
+	infosection "env"
+	env 2>&1 >& "$INFO"
+	infosection "df"
+	df 2>&1 >& "$INFO"
+	infosection "/proc/cpuinfo"
+	cat /proc/cpuinfo 2>&1 >& "$INFO"
+	infosection "/proc/meminfo"
+	cat /proc/meminfo 2>&1 >& "$INFO"
+	infosection "command line"
+	echo $COMMANDLINE 2>&1 >& "$INFO"
+}
+
+logstate() {
+	echo "Progress " `date +"%Y-%m-%d %H:%M:%S"` " $@" >& "$INFO"
+}
+
+log() {
+	echo "$@" >& "$INFO"
+}
+
+fail() {
+	EC=$1
+	shift
+	log $@
+	info
+	exit $EC
+}
+
+checkError() {
+	if [ "$?" != "0" ]; then
+		fail $@
+	fi
+}
+
+checkEmpty() {
+	if [ "$1" == "" ]; then
+		shift
+		fail 254 $@
+	fi
+}
+
+getarg() {
+	NAME=$1
+	shift
+	VALUE=""
+	SHIFTCOUNT=0
+	if [ "$1" == "$NAME" ]; then
+		shift
+		let "SHIFTCOUNT=$SHIFTCOUNT+1"
+		while [ "${1:0:1}" != "-" ] && [ "$#" != "0" ]; do
+			VALUE="$VALUE $1"
+			shift
+			let "SHIFTCOUNT=$SHIFTCOUNT+1"
+		done
+	else
+		fail 254 "Missing $NAME argument"
+	fi
+	VALUE="${VALUE:1}"
+}
+
+openinfo() {
+	exec 3<> $1
+	INFO=3
+}
+
+closeinfo() {
+	exec 3>&-
+}
+
+cioinput() {
+    INPUT=$1
+    FILEPATH=`dirname $INPUT`
+    FILENAME=`basename $INPUT`
+    TYPE=${INPUT%%/*}
+    echo "INPUT_TYPE: $TYPE" >> /dev/shm/cio
+    if [ "$TYPE" == "common" ] && [ -e /dev/shm/share/$FILENAME ]; then
+	echo "cioinput(): link for common input $INPUT" >> /dev/shm/cio
+	ln -s "/dev/shm/share/$FILENAME" "$DIR/$L"
+    elif [ "$TYPE" == "_concurrent" ]; then
+	echo "cioinput(): toruscp for intermediate data $INPUT" >> /dev/shm/cio
+	mkdir -p $FILEPATH
+	echo "cioinput(): $DIR/$FILEPATH" >> /dev/shm/cio
+	/home/zzhang/cio/bin/toruscp.sh $FILENAME $DIR/$FILEPATH
+    else
+	echo "cioinput(): copy from GPFS $INPUT" >> /dev/shm/cio
+	cp "$PWD/shared/$L" "$DIR/$L"
+    fi
+}
+ciooutput() {
+    OUTPUT=$1
+    FILEPATH=`dirname $OUTPUT`
+    FILENAME=`basename $OUTPUT`
+    TYPE=${OUTPUT%%/*}
+    echo "OUTPUT_TYPE: $TYPE" >> /dev/shm/cio
+
+    if [ "$TYPE" == "_concurrent" ]; then
+	echo "ciooutput(): write intermediate data $OUTPUT" >> /dev/shm/cio
+	/home/zzhang/cio/bin/chtput.rb $FILENAME $RANK
+	cp $OUTPUT /dev/shm/share/
+    else
+	echo "ciooutput(): write regular data $OUTPUT" >> /dev/shm/cio
+	#dd if="$OUTPUT" of="$WFDIR/shared/$OUTPUT" bs=128k
+	echo "$OUTPUT /chirp/multi/${CHIRP_ADD}@stripe/" >> /dev/shm/chirp_add
+	cp "$OUTPUT" /chirp/multi/${CHIRP_ADD}@stripe/
+    fi
+}
+echo $@ >> /dev/shm/log
+RANK=`echo $CONTROL_INIT | awk -F, '{print $4}'`
+echo "RANK: $RANK" >> /dev/shm/log
+COMMANDLINE=$@
+WFDIR=$PWD
+ID=$1
+checkEmpty "$ID" "Missing job ID"
+
+shift
+
+getarg "-jobdir" "$@"
+JOBDIR=$VALUE
+shift $SHIFTCOUNT
+
+checkEmpty "$JOBDIR" "Missing job directory prefix"
+mkdir -p /dev/shm/swift-info/$JOBDIR
+
+closeinfo
+openinfo "/dev/shm/swift-info/$JOBDIR/${ID}-info"
+#openinfo "/dev/null"
+
+logstate "LOG_START"
+
+getarg "-e" "$@"
+EXEC=$VALUE
+shift $SHIFTCOUNT
+
+getarg "-out" "$@"
+STDOUT=$VALUE
+shift $SHIFTCOUNT
+
+getarg "-err" "$@"
+STDERR=$VALUE
+shift $SHIFTCOUNT
+
+getarg "-i" "$@"
+STDIN=$VALUE
+shift $SHIFTCOUNT
+
+getarg "-d" "$@"
+DIRS=$VALUE
+shift $SHIFTCOUNT
+
+getarg "-if" "$@"
+INF=$VALUE
+shift $SHIFTCOUNT
+
+getarg "-of" "$@"
+OUTF=$VALUE
+shift $SHIFTCOUNT
+
+getarg "-k" "$@"
+KICKSTART=$VALUE
+shift $SHIFTCOUNT
+
+if [ "$1" == "-a" ]; then
+	shift
+else
+	fail 254 "Missing arguments (-a option)"
+fi
+
+if [ "X$SWIFT_JOBDIR_PATH" != "X" ]; then
+  DIR=${SWIFT_JOBDIR_PATH}/$JOBDIR/$ID
+  COPYNOTLINK=1
+else
+  DIR=/dev/shm/swift-work/$JOBDIR/$ID
+  COPYNOTLINK=0
+fi
+
+PATH=$PATH:/bin:/usr/bin
+
+if [ "$PATHPREFIX" != "" ]; then
+export PATH=$PATHPREFIX:$PATH
+fi
+
+IFS="^"
+
+logstate "CREATE_JOBDIR"
+mkdir -p $DIR
+
+logstate "CREATE_INPUTDIR"
+
+for D in $DIRS ; do
+    mkdir -p "$DIR/$D"
+    checkError 254 "Failed to create input directory $D"
+done
+
+#cd $DIR
+logstate "LINK_INPUTS"
+for L in $INF ; do
+	if [ $COPYNOTLINK = 1 ]; then
+	        cp "$PWD/shared/$L" "$DIR/$L"
+		checkError 254 "Failed to copy input file $L"
+	else
+	    cioinput $L
+	        #cp "$PWD/shared/$L" "$DIR/$L"
+		checkError 254 "Failed to link input file $L"
+	fi
+done
+
+logstate "EXECUTE"
+
+cd $DIR
+
+if [ "$KICKSTART" == "" ]; then
+	if [ "$STDIN" == "" ]; then
+	    "$EXEC" "$@" 1>"$STDOUT" 2>"$STDERR"
+	else
+	    "$EXEC" "$@" 1>"$STDOUT" 2>"$STDERR" <"$STDIN"
+	fi
+	checkError $? "Exit code $?"
+else
+	if [ ! -f "$KICKSTART" ]; then
+		fail 254 "The Kickstart executable ($KICKSTART) was not found"		
+	elif [ ! -x "$KICKSTART" ]; then
+		fail 254 "The Kickstart executable ($KICKSTART) does not have the executable bit set"
+	else
+		mkdir -p $WFDIR/kickstart/$JOBDIR
+		if [ "$STDIN" == "" ]; then
+			"$KICKSTART" -H -o "$STDOUT" -e "$STDERR" "$TMPEXEC" "$@" 1>kickstart.xml 2>"$STDERR"
+		else
+			"$KICKSTART" -H -o "$STDOUT" -i "$STDIN" -e "$STDERR" "$TMPEXEC" "$@" 1>kickstart.xml 2>"$STDERR"
+		fi
+		export APPEXIT=$?
+		mv -f kickstart.xml "$WFDIR/kickstart/$JOBDIR/$ID-kickstart.xml" 2>&1 >& "$INFO"
+		checkError 254 "Failed to copy Kickstart record to shared directory"
+		if [ "$APPEXIT" != "0" ]; then
+			fail $APPEXIT "Exit code $APPEXIT"
+		fi
+	fi
+fi
+
+logstate "EXECUTE_DONE"
+
+MISSING=
+for O in $OUTF ; do
+	if [ ! -f "$DIR/$O" ]; then
+		if [ "$MISSING" == "" ]; then
+			MISSING=$O
+		else
+			MISSING="$MISSING, $O"
+		fi
+	fi
+done
+if [ "$MISSING" != "" ]; then
+	fail 254 "The following output files were not created by the application: $MISSING"
+fi
+
+logstate "COPYING_OUTPUTS"
+for O in $OUTF ; do
+	#cp "$DIR/$O" "$WFDIR/shared/$O" 2>&1 >& "$INFO"
+        #cp "$DIR/$O" "$WFDIR/shared/$O"
+        #dd if="$DIR/$O" of="$WFDIR/shared/$JOBDIR/$O" bs=128k
+        #dd if="$DIR/$O" of="$WFDIR/shared/$O" bs=128k
+        ciooutput $O
+	checkError 254 "Failed to copy output file $O to shared directory"
+done
+
+logstate "RM_JOBDIR"
+
+closeinfo
+#rm -f "$WFDIR/info/$JOBDIR/${ID}-info"
+#echo "$WFDIR/info/$JOBDIR/${ID}-info" >> /dev/shm/log
+#mkdir -p "$WFDIR/info/$JOBDIR/"
+#dd if=/dev/shm/swift-info/$JOBDIR/${ID}-info of="$WFDIR/info/$JOBDIR/${ID}-info" bs=128k
+#dd if=/dev/shm/swift-info/$JOBDIR/${ID}-info of="/fuse/tmp/${ID}-info" bs=128k

Added: SwiftApps/LigandAtlas/MTIO/bin/zoid-user-script.sh
===================================================================
--- SwiftApps/LigandAtlas/MTIO/bin/zoid-user-script.sh	                        (rev 0)
+++ SwiftApps/LigandAtlas/MTIO/bin/zoid-user-script.sh	2009-03-30 16:49:57 UTC (rev 2784)
@@ -0,0 +1,90 @@
+#!/bin/bash
+
+#IP=`hostname -i`
+#echo ${IP} >> /home/falkon/falkon/logs/provisioner/zoid-log.txt
+                       
+#startup
+    if [ "${1}" -eq "1" ]; then
+                            
+#ERROR_LOG=/home/falkon/users/error.log
+ERROR_LOG=/dev/null
+
+    echo "starting zoid-user-script.sh..." >> ${ERROR_LOG}
+    #echo "reviewing the command and arguements: $0 $1 $2 $3 $4 $5 $6 $7..." >> ${ERROR_LOG}
+    #tENV=`env`
+    #echo "reviewing the envirnoment: $tENV..." >> ${ERROR_LOG}
+
+original=$ZOID_JOB_ARGS
+a0=${original%%:*}; rest=${original#*:}
+a1=${rest%%:*}; rest=${rest#*:}
+a2=${rest%%:*}; rest=${rest#*:}
+a3=${rest%%:*}; rest=${rest#*:}
+a4=${rest%%:*}; rest=${rest#*:}
+a5=${rest%%:*}; rest=${rest#*:}
+a6=${rest%%:*}; rest=${rest#*:}
+a7=${rest%%:*};
+
+    
+    echo "reviewing the command and arguements: $a0 $a1 $a2 $a3 $a4 $a5 $a6 $a7..." >> ${ERROR_LOG}
+    
+    
+#FALKON_JOBID_HOME=/home/falkon/users/${USER}/${ZOID_JOB_ID}
+FALKON_JOBID_HOME=${a7}/users/${a5}/${a6}
+FALKON_HOME=${a7}/users/${a5}/${a6}
+    echo "FALKON_JOBID_HOME: $FALKON_JOBID_HOME" >> ${ERROR_LOG}
+MACH_ID=`uname -n`
+       #this should be done via some configuration parameter
+
+echo ${FALKON_JOBID_HOME}/data/${MACH_ID} >> /tmp/iohost
+if [ ! -d "${FALKON_JOBID_HOME}" ]; then
+    echo "ERROR: invalid path ${FALKON_JOBID_HOME}... exiting" >> ${ERROR_LOG}
+    exit 1
+fi
+
+
+
+    
+   cd ${FALKON_JOBID_HOME}
+   #source falkon.env.bgp-io
+
+   echo "ION at ${MACH_ID} ==> ${FALKON_HOME}..."  >> ${ERROR_LOG}
+
+    LOG_FILE_DEBUG="${FALKON_HOME}/logs/provisioner/STATUS_ION_${MACH_ID}"
+    DATE=`date`
+    echo "${DATE} : falkon-ion-start : starting the I/O node Falkon startup in the background..." >> ${LOG_FILE_DEBUG}
+
+
+if [ ! -e "${FALKON_HOME}/bin/falkon-ion-start-blocking-zeptocn.sh" ]; then
+    echo "ERROR: invalid script ${FALKON_HOME}/bin/falkon-ion-start-blocking-zeptocn.sh" >> ${ERROR_LOG}
+    exit 1
+fi
+
+     #used to run from GPFS
+    #${FALKON_JOBID_HOME}/bin/falkon-ion-start-blocking-zeptocn.sh ${FALKON_JOBID_HOME} &
+    #used to run from RAM
+    ${FALKON_JOBID_HOME}/bin/falkon-ion-start-blocking-zeptocn-ram.sh ${FALKON_JOBID_HOME} &
+
+
+    EXIT_CODE=$? 
+    DATE=`date`
+
+    echo "${DATE} : falkon-ion-start : completed the I/O node Falkon startup in the background..." >> ${LOG_FILE_DEBUG}
+
+   echo "ION at ${MACH_ID} finished OK!"  >> ${ERROR_LOG}
+
+                   
+exit ${EXIT_CODE}
+
+
+    fi
+
+
+                   
+#cleanup
+    if [ "${1}" -eq "0" ]; then
+        
+        killall -9 java                      
+        exit 0
+
+    fi
+    


Property changes on: SwiftApps/LigandAtlas/MTIO/bin/zoid-user-script.sh
___________________________________________________________________
Name: svn:executable
   + *

Added: SwiftApps/LigandAtlas/MTIO/lib/libcrypt.so.1
===================================================================
(Binary files differ)


Property changes on: SwiftApps/LigandAtlas/MTIO/lib/libcrypt.so.1
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: SwiftApps/LigandAtlas/MTIO/lib/libnsl.so.1
===================================================================
(Binary files differ)


Property changes on: SwiftApps/LigandAtlas/MTIO/lib/libnsl.so.1
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: SwiftApps/LigandAtlas/MTIO/lib/libresolv.so.2
===================================================================
(Binary files differ)


Property changes on: SwiftApps/LigandAtlas/MTIO/lib/libresolv.so.2
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream




More information about the Swift-commit mailing list