[Swift-commit] r6874 - SwiftApps/Swift-MapRed/TurboChirp

yadunandb at ci.uchicago.edu yadunandb at ci.uchicago.edu
Thu Aug 15 15:15:38 CDT 2013


Author: yadunandb
Date: 2013-08-15 15:15:38 -0500 (Thu, 15 Aug 2013)
New Revision: 6874

Added:
   SwiftApps/Swift-MapRed/TurboChirp/local_combiner.sh
Modified:
   SwiftApps/Swift-MapRed/TurboChirp/combiner.sh
   SwiftApps/Swift-MapRed/TurboChirp/jobs_per_site.sh
   SwiftApps/Swift-MapRed/TurboChirp/run.sh
   SwiftApps/Swift-MapRed/TurboChirp/teragen.swift
   SwiftApps/Swift-MapRed/TurboChirp/teragen.tcl
Log:
Minor update

Modified: SwiftApps/Swift-MapRed/TurboChirp/combiner.sh
===================================================================
--- SwiftApps/Swift-MapRed/TurboChirp/combiner.sh	2013-08-15 18:31:07 UTC (rev 6873)
+++ SwiftApps/Swift-MapRed/TurboChirp/combiner.sh	2013-08-15 20:15:38 UTC (rev 6874)
@@ -2,16 +2,12 @@
 # The combiner is expecting to receive filenames as args
 # Each file would contains strings in the format HOSTNAME FILEPATH
 
-ARGS=($*)
-PASSED_SITE=${ARGS[0]}
-FILES=(${ARGS[*]:1})
+touch COMBINER_WORKED
+FILES=($*)
 
 #CURRENT_HOST=$(hostname -f)
 CURRENT_HOST=$HOSTNAME
 
-# debug
-#[ "$CURRENT_HOST" == "$PASSED_HOST" ] &&  echo "Local combination";
-
 SUM=0
 COUNT=0
 
@@ -36,16 +32,17 @@
 
 ID=$RANDOM
 for file_token in ${FILES[*]}
-do
-    echo $file_token
+do  
     fetch_and_process $file_token $ID &    
 done
 wait
 
+TOKEN=($(cat ${FILES[0]}))
+CHIRP_FOLDER=$(dirname ${TOKEN[1]})
+
 SUM=$(awk '{ sum += $1 } END { print sum }' $ID*imd2)
 COUNT=$(awk '{ sum += $2 } END { print sum }' $ID*imd2)
-
-echo "$SUM $COUNT" > $CURRENT_HOST.$ID.imd
-echo "$CURRENT_HOST $CURRENT_HOST.$ID.imd"
+echo "$SUM $COUNT" > $CHIRP_FOLDER/$CURRENT_HOST.$ID.imd
+echo "$CURRENT_HOST $CHIRP_FOLDER/$CURRENT_HOST.$ID.imd"
 rm $ID*{imd,imd2} &> /dev/null &
 exit 0
\ No newline at end of file

Modified: SwiftApps/Swift-MapRed/TurboChirp/jobs_per_site.sh
===================================================================
--- SwiftApps/Swift-MapRed/TurboChirp/jobs_per_site.sh	2013-08-15 18:31:07 UTC (rev 6873)
+++ SwiftApps/Swift-MapRed/TurboChirp/jobs_per_site.sh	2013-08-15 20:15:38 UTC (rev 6874)
@@ -7,8 +7,7 @@
 
 for SITE in ${SITES[*]}
 do
-#    FILES=$(grep $SITE tmp | awk '{print $2}')
-    FILES=$(grep -l $SITE tgen*out)
+    FILES=$(grep -l $SITE intermediate/tgen*out)
     echo $SITE ${FILES[*]}
 done
 rm tmp;
\ No newline at end of file

