[Swift-commit] r7369 - SwiftApps/Swift-MapRed/mapred_combiner_V4

ketan at ci.uchicago.edu ketan at ci.uchicago.edu
Tue Dec 3 20:33:02 CST 2013


Author: ketan
Date: 2013-12-03 20:33:02 -0600 (Tue, 03 Dec 2013)
New Revision: 7369

Modified:
   SwiftApps/Swift-MapRed/mapred_combiner_V4/blastreduce.swift
   SwiftApps/Swift-MapRed/mapred_combiner_V4/reduce_wrapper.sh
   SwiftApps/Swift-MapRed/mapred_combiner_V4/tc.data
Log:
changes to reduce wrapper

Modified: SwiftApps/Swift-MapRed/mapred_combiner_V4/blastreduce.swift
===================================================================
--- SwiftApps/Swift-MapRed/mapred_combiner_V4/blastreduce.swift	2013-12-03 21:41:38 UTC (rev 7368)
+++ SwiftApps/Swift-MapRed/mapred_combiner_V4/blastreduce.swift	2013-12-04 02:33:02 UTC (rev 7369)
@@ -23,8 +23,27 @@
  fastasplitn filename(d) n;
 }
 
-app (fileptr out, file err) map_data (script wrapper, script map, query _queryfile, fastaseq _fastafile, string resfilename, string p, string e, string f, database db){
- bash @wrapper @map p filename(_queryfile) filename(_fastafile) resfilename e f stdout=@out stderr=@err;
+app (fileptr out, file err) map_data (
+script wrapper,
+script map,
+query _queryfile,
+fastaseq _fastafile,
+string resfilename,
+string p,
+string e,
+string f,
+database db){
+ bash 
+ @wrapper 
+ @map 
+ p 
+ filename(_queryfile) 
+ filename(_fastafile) 
+ resfilename 
+ e 
+ f 
+ stdout=@out 
+ stderr=@err;
 }
 
 app (fileptr out) aggregate (script a, fileptr map_results[]) {

Modified: SwiftApps/Swift-MapRed/mapred_combiner_V4/reduce_wrapper.sh
===================================================================
--- SwiftApps/Swift-MapRed/mapred_combiner_V4/reduce_wrapper.sh	2013-12-03 21:41:38 UTC (rev 7368)
+++ SwiftApps/Swift-MapRed/mapred_combiner_V4/reduce_wrapper.sh	2013-12-04 02:33:02 UTC (rev 7369)
@@ -10,26 +10,31 @@
 
 # The files passed here are filepointers which need to be resolved
 # before they can be processed by the core reduce function.
+
 ARGS=($*)
 USER_REDUCE_SCRIPT=${ARGS[0]}
 chmod a+x $USER_REDUCE_SCRIPT
 CMD=${ARGS[1]}
 FILES=(${ARGS[*]:2})
+
 LOGS=ON      # ON | OFF
 
+BEAGLE_USERNAME=ketan
+MIDWAY_USERNAME=maheshwari
+
 HOSTNAME=$(hostname -f)
 if   [[ "$HOSTNAME" == *midway* ]]; then # On midway node
-    EXECSERVER=/scratch/midway/yadunand/bin/exec_server
-    EXECCLIENT=/scratch/midway/yadunand/bin/exec_client
-    LOGFOLDER=/scratch/midway/yadunand
+    EXECSERVER=/scratch/midway/$MIDWAY_USERNAME/bin/exec_server
+    EXECCLIENT=/scratch/midway/$MIDWAY_USERNAME/bin/exec_client
+    LOGFOLDER=/scratch/midway/$MIDWAY_USERNAME
     FOLDER="/dev/shm"
     HOSTID="midway_$HOSTNAME"
     SITE="midway"
 
 elif [[ "$HOSTNAME" == *nid* ]]; then    # On beagle node
-    EXECSERVER=/lustre/beagle/yadunandb/bin/exec_server
-    EXECCLIENT=/lustre/beagle/yadunandb/bin/exec_client
-    LOGFOLDER=/lustre/beagle/yadunandb/Swift-MapRed/
+    EXECSERVER=/lustre/beagle/$BEAGLE_USERNAME/bin/exec_server
+    EXECCLIENT=/lustre/beagle/$BEAGLE_USERNAME/bin/exec_client
+    LOGFOLDER=/lustre/beagle/$BEAGLE_USERNAME/Swift-MapRed/
     FOLDER="/dev/shm"
     HOSTID="beagle_$HOSTNAME"
     SITE="beagle"
@@ -61,6 +66,7 @@
     else # Fetch to an identifiable file if remote
         log "chirp_get $REMOTE $TARGETFILE $REPODIR/$ID.$RANDOM.imd2"
         chirp_get $REMOTE $TARGETFILE $REPODIR/$ID.$RANDOM.imd2
+        RC=$?
     fi
 }
 
@@ -151,4 +157,4 @@
         echo "ERROR: Unknown reduction method requested" 1>&2
         ;;
 esac
-exit 0
+exit $RC

Modified: SwiftApps/Swift-MapRed/mapred_combiner_V4/tc.data
===================================================================
--- SwiftApps/Swift-MapRed/mapred_combiner_V4/tc.data	2013-12-03 21:41:38 UTC (rev 7368)
+++ SwiftApps/Swift-MapRed/mapred_combiner_V4/tc.data	2013-12-04 02:33:02 UTC (rev 7369)
@@ -6,6 +6,8 @@
 local  cat /bin/cat
 midway blastmerge /home/maheshwari/parallelblast_2.0.9/blastmerge
 midway blastall /home/maheshwari/blast-2.2.26/bin/blastall
+midway fastasplitn /home/maheshwari/parallelblast_2.0.9/fastasplitn
+midway formatdb /home/maheshwari/blast-2.2.26/bin/formatdb
 localhost fastasplitn /home/maheshwari/parallelblast_2.0.9/fastasplitn
 localhost formatdb /home/maheshwari/blast-2.2.26/bin/formatdb
 




More information about the Swift-commit mailing list