[Swift-commit] r6918 - SwiftApps/Swift-MapRed/swift-t-simple/put-get

wozniak at ci.uchicago.edu wozniak at ci.uchicago.edu
Wed Aug 21 15:29:16 CDT 2013


Author: wozniak
Date: 2013-08-21 15:29:16 -0500 (Wed, 21 Aug 2013)
New Revision: 6918

Modified:
   SwiftApps/Swift-MapRed/swift-t-simple/put-get/job.sh
Log:
Don't use parrot- local execution only


Modified: SwiftApps/Swift-MapRed/swift-t-simple/put-get/job.sh
===================================================================
--- SwiftApps/Swift-MapRed/swift-t-simple/put-get/job.sh	2013-08-21 20:28:51 UTC (rev 6917)
+++ SwiftApps/Swift-MapRed/swift-t-simple/put-get/job.sh	2013-08-21 20:29:16 UTC (rev 6918)
@@ -5,15 +5,27 @@
 OUTPUT=$1
 INPUT=$2
 
+# Maximal job runtime
+MAX_TIME=1
+
+HOST=$( hostname )
+
+echo "JOB: ${HOST} rank=${PMI_RANK} ${OUTPUT} ${INPUT}"
+
+cd ${HOME}/CR/${HOST}
+
 export PARROT_TIMEOUT=5
 
 # Retrieve input
 NAME=$( basename ${INPUT} )
-parrot_run cp -v ${INPUT} /tmp/${NAME}
+cp -v ${INPUT} /tmp/${NAME}
 
-# Emulate some compute time (0-9 seconds based on my PID)
-DELAY=$(( ${$} % 10 + 1))
+echo RANK $PMI_RANK
+
+# Emulate some compute time (0-9 seconds based on PID, rank, and nanos)
+RANDOM=$(( ${$} + ${PMI_RANK} + $( date +%N ) ))
+DELAY=$(( ${RANDOM} % ${MAX_TIME} + 1))
 sleep ${DELAY}
 
 # Store output
-parrot_run cp -v /tmp/${NAME} ${OUTPUT}
+cp -v /tmp/${NAME} ${OUTPUT}




More information about the Swift-commit mailing list