Added: SwiftApps/Swift-MapRed/TurboChirp/local_combiner.sh
===================================================================
--- SwiftApps/Swift-MapRed/TurboChirp/local_combiner.sh	                        (rev 0)
+++ SwiftApps/Swift-MapRed/TurboChirp/local_combiner.sh	2013-08-15 20:15:38 UTC (rev 6874)
@@ -0,0 +1,49 @@
+#!/bin/bash
+# The combiner is expecting to receive filenames as args
+# Each file would contains strings in the format HOSTNAME FILEPATH
+
+ARGS=($*)
+PASSED_SITE=${ARGS[0]}
+FILES=(${ARGS[*]:1})
+
+#CURRENT_HOST=$(hostname -f)
+CURRENT_HOST=$HOSTNAME
+
+SUM=0
+COUNT=0
+
+fetch_and_process()
+{
+    TOKEN=($(cat $1))
+    HOST=${TOKEN[0]}
+    FILE=${TOKEN[1]}
+    TARGET=$(basename $FILE)
+    if [ "$HOST" != "$CURRENT_HOST" ]
+    then
+        # Fetch if file is remote
+        chirp_get $HOST $TARGET /tmp/$TARGET.imd
+        RES=($(awk '{ sum += $1 } END { print sum,NR }' /tmp/$TARGET.imd))
+        rm /tmp/$TARGET.imd &> /dev/null &
+    else
+        # Process directly if file is local
+        RES=($(awk '{ sum += $1 } END { print sum,NR }' $FILE))
+    fi
+    echo "${RES[0]} ${RES[1]}" > "$2.$RANDOM.imd2"
+}
+
+ID=$RANDOM
+for file_token in ${FILES[*]}
+do  
+    fetch_and_process $file_token $ID &    
+done
+wait
+
+TOKEN=($(cat ${FILES[0]}))
+CHIRP_FOLDER=$(dirname ${TOKEN[1]})
+
+SUM=$(awk '{ sum += $1 } END { print sum }' $ID*imd2)
+COUNT=$(awk '{ sum += $2 } END { print sum }' $ID*imd2)
+echo "$SUM $COUNT" > $CHIRP_FOLDER/$CURRENT_HOST.$ID.imd
+echo "$CURRENT_HOST $CHIRP_FOLDER/$CURRENT_HOST.$ID.imd"
+rm $ID*{imd,imd2} &> /dev/null &
+exit 0
\ No newline at end of file


Property changes on: SwiftApps/Swift-MapRed/TurboChirp/local_combiner.sh
___________________________________________________________________
Added: svn:executable
   + *

Modified: SwiftApps/Swift-MapRed/TurboChirp/run.sh
===================================================================
--- SwiftApps/Swift-MapRed/TurboChirp/run.sh	2013-08-15 18:31:07 UTC (rev 6873)
+++ SwiftApps/Swift-MapRed/TurboChirp/run.sh	2013-08-15 20:15:38 UTC (rev 6874)
@@ -13,5 +13,6 @@
 stc $PROG > ${PROG%.swift}.tcl
 [ "$?" == "0" ] && echo "Compile done"
 #turbine -n 8 ${PROG%.swift}.tcl
-turbine -l -V -n 10 -f hosts.txt ${PROG%.swift}.tcl -loop=10 -fsize=1 >& ${PROG%.swift}.out
+#turbine -l -V -n 10 -f hosts.txt ${PROG%.swift}.tcl -loop=10 -fsize=1 >& ${PROG%.swift}.out
+turbine -n 10 -f hosts.txt ${PROG%.swift}.tcl -loop=10 -fsize=1
 [ "$?" == "0" ] && echo "Execute done"

Modified: SwiftApps/Swift-MapRed/TurboChirp/teragen.swift
===================================================================
--- SwiftApps/Swift-MapRed/TurboChirp/teragen.swift	2013-08-15 18:31:07 UTC (rev 6873)
+++ SwiftApps/Swift-MapRed/TurboChirp/teragen.swift	2013-08-15 20:15:38 UTC (rev 6874)
@@ -46,25 +46,30 @@
     string sites[] = split(read(combiner_list), "\n");
         
 
