[Swift-commit] r6336 - trunk/libexec

davidk at ci.uchicago.edu davidk at ci.uchicago.edu
Wed Mar 6 07:50:14 CST 2013


Author: davidk
Date: 2013-03-06 07:50:13 -0600 (Wed, 06 Mar 2013)
New Revision: 6336

Modified:
   trunk/libexec/_swiftwrap.wrapperstaging
Log:
Use dd for stageouts


Modified: trunk/libexec/_swiftwrap.wrapperstaging
===================================================================
--- trunk/libexec/_swiftwrap.wrapperstaging	2013-03-06 07:24:13 UTC (rev 6335)
+++ trunk/libexec/_swiftwrap.wrapperstaging	2013-03-06 13:50:13 UTC (rev 6336)
@@ -69,7 +69,6 @@
 stagein() {
 	SRC=$1
 	DST=$2
-  	
 	case $SRC in
 		*://*)
 			;;
@@ -82,7 +81,7 @@
 	
 	case $SRC in
 		file://*)
-			SRC=${SRC#file://}
+			SRC=${SRC#file://*/}
 			log "Copying $SRC to $DST"
 			if [ ! -f $SRC ]; then
 				fail 254 "Cannot stage in $SRC. File not found."
@@ -123,7 +122,7 @@
 			DIR=`dirname $DST`
 			mkdir -p $DIR
 			log "Copying $SRC to $DST"
-			cp $SRC $DST 2>&1 >& "$INFO"
+			dd if=$SRC of=$DST bs=16M 2>&1 >& "$INFO"
 			;;
 		*://*)
 			fail 254 "Cannot handle protocol ${DST%%://*}"
@@ -427,6 +426,7 @@
 log "CDM_FILE=$CDM_FILE"
 log "ARGS=$@"
 log "ARGC=$#"
+
 [ -n $MPI_RANK ] && log "MPI_RANK=$MPI_RANK" && log "PMI_RANK=$PMI_RANK"
 IFS="|"
 
@@ -456,9 +456,7 @@
 			continue
 		fi
 	
-                SRC=$( localPath $L )
-                DST=$DIR/$( localPath $L )
-                stagein $SRC $DST
+                stagein $L "$DIR/`localPath $L`"
 	done
 	
 	if [[ $CDM_FILE != "" ]]; then




More information about the Swift-commit mailing list