[Swift-commit] r7884 - trunk/libexec

hategan at ci.uchicago.edu hategan at ci.uchicago.edu
Thu May 29 04:21:56 CDT 2014


Author: hategan
Date: 2014-05-29 04:21:53 -0500 (Thu, 29 May 2014)
New Revision: 7884

Modified:
   trunk/libexec/_swiftwrap
Log:
Don't overwrite the DIR variable; only do the collect if MPI rank 0

Modified: trunk/libexec/_swiftwrap
===================================================================
--- trunk/libexec/_swiftwrap	2014-05-29 09:18:27 UTC (rev 7883)
+++ trunk/libexec/_swiftwrap	2014-05-29 09:21:53 UTC (rev 7884)
@@ -547,19 +547,21 @@
 	fi
 fi
 
-if [ "$COLLECT" != "" ]; then
-	logstate "COLLECT"
-	log "Collect list is $COLLECT"
-	exec 4<> "$WFDIR/shared/${ID}-collect"
-	for O in "$COLLECT" ; do
-		log "Collecting $O"
-		ls -1 $O >&4
-		for OO in $O ; do
-			DIR=`dirname "$OO"`
-			mv $OO "$WFDIR/shared/$DIR" 2>&1 >& "$INFO"
+if [[ $MPI_RANK == "" || $MPI_RANK == 0 ]]; then
+	if [ "$COLLECT" != "" ]; then
+		logstate "COLLECT"
+		log "Collect list is $COLLECT"
+		exec 4<> "$WFDIR/shared/${ID}-collect"
+		for O in "$COLLECT" ; do
+			log "Collecting $O"
+			ls -1 $O >&4
+			for OO in $O ; do
+				OODIR=`dirname "$OO"`
+				mv $OO "$WFDIR/shared/$OODIR" 2>&1 >& "$INFO"
+			done
 		done
-	done
-	exec 4>&-
+		exec 4>&-
+	fi
 fi
 
 log "Moving back to workflow directory $WFDIR"




More information about the Swift-commit mailing list