-    file combine = input_file("combiner.sh");
+    file local_combine = input_file("local_combiner.sh");
     //Here we are forcing jobs to sites to run local combiners
     file comb_out[];
     foreach site,i in sites {
         file out1 <sprintf("intermediate/sitecomb_%i.out", i)>;
         file err1 <sprintf("intermediate/sitecomb_%i.err", i)>;
         string site_info[] = split(site, " ");
-        printf("Site: %s String: %s\n", site_info[0], site);
         location rank = hostmap_one(site_info[0]);
-        printf("Site: %s Rank: %i", site_info[0], rank);
+
+        //printf("Site: %s Rank: %i String: %s\n", site_info[0], rank, site);
         
-        //(out1, err1) = comb_data_local(combine, site);
-        
-        // Todo : Find @location usage        
-        (out1, err1) = @location=rank comb_data_local(combine, site);        
+        (out1, err1) = @location=rank comb_data_local(local_combine, site);        
         comb_out[i] = out1;    
     }
-
-    // Here's where we do a K_way reduce of the comb_out array
-
+    
+    foreach file_item in comb_out {
+      printf("Item in comb_out : %s \n", filename(file_item));
+    }
+    
+    file combine = input_file("combiner.sh");
+    // We are doing a simple single step reduce here
+    file final <"final_result">;
+    file errs  <"final_errs">;
+    (final, errs) = comb_data (combine, comb_out );
+    
 }
 

Modified: SwiftApps/Swift-MapRed/TurboChirp/teragen.tcl
===================================================================
--- SwiftApps/Swift-MapRed/TurboChirp/teragen.tcl	2013-08-15 18:31:07 UTC (rev 6873)
+++ SwiftApps/Swift-MapRed/TurboChirp/teragen.tcl	2013-08-15 20:15:38 UTC (rev 6874)
@@ -1,11 +1,11 @@
 
 # Generated by stc version 0.2.0
-# date                    : 2013/08/15 11:25:08
+# date                    : 2013/08/15 15:10:03
 # Turbine version         : 0.3.0
-# Input filename          : /nfs2/ketan/Swift-MapRed/TurboChirp/teragen.swift
-# Output filename         : /nfs2/ketan/Swift-MapRed/TurboChirp
+# Input filename          : /nfs2/yadunand/Swift-MapRed/TurboChirp/teragen.swift
+# Output filename         : /nfs2/yadunand/Swift-MapRed/TurboChirp
 # STC home                : /nfs2/wozniak/Public/stc
-# Turbine home            : /home/wozniak/Public/turbine
+# Turbine home            : /homes/wozniak/Public/turbine
 # Compiler settings:
 # stc.auto-declare              : true
 # stc.c_preprocess              : true
@@ -53,7 +53,7 @@
 # stc.rpath                     : 
 # stc.stc_home                  : /nfs2/wozniak/Public/stc
 # stc.turbine.version           : 0.3.0
-# stc.turbine_home              : /home/wozniak/Public/turbine
+# stc.turbine_home              : /homes/wozniak/Public/turbine
 # stc.version                   : 0.2.0
 
 # Metadata:
@@ -76,6 +76,9 @@
     global c:s_jobs_per_s
     turbine::allocate_custom c:s_jobs_per_s string 1 1 1
     turbine::store_string ${c:s_jobs_per_s} "jobs_per_site.sh"
+    global c:s_local_comb
+    turbine::allocate_custom c:s_local_comb string 1 1 1
+    turbine::store_string ${c:s_local_comb} "local_combiner.sh"
     global c:s_teragen_wr
     turbine::allocate_custom c:s_teragen_wr string 1 1 1
     turbine::store_string ${c:s_teragen_wr} "teragen_wrap.sh"
@@ -437,6 +440,7 @@
     turbine::c::log "enter function: main"
     set stack 0
     global c:s_jobs_per_s
+    global c:s_local_comb
     global c:s_teragen_wr
     global c:s_combiner_s
     global c:s__
