[Swift-commit] r2797 - in usertools/cio: . libexec libexec/falkon

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Wed Apr 1 16:26:00 CDT 2009


Author: aespinosa
Date: 2009-04-01 16:26:00 -0500 (Wed, 01 Apr 2009)
New Revision: 2797

Added:
   usertools/cio/libexec/
   usertools/cio/libexec/falkon/
   usertools/cio/libexec/falkon/runworker-bgp.sh
   usertools/cio/libexec/hashserver.rb
Removed:
   usertools/cio/libexec/falkon/ciologic-bgp.sh
Modified:
   usertools/cio/libexec/falkon/cobaltrun.job
   usertools/cio/libexec/falkon/falkon-start-bgp-cio.sh
Log:
Inserted libexec directories.  Scripts that are
indirectly called are placed in here


Copied: usertools/cio/libexec/falkon (from rev 2793, usertools/cio/falkon)

Deleted: usertools/cio/libexec/falkon/ciologic-bgp.sh
===================================================================
--- usertools/cio/falkon/ciologic-bgp.sh	2009-04-01 01:26:56 UTC (rev 2793)
+++ usertools/cio/libexec/falkon/ciologic-bgp.sh	2009-04-01 21:26:00 UTC (rev 2797)
@@ -1,136 +0,0 @@
-#!/fuse/bin/bash
-
-CIOROOT=/home/espinosa/cio
-ERROR_LOG=/dev/null
-
-if [ $# -lt 7 ]; then 
-  cat << EOF
-Usage: $0 <FALKON_IP> <TCPCORE_PORT1> <TCPCORE_PORT2> <NUM_WORKERS> <USER_ID> <FALKON_JOB_ID> <FALKON_ROOT_PATH> \
-    <PART_SIZE> <DATA_NUM> <STRIPE_SIZE>
-Example: $0 192.168.1.254 55000 55001 4 iraicu 0001 [FALKON_ROOT] \
-    1024 1 1"
-EOF
-  exit 2
-fi
-
-# Initiate the IP stack of the Torus network
-# -aespinosa
-
-/home/iskra/ZeptoOS/packages/cnip/prebuilt/cn-ipfwd.2409 &
-
-while [ ! -f /tmp/ifconfig.cmd ]; do
-    sleep 1
-done
-
-. /tmp/ifconfig.cmd
-
-RANK=`/home/espinosa/bin/rank`
-
-# size of the allocated partition.  also known as the total number of CNs
-PART_SIZE=$8
-# number of data CNs in partition
-DATA_NUM=$9
-STR=${10}
-
-ROLE=`/home/espinosa/bin/isdata $PART_SIZE $DATA_NUM $STR`
-ISDATA=$ROLE
-tmp=`/home/espinosa/bin/getdata $PART_SIZE $DATA_NUM $STR`
-DATACN=`/fuse/gpfs/home/espinosa/bin/ipcal 10.128.0.0 $tmp`
-
-if [ $RANK -eq 0 ]; then
-  # Run Central Hash Service
-  $CIOROOT/tools/hashserver.rb
-elif [ "$ISDATA" != 'app' ]; then
-  if [ "$ROLE" = 'head' ]; then
-    # Run head IFS service
-    $CIOROOT/tools/ifshead.sh $DATACN $STR >&2 
-  else
-    # Contribute stripes to the IFS service
-    $CIOROOT/tools/ifsslave.sh $DATACN >&2
-  fi
-else
-  /bin/mkdir /dataifs
-  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lib:/fuse/lib:/usr/lib
-  sleep 30
-  # Contact and mount assigned IFS head
-  $CIOROOT/tools/ifsmount.sh $DATACN >&2
- 
-  echo "worker started..." >> ${ERROR_LOG}
-
-  # Regular Falkon worker startup script
-  
-  FALKON_SERVICE_IP=$1
-  TCPCORE_PORT1=$2
-  TCPCORE_PORT2=$3
-  NUM_WORKERS=$4
-  USER_ID=$5
-  FALKON_JOB_ID=$6
-  FALKON_ROOT_PATH=$7
-  
-           
-  FALKON_HOME=${FALKON_ROOT_PATH}/users/${USER_ID}/${FALKON_JOB_ID}
-
-  echo "FALKON_HOME = ${FALKON_HOME}" >> ${ERROR_LOG}
-
-  #FALKON_HOME=/home/falkon/falkon
-  
-  HOME=${FALKON_ROOT_PATH}
-  echo "HOME = ${HOME}" >> ${ERROR_LOG}
-  #HOME=${FALKON_HOME}
-  
-  if [ -z "${FALKON_HOME}" ]; then
-      echo "ERROR: environment variable FALKON_HOME not defined"
-      echo "ERROR: environment variable FALKON_HOME not defined" >> ${ERROR_LOG}
-      exit 1
-  fi
-
-  if [ ! -d "${FALKON_HOME}" ]; then
-      echo "ERROR: invalid FALKON_HOME set: $FALKON_HOME"
-      echo "ERROR: invalid FALKON_HOME set: $FALKON_HOME" >> ${ERROR_LOG}
-      exit 1
-  fi
-  
-  cd ${FALKON_HOME}                     
-  source falkon.env.bgp-cn
-            
-  
-  
-  HOME_PATH=`pwd`
-  export MACH_ID=`uname -i`
-  RAND_ID2=`/home/espinosa/bin/rank`
-  
-  a0=${RAND_ID2%%=*}; rest=${RAND_ID2#*=}
-  RAND_ID=${rest%%=*};
-  
-  #PLATFORM=`uname -m`
-  
-  
-  
-  EXP_START=`date +%Y.%m.%d_%H.%M.%S`
-  
-  
-  for ((b=1; b < ${NUM_WORKERS} ; b++))
-  do
-    #LOG_FILE=${FALKON_LOGS}/worker/${RAND_ID}.${b}.${EXP_START}.txt
-    LOG_FILE=/dev/null
-  
-    #${FALKON_WORKER_HOME}/src-c/BGexec_${PLATFORM} ${FALKON_SERVICE_IP} ${TCPCORE_PORT1} ${TCPCORE_PORT2} -perf >> "${LOG_FILE}" 2>&1 &
-    #echo "starting .... ${FALKON_WORKER_HOME}/src-c/BGexec ${FALKON_SERVICE_IP} ${TCPCORE_PORT1} ${TCPCORE_PORT2} -perf"
-    echo "starting worker ${RAND_ID} CPU ${b}..." >> ${ERROR_LOG}
-    ${FALKON_WORKER_HOME}/src-c/BGexec ${FALKON_SERVICE_IP} ${TCPCORE_PORT1} ${TCPCORE_PORT2} -perf >> ${LOG_FILE} 2>&1 &
-    #${HOME_PATH}/src-c/BGexec_${PLATFORM} ${FALKON_SERVICE_IP} 55000 55001 -debug	
-    /bin/sleep 1
-  done           
-  
-  #LOG_FILE=${FALKON_LOGS}/worker/${RAND_ID}.${NUM_WORKERS}.${EXP_START}.txt
-  LOG_FILE=/dev/null
-  echo "starting worker ${RAND_ID} CPU ${NUM_WORKERS}..." >> ${ERROR_LOG}
-  
-  #${FALKON_WORKER_HOME}/src-c/BGexec_${PLATFORM} ${FALKON_SERVICE_IP} ${TCPCORE_PORT1} ${TCPCORE_PORT2} -perf >> "${LOG_FILE}" 2>&1
-  #echo "starting .... ${FALKON_WORKER_HOME}/src-c/BGexec ${FALKON_SERVICE_IP} ${TCPCORE_PORT1} ${TCPCORE_PORT2} -perf"
-  
-  ${FALKON_WORKER_HOME}/src-c/BGexec ${FALKON_SERVICE_IP} ${TCPCORE_PORT1} ${TCPCORE_PORT2} -perf >> ${LOG_FILE} 2>&1
-  
-  
-  echo "finished!" >> ${ERROR_LOG}
-fi

Modified: usertools/cio/libexec/falkon/cobaltrun.job
===================================================================
--- usertools/cio/falkon/cobaltrun.job	2009-04-01 01:26:56 UTC (rev 2793)
+++ usertools/cio/libexec/falkon/cobaltrun.job	2009-04-01 21:26:00 UTC (rev 2797)
@@ -1 +1 @@
-./falkon-start-bgp-logging.sh default 64 60 4
+./falkon-start-bgp-cio.sh default 64 15 4 1 3

Modified: usertools/cio/libexec/falkon/falkon-start-bgp-cio.sh
===================================================================
--- usertools/cio/falkon/falkon-start-bgp-cio.sh	2009-04-01 01:26:56 UTC (rev 2793)
+++ usertools/cio/libexec/falkon/falkon-start-bgp-cio.sh	2009-04-01 21:26:00 UTC (rev 2797)
@@ -1,7 +1,5 @@
 #!/bin/bash
 
-CIOROOT=/home/espinosa/cio
-
 if [ $# -lt 3 ]; then
   cat << EOF
 Usage: $0 <QueueName> <NumNodes> <WallTime>
@@ -17,6 +15,14 @@
   echo "ERROR: environment variable FALKON_HOME not defined"
   exit 1
 fi
+if [ -z $CIOROOT ]; then
+  echo "ERROR: CIOROOT env not defined"
+  exit 1
+fi
+if [[ $CIOARCH != "bgp" ]]; then
+  echo "ERROR: Wrong architecture. Must be bgp"
+  exit 1
+fi
 
 PROFILE_NAME="zeptocn"
 QUEUE_NAME=$1
@@ -30,17 +36,17 @@
 WORKERS_PER_NODE=4
 DATA_NUM=1
 STR=1
-if [ -n $4 ];then
+if [ -n "$4" ];then
    WORKERS_PER_NODE=$4
 fi 
-if [ -n $5 ];then
+if [ -n "$5" ];then
    DATA_NUM=$5
 fi 
-if [ -n $6 ];then
+if [ -n "$6" ];then
    STR=$6
+   echo true
 fi 
 
-
 cp ${FALKON_HOME}/bin/zoid-user-script.sh ${HOME}/zoid-user-script.sh
 chmod +x ${HOME}/zoid-user-script.sh
 
@@ -55,13 +61,14 @@
 
 
 
-WORKER_SCRIPT=$CIOROOT/falkon/ciologic-bgp.sh
+WORKER_SCRIPT=$CIOROOT/bin/ciologic-$CIOARCH.sh
 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 \
+	-e LD_LIBRARY_PATH=/lib:/fuse/lib:/fuse/usr/lib:CIOROOT=$CIOROOT:CIOARCH=$CIOARCH:CHIRPROOT=$CHIRPROOT  \
 	/bgsys/linux/1.2.020080512/bin/bash $WORKER_SCRIPT \
 	${SERVICE_IP} ${SERVICE_PORT1} ${SERVICE_PORT2} ${WORKERS_PER_NODE} \
-	${USER} ${FALKON_JOB_ID} ${FALKON_ROOT} ${NUM_NODES} ${DATA_NUM} ${STR}`
+	${USER} ${FALKON_JOB_ID} ${FALKON_ROOT} \
+    $NUM_NODES $DATA_NUM $STR` # MTIO parameters
 
 EXIT_CODE=$? 
 

Added: usertools/cio/libexec/falkon/runworker-bgp.sh
===================================================================
--- usertools/cio/libexec/falkon/runworker-bgp.sh	                        (rev 0)
+++ usertools/cio/libexec/falkon/runworker-bgp.sh	2009-04-01 21:26:00 UTC (rev 2797)
@@ -0,0 +1,100 @@
+#!/fuse/bin/bash
+
+#source /home/iraicu/.bashrc
+
+#ERROR_LOG=${FALKON_ROOT_PATH}/users/error.log
+#ERROR_LOG=/home/falkon/users/error-workers.log
+ERROR_LOG=/dev/null
+                    echo "worker started..." >> ${ERROR_LOG}
+
+           
+ if [ -z "$7" ]; then 
+              echo "usage: $0 <FALKON_IP> <TCPCORE_PORT1> <TCPCORE_PORT2> <NUM_WORKERS> <USER_ID> <FALKON_JOB_ID> <FALKON_ROOT_PATH>"
+              echo "usage: $0 <FALKON_IP> <TCPCORE_PORT1> <TCPCORE_PORT2> <NUM_WORKERS> <USER_ID> <FALKON_JOB_ID> <FALKON_ROOT_PATH>" >> ${ERROR_LOG}
+              echo "$0 192.168.1.254 55000 55001 4 iraicu 0001"
+              echo "$0 192.168.1.254 55000 55001 4 iraicu 0001" >> ${ERROR_LOG}
+              exit 2
+          fi
+
+FALKON_SERVICE_IP=$1
+TCPCORE_PORT1=$2
+TCPCORE_PORT2=$3
+NUM_WORKERS=$4
+USER_ID=$5
+FALKON_JOB_ID=$6
+FALKON_ROOT_PATH=$7
+
+         
+                  ln -s /fuse/gpfs1 /gpfs1
+                  #FALKON_HOME=/gpfs1/falkon/falkon
+                  #HOME=/gpfs1/falkon
+
+
+
+                  #echo "Worker for job id ${ZOID_JOB_ID} starting..." >> ${ERROR_LOG}
+
+                  FALKON_HOME=${FALKON_ROOT_PATH}/users/${USER_ID}/${FALKON_JOB_ID}
+
+                  echo "FALKON_HOME = ${FALKON_HOME}" >> ${ERROR_LOG}
+
+                  #FALKON_HOME=/home/falkon/falkon
+                  
+                  HOME=${FALKON_ROOT_PATH}
+                  echo "HOME = ${HOME}" >> ${ERROR_LOG}
+                  #HOME=${FALKON_HOME}
+
+                if [ -z "${FALKON_HOME}" ]; then
+                    echo "ERROR: environment variable FALKON_HOME not defined"
+                    echo "ERROR: environment variable FALKON_HOME not defined" >> ${ERROR_LOG}
+                    exit 1
+                fi
+
+                if [ ! -d "${FALKON_HOME}" ]; then
+                    echo "ERROR: invalid FALKON_HOME set: $FALKON_HOME"
+                    echo "ERROR: invalid FALKON_HOME set: $FALKON_HOME" >> ${ERROR_LOG}
+                    exit 1
+                fi
+
+cd ${FALKON_HOME}                     
+source falkon.env.bgp-cn
+          
+
+
+
+HOME_PATH=`pwd`
+#export MACH_ID=`uname -i`
+RAND_ID2=`grep BG_RANK /proc/personality.sh`
+
+a0=${RAND_ID2%%=*}; rest=${RAND_ID2#*=}
+RAND_ID=${rest%%=*};
+
+#PLATFORM=`uname -m`
+
+
+
+EXP_START=`date +%Y.%m.%d_%H.%M.%S`
+
+for ((b=1; b < ${NUM_WORKERS} ; b++))
+do
+            #LOG_FILE=${FALKON_LOGS}/worker/${RAND_ID}.${b}.${EXP_START}.txt
+            LOG_FILE=/dev/null
+
+            #${FALKON_WORKER_HOME}/src-c/BGexec_${PLATFORM} ${FALKON_SERVICE_IP} ${TCPCORE_PORT1} ${TCPCORE_PORT2} -perf >> "${LOG_FILE}" 2>&1 &
+            #echo "starting .... ${FALKON_WORKER_HOME}/src-c/BGexec ${FALKON_SERVICE_IP} ${TCPCORE_PORT1} ${TCPCORE_PORT2} -perf"
+            echo "starting worker ${RAND_ID} CPU ${b}..." >> ${ERROR_LOG}
+            /home/zzhang/falkon/worker/src-c/BGexec_new ${FALKON_SERVICE_IP} ${TCPCORE_PORT1} ${TCPCORE_PORT2} -perf >> ${LOG_FILE} 2>&1 &
+            #${HOME_PATH}/src-c/BGexec_${PLATFORM} ${FALKON_SERVICE_IP} 55000 55001 -debug	
+/bin/sleep 1
+done           
+
+                         #LOG_FILE=${FALKON_LOGS}/worker/${RAND_ID}.${NUM_WORKERS}.${EXP_START}.txt
+            LOG_FILE=/dev/null
+            echo "starting worker ${RAND_ID} CPU ${NUM_WORKERS}..." >> ${ERROR_LOG}
+
+             #${FALKON_WORKER_HOME}/src-c/BGexec_${PLATFORM} ${FALKON_SERVICE_IP} ${TCPCORE_PORT1} ${TCPCORE_PORT2} -perf >> "${LOG_FILE}" 2>&1
+            #echo "starting .... ${FALKON_WORKER_HOME}/src-c/BGexec ${FALKON_SERVICE_IP} ${TCPCORE_PORT1} ${TCPCORE_PORT2} -perf"
+             /home/zzhang/falkon/worker/src-c/BGexec_new ${FALKON_SERVICE_IP} ${TCPCORE_PORT1} ${TCPCORE_PORT2} -perf >> ${LOG_FILE} 2>&1
+
+
+ echo "finished!" >> ${ERROR_LOG}
+


Property changes on: usertools/cio/libexec/falkon/runworker-bgp.sh
___________________________________________________________________
Name: svn:executable
   + *

Copied: usertools/cio/libexec/hashserver.rb (from rev 2793, usertools/cio/tools/hashserver.rb)
===================================================================
--- usertools/cio/libexec/hashserver.rb	                        (rev 0)
+++ usertools/cio/libexec/hashserver.rb	2009-04-01 21:26:00 UTC (rev 2797)
@@ -0,0 +1,26 @@
+#!/home/espinosa/local/bin/ruby
+
+require 'drb'
+
+class HashServer
+  attr_reader :file
+
+  def initialize
+    @file = Hash.new { |hash, key| hash[key] = Array.new }
+  end
+
+  def put(fname, rank)
+    @file[fname] << rank
+  end
+
+  def get(fname)
+    @file[fname][ rand( @file[fname].size ) ]
+  end
+
+end
+
+server = HashServer.new
+
+DRb.start_service('druby://*:9000', server)
+DRb.thread.join
+




More information about the Swift-commit mailing list