@@ -445,13 +449,16 @@
     # Value __ov___t3 with type $string was defined
     # Value __ov_fsize with type $int was defined
     # Value __ov___t7 with type $int was defined
-    lassign [ adlb::multicreate [ list container integer file_ref 1 1 ] [ list integer 1 ] [ list container integer ref 1 1 ] [ list string 2 ] [ list container integer ref 1 1 ] [ list string 1 ] ] u:tgen_out u:fsize t:5 t:14 u:sites t:15
+    lassign [ adlb::multicreate [ list container integer file_ref 1 1 ] [ list integer 1 ] [ list container integer ref 1 1 ] [ list string 2 ] [ list container integer ref 1 1 ] [ list string 1 ] [ list container integer file_ref 1 1 ] [ list string 2 ] [ list string 2 ] ] u:tgen_out u:fsize t:5 t:14 u:sites t:15 u:comb_out t:37 t:38
     turbine::c::log "allocated u:tgen_out=<${u:tgen_out}> u:fsize=<${u:fsize}> t:5=<${t:5}> t:14=<${t:14}> u:sites=<${u:sites}>"
-    turbine::c::log "allocated t:15=<${t:15}>"
+    turbine::c::log "allocated t:15=<${t:15}> u:comb_out=<${u:comb_out}> t:37=<${t:37}> t:38=<${t:38}>"
     turbine::allocate_file2 u:wrapper "" 1
     turbine::allocate_file2 u:jobs_per_site "" 1
     turbine::allocate_file2 u:combiner_list ${t:14} 1
+    turbine::allocate_file2 u:local_combine "" 1
     turbine::allocate_file2 u:combine "" 1
+    turbine::allocate_file2 u:final ${t:37} 1
+    turbine::allocate_file2 u:errs ${t:38} 1
     # Swift l.27: assigning expression to wrapper
     turbine::input_file [ list ${u:wrapper} ] [ list ${c:s_teragen_wr} ]
     # Swift l.31: assigning expression to loop
@@ -470,12 +477,20 @@
     f:get_uniq_sites ${stack} ${u:combiner_list} ${u:jobs_per_site} ${u:tgen_out} -100
     # Swift l.46: assigning expression to sites
     turbine::split [ list ${u:sites} ] [ list ${t:15} ${c:s__} ]
-    # Swift l.49: assigning expression to combine
+    # Swift l.49: assigning expression to local_combine
+    turbine::input_file [ list ${u:local_combine} ] [ list ${c:s_local_comb} ]
+    # Swift l.71: assigning expression to combine
     turbine::input_file [ list ${u:combine} ] [ list ${c:s_combiner_s} ]
+    turbine::store_string ${t:37} "final_result"
+    turbine::store_string ${t:38} "final_errs"
+    # Swift l.75: assigning expression to final
+    # Swift l.75: assigning expression to errs
+    f:comb_data ${stack} ${u:final} ${u:errs} ${u:combine} ${u:comb_out} -100
     # Swift l.38: assigning expression to out
     # Swift l.38: assigning expression to err
     # Swift l.39: assigning expression to tgen_out[_]
-    turbine::rule [ list ${u:sites} ] "main-foreach-wait1 ${stack} ${u:sites} {${u:combine}}" type ${::turbine::LOCAL}
+    turbine::rule [ list ${u:sites} ] "main-foreach-wait1 ${stack} ${u:sites} {${u:local_combine}} ${u:comb_out}" type ${::turbine::LOCAL}
+    turbine::rule [ list ${u:comb_out} ] "main-foreach-wait2 ${stack} ${u:comb_out}" type ${::turbine::LOCAL}
     set tcltmp:container_sz [ adlb::enumerate ${t:5} count all 0 ]
     set tcltmp:iters ${tcltmp:container_sz}
     turbine::file_read_refcount_incr ${u:wrapper} [ expr { ${tcltmp:iters} - 1 } ]
@@ -485,11 +500,14 @@
     main-foreach0:outer ${stack} ${u:wrapper} ${u:fsize} ${u:tgen_out} ${t:5} 0 [ expr { ${tcltmp:container_sz} - 1 } ] 1
     turbine::rule [ list [ turbine::get_file_status ${u:combiner_list} ] ] "main-call_builtin-read ${stack} ${t:15} {${u:combiner_list}}" type ${::turbine::WORK}
     turbine::read_refcount_decr ${u:tgen_out} 1
+    turbine::file_read_refcount_decr ${u:errs} 1
     turbine::file_read_refcount_decr ${u:jobs_per_site} 1
+    turbine::file_read_refcount_decr ${u:final} 1
+    turbine::file_read_refcount_decr ${u:combine} 1
 }
 
 
-proc main-foreach-wait1 { stack u:sites u:combine } {
+proc main-foreach-wait1 { stack u:sites u:local_combine u:comb_out } {
     # Swift l.55: assigning expression to site_info
     # Swift l.56 evaluating  expression and throwing away 1 results
     # Swift l.57: assigning expression to rank
@@ -500,32 +518,33 @@
     set tcltmp:container_sz [ adlb::enumerate ${u:sites} count all 0 ]
     set tcltmp:iters ${tcltmp:container_sz}
     turbine::read_refcount_incr ${u:sites} [ expr { ${tcltmp:iters} - 1 } ]
-    turbine::file_read_refcount_incr ${u:combine} [ expr { ${tcltmp:iters} - 1 } ]
-    main-foreach1:outer ${stack} ${u:combine} ${u:sites} 0 [ expr { ${tcltmp:container_sz} - 1 } ] 1
+    turbine::file_read_refcount_incr ${u:local_combine} [ expr { ${tcltmp:iters} - 1 } ]
+    adlb::write_refcount_incr ${u:comb_out} [ expr { ${tcltmp:iters} - 1 } ]
+    main-foreach1:outer ${stack} ${u:local_combine} ${u:comb_out} ${u:sites} 0 [ expr { ${tcltmp:container_sz} - 1 } ] 1
 }
 
 
-proc main-foreach1:outer { stack u:combine u:sites tcltmp:lo tcltmp:hi tcltmp:inc } {
+proc main-foreach1:outer { stack u:local_combine u:comb_out u:sites tcltmp:lo tcltmp:hi tcltmp:inc } {
     set tcltmp:itersleft [ expr { max(0,(${tcltmp:hi} - ${tcltmp:lo}) / ${tcltmp:inc} + 1) } ]
     if { [ expr { ${tcltmp:itersleft} <= 0 } ] } {
         return
     }
     if { [ expr { ${tcltmp:itersleft} <= 64 } ] } {
-        main-foreach1:inner ${stack} ${u:combine} ${u:sites} ${tcltmp:lo} ${tcltmp:hi} ${tcltmp:inc}
+        main-foreach1:inner ${stack} ${u:local_combine} ${u:comb_out} ${u:sites} ${tcltmp:lo} ${tcltmp:hi} ${tcltmp:inc}
     } else {
         set tcltmp:skip [ expr { ${tcltmp:inc} * max(64,((${tcltmp:itersleft} - 1) / 16) + 1) } ]
         for { set tcltmp:splitstart ${tcltmp:lo} } { ${tcltmp:splitstart} <= ${tcltmp:hi} } { incr tcltmp:splitstart ${tcltmp:skip} } {
             set tcltmp:splitend [ expr { min(${tcltmp:hi},${tcltmp:splitstart} + ${tcltmp:skip} - 1) } ]
             set tcltmp:prio [ turbine::get_priority ]
             turbine::set_priority ${tcltmp:prio}
-            adlb::spawn 1 "command main-foreach1:outer ${stack} {${u:combine}} ${u:sites} ${tcltmp:splitstart} ${tcltmp:splitend} ${tcltmp:inc}"
+            adlb::spawn 1 "command main-foreach1:outer ${stack} {${u:local_combine}} ${u:comb_out} ${u:sites} ${tcltmp:splitstart} ${tcltmp:splitend} ${tcltmp:inc}"
             turbine::reset_priority
         }
     }
 }
 
 
-proc main-foreach1:inner { stack u:combine u:sites tcltmp:lo tcltmp:hi tcltmp:inc } {
+proc main-foreach1:inner { stack u:local_combine u:comb_out u:sites tcltmp:lo tcltmp:hi tcltmp:inc } {
     set tcltmp:splitlen [ expr { ${tcltmp:hi} - ${tcltmp:lo} + 1 } ]
     set tcltmp:contents [ adlb::enumerate ${u:sites} dict ${tcltmp:splitlen} ${tcltmp:lo} ]
     dict for {v:i0 u:site} ${tcltmp:contents} {
@@ -534,7 +553,7 @@
         # Value __ov___t20 with type $string was defined
         lassign [ adlb::multicreate [ list string 2 ] [ list string 2 ] [ list container integer ref 1 1 ] [ list string 1 ] [ list ref 1 ] ] t:18 t:20 u:site_info t:25 t:26
         turbine::c::log "allocated t:18=<${t:18}> t:20=<${t:20}> u:site_info=<${u:site_info}> t:25=<${t:25}> t:26=<${t:26}>"
-        turbine::allocate_file2 u:out1 ${t:18} 0
+        turbine::allocate_file2 u:out1 ${t:18} 1
         turbine::allocate_file2 u:err1 ${t:20} 0
         turbine::read_refcount_incr ${u:site} 2
         set optv:__t18 [ eval format [ list "intermediate/sitecomb_%i.out" ${v:i0} ] ]
@@ -544,23 +563,24 @@
         turbine::split [ list ${u:site_info} ] [ list ${u:site} ${c:s__-1} ]
         turbine::container_reference ${u:site_info} 0 ${t:26} ref
         turbine::dereference_string ${t:25} ${t:26}
-        turbine::rule [ list ${t:25} ] "main-optmerged ${stack} ${u:site} {${u:combine}} ${t:25} {${u:out1}} {${u:err1}}"
+        turbine::container_insert ${u:comb_out} ${v:i0} ${u:out1} file_ref 1
+        turbine::rule [ list ${t:25} ] "main-optmerged ${stack} ${u:site} {${u:local_combine}} ${t:25} {${u:out1}} {${u:err1}}"
     }
     set tcltmp:iters [ expr { max(0,(${tcltmp:hi} - ${tcltmp:lo}) / ${tcltmp:inc} + 1) } ]
     turbine::read_refcount_decr ${u:sites} [ expr { ${tcltmp:iters} } ]
 }
 
 
-proc main-optmerged { stack u:site u:combine t:25 u:out1 u:err1 } {
+proc main-optmerged { stack u:site u:local_combine t:25 u:out1 u:err1 } {
     # Value __ov___t25:1 with type $string was defined
     # Value __ov_rank with type $int was defined
     # Value __ov___t29 with type $void was defined
     set optv:__t25:1 [ turbine::retrieve_string ${t:25} CACHED 1 ]
     set optv:rank [ draw [ adlb::hostmap ${optv:__t25:1} ] ]
-    f:comb_data_local ${stack} ${u:out1} ${u:err1} ${u:combine} ${u:site} ${optv:rank}
+    f:comb_data_local ${stack} ${u:out1} ${u:err1} ${u:local_combine} ${u:site} ${optv:rank}
     set optv:__t29 [ turbine::printf_local "Site: %s Rank: %i" ${optv:__t25:1} ${optv:rank} ]
     turbine::rule [ list ${u:site} ] [ list main-call_builtin-printf ${stack} ${u:site} ${optv:__t25:1} ]
-    turbine::file_read_refcount_decr ${u:combine} 1
+    turbine::file_read_refcount_decr ${u:local_combine} 1
 }
 
 
@@ -572,6 +592,58 @@
 }
 
 
+proc main-foreach-wait2 { stack u:comb_out } {
+    # Swift l.68 evaluating  expression and throwing away 1 results
+    set tcltmp:container_sz [ adlb::enumerate ${u:comb_out} count all 0 ]
+    set tcltmp:iters ${tcltmp:container_sz}
+    turbine::read_refcount_incr ${u:comb_out} [ expr { ${tcltmp:iters} - 1 } ]
+    main-foreach2:outer ${stack} ${u:comb_out} 0 [ expr { ${tcltmp:container_sz} - 1 } ] 1
+}
+
+
+proc main-foreach2:outer { stack u:comb_out tcltmp:lo tcltmp:hi tcltmp:inc } {
+    set tcltmp:itersleft [ expr { max(0,(${tcltmp:hi} - ${tcltmp:lo}) / ${tcltmp:inc} + 1) } ]
+    if { [ expr { ${tcltmp:itersleft} <= 0 } ] } {
+        return
+    }
+    if { [ expr { ${tcltmp:itersleft} <= 64 } ] } {
+        main-foreach2:inner ${stack} ${u:comb_out} ${tcltmp:lo} ${tcltmp:hi} ${tcltmp:inc}
+    } else {
+        set tcltmp:skip [ expr { ${tcltmp:inc} * max(64,((${tcltmp:itersleft} - 1) / 16) + 1) } ]
+        for { set tcltmp:splitstart ${tcltmp:lo} } { ${tcltmp:splitstart} <= ${tcltmp:hi} } { incr tcltmp:splitstart ${tcltmp:skip} } {
+            set tcltmp:splitend [ expr { min(${tcltmp:hi},${tcltmp:splitstart} + ${tcltmp:skip} - 1) } ]
+            set tcltmp:prio [ turbine::get_priority ]
+            turbine::set_priority ${tcltmp:prio}
+            adlb::spawn 1 "command main-foreach2:outer ${stack} ${u:comb_out} ${tcltmp:splitstart} ${tcltmp:splitend} ${tcltmp:inc}"
+            turbine::reset_priority
+        }
+    }
+}
+
+
+proc main-foreach2:inner { stack u:comb_out tcltmp:lo tcltmp:hi tcltmp:inc } {
+    set tcltmp:splitlen [ expr { ${tcltmp:hi} - ${tcltmp:lo} + 1 } ]
+    set tcltmp:contents [ adlb::enumerate ${u:comb_out} members ${tcltmp:splitlen} ${tcltmp:lo} ]
+    foreach u:file_item ${tcltmp:contents} {
+        lassign [ adlb::multicreate [ list string 1 ] ] t:35
+        turbine::c::log "allocated t:35=<${t:35}>"
+        turbine::file_read_refcount_incr ${u:file_item} 1
+        turbine::filename2 [ list ${t:35} ] [ list ${u:file_item} ]
+        turbine::rule [ list ${t:35} ] "main-call_builtin-printf-1 ${stack} ${t:35}"
+    }
+    set tcltmp:iters [ expr { max(0,(${tcltmp:hi} - ${tcltmp:lo}) / ${tcltmp:inc} + 1) } ]
+    turbine::read_refcount_decr ${u:comb_out} [ expr { ${tcltmp:iters} } ]
+}
+
+
+proc main-call_builtin-printf-1 { stack t:35 } {
+    # Value __ov___t35 with type $string was defined
+    # Value __ov___t33 with type $void was defined
+    set optv:__t35 [ turbine::retrieve_string ${t:35} CACHED 1 ]
+    set optv:__t33 [ turbine::printf_local "Item in comb_out : %s \n" ${optv:__t35} ]
+}
+
+
 proc main-foreach0:outer { stack u:wrapper u:fsize u:tgen_out t:5 tcltmp:lo tcltmp:hi tcltmp:inc } {
     set tcltmp:itersleft [ expr { max(0,(${tcltmp:hi} - ${tcltmp:lo}) / ${tcltmp:inc} + 1) } ]
     if { [ expr { ${tcltmp:itersleft} <= 0 } ] } {




More information about the Swift-commit mailing list