Index: doc/theses/colby_parsons_MMAth/benchmarks/actors/plotData.py
===================================================================
--- doc/theses/colby_parsons_MMAth/benchmarks/actors/plotData.py	(revision ab81e3bb577dbeb1f47988d1cc15235bf7e1dc6f)
+++ doc/theses/colby_parsons_MMAth/benchmarks/actors/plotData.py	(revision ab81e3bb577dbeb1f47988d1cc15235bf7e1dc6f)
@@ -0,0 +1,129 @@
+import os
+import sys
+import time
+import matplotlib.pyplot as plt
+import matplotlib.ticker as ticks
+import math
+from scipy import stats as st
+import numpy as np
+from enum import Enum
+from statistics import median
+
+readfile = open(sys.argv[1], "r")
+
+# first line has num times per experiment
+line = readfile.readline()
+numTimes = int(line)
+
+# second line has processor args
+line = readfile.readline()
+procs = []
+for val in line.split():
+    procs.append(int(val))
+
+# 3rd line has number of variants
+line = readfile.readline()
+names = line.split()
+numVariants = len(names)
+
+lines = (line.rstrip() for line in readfile) # All lines including the blank ones
+lines = (line for line in lines if line) # Non-blank lines
+
+class Bench(Enum):
+    Unset = 0
+    Executor = 1
+    Matrix = 2
+    Repeat = 3
+    Balance_One = 4
+    Balance_Multi = 5
+    Static = 7
+    Dynamic = 8
+
+nameSet = False
+currBench = Bench.Unset # default val
+count = 0
+procCount = 0
+currVariant = 0
+name = ""
+var_name = ""
+data = [[0.0 for i in range(len(procs))] for j in range(numVariants)]
+bars = [[[0.0 for i in range(len(procs))],[0.0 for k in range(len(procs))]] for j in range(numVariants)]
+tempData = [0.0 for i in range(numTimes)]
+for idx, line in enumerate(lines):
+    # print(line)
+    
+    if currBench == Bench.Unset:
+        if line == "executor":
+            name = "Executor"
+            currBench = Bench.Executor
+        elif line == "matrix":
+            name = "Matrix"
+            currBench = Bench.Matrix
+        elif line == "repeat":
+            name = "Repeat"
+            currBench = Bench.Repeat
+        elif line == "balance_one":
+            name = "Balance_One"
+            currBench = Bench.Balance_One
+        elif line == "balance_multi":
+            name = "Balance_Multi"
+            currBench = Bench.Balance_Multi
+        elif line == "static":
+            name = "Static"
+            currBench = Bench.Static
+        elif line == "dynamic":
+            name = "Dynamic"
+            currBench = Bench.Dynamic
+        else:
+            print("Expected benchmark name")
+            sys.exit()
+        continue
+
+    if line[0:4] == "proc":
+        continue
+
+    if currBench == Bench.Static or currBench == Bench.Dynamic:
+        print("NOT YET IMPLEMENTED")
+        sys.exit()
+    else:
+        if not nameSet:
+            nameSet = True
+            continue
+        
+        lineArr = line.split()
+        tempData[count] = float(lineArr[-1])
+        count += 1
+        if count == numTimes:
+            currMedian = median( tempData )
+            data[currVariant][procCount] = currMedian
+            lower, upper = st.t.interval(0.95, numTimes - 1, loc=np.mean(tempData), scale=st.sem(tempData))
+            bars[currVariant][0][procCount] = currMedian - lower
+            bars[currVariant][1][procCount] = upper - currMedian
+            count = 0
+            procCount += 1
+
+            if procCount == len(procs):
+                procCount = 0
+                nameSet = False
+                currVariant += 1
+
+                if currVariant == numVariants:
+                    fig, ax = plt.subplots()
+                    plt.title(name + " Benchmark")
+                    plt.ylabel("Runtime (seconds)")
+                    plt.xlabel("Cores")
+                    for idx, arr in enumerate(data):
+                        plt.errorbar( procs, arr, [bars[idx][0], bars[idx][1]], capsize=2, marker='o' )
+                    if currBench == Bench.Executor or currBench == Bench.Matrix or currBench == Bench.Balance_One or currBench == Bench.Repeat:
+                        plt.yscale("log")
+                        plt.ylim(1, None)
+                        ax.get_yaxis().set_major_formatter(ticks.ScalarFormatter())
+                    else:
+                        plt.ylim(0, None)
+                    ax.legend(names)
+                    fig.savefig("plots/" + name + ".png")
+                    fig.clf()
+
+                    # reset
+                    currBench = Bench.Unset
+                    currVariant = 0
Index: doc/theses/colby_parsons_MMAth/benchmarks/actors/run
===================================================================
--- doc/theses/colby_parsons_MMAth/benchmarks/actors/run	(revision b86d14c0dd9ebe67e025cb4b308ecd73f007bbab)
+++ doc/theses/colby_parsons_MMAth/benchmarks/actors/run	(revision ab81e3bb577dbeb1f47988d1cc15235bf7e1dc6f)
@@ -85,28 +85,14 @@
 }
 
-numtimes=5
-
-# bench_cores='1 2 4 8 16 24 32'
-bench_cores='8 16 24 32 48'
-# bench_cores='32'
-
-# toggle benchmarks
-executor=${true}
-matrix=${true}
-repeat=${true}
-balance=${true}
-static=${false}
-dynamic=${false}
-
 # executor config
-batch='1'
-nRounds='500'
+batch='100'
+nRounds='400' #500
 
 # matrix config
-size='3000'
+size='3072'
 
 # repeat config
 messages='100000'
-n_repeats='100'
+n_repeats='200' #200
 
 # balance config
@@ -115,26 +101,52 @@
 
 # static config
-n_static_sends='10000000'
+n_static_sends='100000000'
 
 # dynamic config
-n_dynamic_sends='10000000'
-
-# names=('NOSTEAL' 'CLOSE' 'SEARCH')
-# var_flags=('-D__STEAL=1 -DRAND=1' '-D__STEAL=1 -DCLOSE=1' '-D__STEAL=1 -DSEARCH=1')
-
-names=('SEARCH')
+n_dynamic_sends='20000000'
+
+numtimes=5
+
+# bench_cores='1 2 4 8 16 24 32'
+# bench_cores='1 2 4 8 16 24 32 48'
+bench_cores='48'
+
+# toggle benchmarks
+executor=${false}
+matrix=${false}
+repeat=${false}
+balance=${false}
+static=${true}
+dynamic=${true}
+
+# names=('CFA-LV' 'CFA-NS' 'CFA-R')
+# var_flags=('-D__STEAL=1 -DSEARCH=1' '' '-D__STEAL=1 -DRAND=1')
+
+# names=('CFA-NS')
+# var_flags=('')
+
+names=('CFA')
 var_flags=('-D__STEAL=1 -DSEARCH=1')
 
-
-# names=('NOSTEAL' 'SEARCH' 'RAND' 'SEARCHC' 'RANDC')
-# var_flags=('' '-D__STEAL=1 -DSEARCH=1' '-D__STEAL=1 -DRAND=1' '-D__STEAL=1 -DSEARCH=1 -DCYCLE' '-D__STEAL=1 -DRAND=1 -DCYCLE')
-
-# names=('NOSTEAL' 'RAND' 'CLOSE' 'SEARCH')
-# var_flags=('' '-D__STEAL=1 -DRAND=1' '-D__STEAL=1 -DCLOSE=1' '-D__STEAL=1 -DSEARCH=1')
-
-cfa_flags='-quiet -O3 -nodebug -DNDEBUG'
+# names=('CFA' 'CFA-STAT')
+# var_flags=('-D__STEAL=1 -DSEARCH=1' '-D__STEAL=1 -DSTATS')
+
+# names=()
+# var_flags=()
+
+runCAF=${true}
+runUCPP=${true}
+runPROTO=${true}
+runAKKA=${true}
+# runCAF=${false}
+# runUCPP=${false}
+# runPROTO=${false}
+# runAKKA=${false}
 
 cfa=~/cfa-cc/driver/cfa
 
+# Helpers to minimize code duplication
+
+# repeats a command ${numtimes}
 preprint=''
 repeat_command() {
@@ -147,6 +159,37 @@
 }
 
-arch nasus
-
+# prints the leading info for a given run of a variant
+print_header() {
+    echo ${1}':'
+    echo -e "proc\ttime (s)"
+}
+
+# runs the current benchmark with provided args
+# only works for standard-run benchmarks (not Akka)
+# must split into pre and post args to be able to supply val of p
+pre_args=''
+post_args=''
+single_run() {
+    affinity ${1}
+    preprint="${1}\t"
+    repeat_command taskset -c ${taskset} ./a.${hostname} ${pre_args} ${1} ${post_args}
+}
+
+# runs the current bench for all processor vals
+# works for standard benchs that dont need to set a config file (not Akka or CAF)
+run_bench() {
+    for p in ${bench_cores} ; do
+        single_run ${p}
+    done
+}
+
+set_akka_parallelism() {
+    sed -i "s/parallelism-min = .*/parallelism-min = ${1}/g" application.conf
+    sed -i "s/parallelism-max = .*/parallelism-max = ${1}/g" application.conf
+}
+
+arch # get hostname
+
+# set up leading info for python script
 echo $numtimes
 echo $bench_cores
@@ -155,107 +198,337 @@
         echo -n ${names[$i]}" "
 done
+if [ ${runCAF} -eq ${true} ] ; then
+    echo -n 'CAF '
+fi # done CAF
+if [ ${runAKKA} -eq ${true} ] ; then
+    echo -n 'Akka '
+fi # done AKKA
+if [ ${runUCPP} -eq ${true} ] ; then
+    echo -n 'uC++ '
+fi # done UCPP
+if [ ${runPROTO} -eq ${true} ] ; then
+    echo -n 'ProtoActor '
+fi
 echo ""
 
+# done printing header info for output
+
+# cfa flags
+cfa_flags='-quiet -O3 -nodebug -DNDEBUG'
+
+# CAF flags
+prefixCAF='-O3 -Wall -std=c++17 -I/home/pabuhr/software/nasus/Actors/experiments/CAF/actor-framework/libcaf_core -I/home/pabuhr/software/nasus/Actors/experiments/CAF/actor-framework/libcaf_core/caf -I/home/pabuhr/software/nasus/Actors/experiments/CAF/actor-framework/build/libcaf_core -L/home/pabuhr/software/nasus/Actors/experiments/CAF/actor-framework/build/libcaf_core -L/home/pabuhr/software/nasus/Actors/experiments/CAF/actor-framework/build/libcaf_io'
+suffixCAF='-lcaf_io -lcaf_core -Wl,-rpath=CAF/actor-framework/build/libcaf_core'
+
+# AKKA flags
+sbtflags="--warn -J-Xmx32g"
+
+# UCPP flags
+UCPPflags="-quiet -g -Wall -Wextra -O3 -nodebug -DNDEBUG -multi"
+UCPP=~/ucpp/u++-7.0.0/bin/u++
+
+# run the benchmarks
+
 # /usr/bin/time -f "%Uu %Ss %Er %Mkb"
-
 if [ ${executor} -eq ${true} ] ; then
     echo "executor"
+    pre_args="40000 100 ${nRounds}"
+    post_args="${batch}"
+    cd cfa # CFA RUN
+    for i in ${!names[@]}; do
+        print_header ${names[$i]}
+        ${cfa} ${cfa_flags} ${var_flags[$i]} executor.cfa -o a.${hostname} > /dev/null 2>&1
+        run_bench
+        rm a.${hostname}
+    done
+    cd - > /dev/null # done CFA
+    if [ ${runCAF} -eq ${true} ] ; then # CAF RUN
+        cd caf
+        print_header 'CAF'
+        g++ ${prefixCAF} CAFExecutor.cpp ${suffixCAF} -o a.${hostname} > /dev/null 2>&1
+        for p in ${bench_cores} ; do
+            sed -i "s/max-threads = .*/max-threads = ${p}/g" caf-application.conf # set CAF parallelism
+            single_run ${p}
+        done
+        rm a.${hostname}
+        # set back parallelism
+        sed -i "s/max-threads = .*/max-threads = 1/g" caf-application.conf 
+        cd - > /dev/null
+    fi # done CAF
+    if [ ${runAKKA} -eq ${true} ] ; then # AKKA RUN
+        cd akka/Executor
+        rm -rf project target				# random out of memory errors without this
+        print_header 'Akka'
+        for p in ${bench_cores} ; do
+            set_akka_parallelism ${p}
+            affinity ${p}
+            taskset -c ${taskset} sbt ${sbtflags} "run ${pre_args} ${p} ${post_args} ${numtimes}" 2>&1 | grep -v "SLF4J:" | grep -v "Slf4jLogger started" | sed -e "s/\x1b\[0J//"
+            sbt clean > /dev/null
+        done
+        # set back parallelism
+        set_akka_parallelism 1
+        cd - > /dev/null
+    fi # done AKKA
+    if [ ${runUCPP} -eq ${true} ] ; then # UCPP RUN
+        cd ucpp
+        print_header 'uC++'
+        ${UCPP} ${UCPPflags} uC++Executor.cc -o a.${hostname} > /dev/null 2>&1
+        run_bench
+        rm a.${hostname}
+        cd - > /dev/null
+    fi # done UCPP
+    if [ ${runPROTO} -eq ${true} ] ; then # PROTO RUN
+        print_header 'ProtoActor'
+        cd proto/Executor
+        go build -o a.${hostname} > /dev/null 2>&1
+        run_bench
+        rm a.${hostname}
+        cd - > /dev/null
+    fi # done PROTO
+    echo ""
+fi
+
+if [ ${matrix} -eq ${true} ] ; then
+    echo "matrix"
+    pre_args="${size} ${size} ${size}"
+    post_args=""
+    cd cfa
+    for i in ${!names[@]}; do
+        print_header ${names[$i]}
+        ${cfa} ${cfa_flags} ${var_flags[$i]} matrix.cfa -o a.${hostname} > /dev/null 2>&1
+        run_bench
+        rm a.${hostname}
+    done
+    cd - > /dev/null
+    if [ ${runCAF} -eq ${true} ] ; then # CAF RUN
+        cd caf
+        print_header 'CAF'
+        g++ ${prefixCAF} CAFMatrix.cpp ${suffixCAF} -o a.${hostname} > /dev/null 2>&1
+        for p in ${bench_cores} ; do
+            sed -i "s/max-threads = .*/max-threads = ${p}/g" caf-application.conf # set CAF parallelism
+            single_run ${p}
+        done
+        rm a.${hostname}
+
+        # set back parallelism
+        sed -i "s/max-threads = .*/max-threads = 1/g" caf-application.conf 
+        cd - > /dev/null
+    fi # done CAF
+    if [ ${runAKKA} -eq ${true} ] ; then # AKKA RUN
+        cd akka/Matrix
+        rm -rf project target				# random out of memory errors without this
+        print_header 'Akka'
+        for p in ${bench_cores} ; do
+            set_akka_parallelism ${p}
+            affinity ${p}
+            repeat_command taskset -c ${taskset} sbt ${sbtflags} "run ${pre_args} ${p}" 2>&1 | grep -v "SLF4J:" | grep -v "Slf4jLogger started" | sed -e "s/\x1b\[0J//"
+            sbt clean > /dev/null
+        done
+        # set back parallelism
+        set_akka_parallelism 1
+        cd - > /dev/null
+    fi # done AKKA
+    if [ ${runUCPP} -eq ${true} ] ; then # UCPP RUN
+        cd ucpp
+        print_header 'uC++'
+        ${UCPP} ${UCPPflags} uC++Matrix.cc -o a.${hostname} > /dev/null 2>&1
+        run_bench
+        rm a.${hostname}
+        cd - > /dev/null
+    fi # done UCPP
+    if [ ${runPROTO} -eq ${true} ] ; then # PROTO RUN
+        cd proto/Matrix
+        print_header 'ProtoActor'
+        go build -o a.${hostname} > /dev/null 2>&1
+        run_bench
+        rm a.${hostname}
+        cd - > /dev/null
+    fi # done PROTO
+    echo ""
+fi
+
+if [ ${repeat} -eq ${true} ] ; then
+    echo "repeat"
+    pre_args="${messages}"
+    post_args="${n_repeats}"
+    cd cfa
+    for i in ${!names[@]}; do
+        print_header ${names[$i]}
+        ${cfa} ${cfa_flags} ${var_flags[$i]} repeat.cfa -o a.${hostname} > /dev/null 2>&1
+        run_bench
+        rm a.${hostname}
+    done
+    cd - > /dev/null
+    if [ ${runCAF} -eq ${true} ] ; then # CAF RUN
+        cd caf
+        print_header 'CAF'
+        g++ ${prefixCAF} CAFRepeat.cpp ${suffixCAF} -o a.${hostname} > /dev/null 2>&1
+        for p in ${bench_cores} ; do
+            sed -i "s/max-threads = .*/max-threads = ${p}/g" caf-application.conf # set CAF parallelism
+            single_run ${p}
+        done
+        rm a.${hostname}
+
+        # set back parallelism
+        sed -i "s/max-threads = .*/max-threads = 1/g" caf-application.conf 
+        cd - > /dev/null
+    fi # done CAF
+    if [ ${runAKKA} -eq ${true} ] ; then # AKKA RUN
+        cd akka/Repeat
+        rm -rf project target				# random out of memory errors without this
+        print_header 'Akka'
+        for p in ${bench_cores} ; do
+            set_akka_parallelism ${p}
+            affinity ${p}
+            repeat_command taskset -c ${taskset} sbt ${sbtflags} "run ${pre_args} ${p} ${post_args}" 2>&1 | grep -v "SLF4J:" | grep -v "Slf4jLogger started" | sed -e "s/\x1b\[0J//"
+            sbt clean > /dev/null
+        done
+        # set back parallelism
+        set_akka_parallelism 1
+        cd - > /dev/null
+    fi # done AKKA
+    if [ ${runUCPP} -eq ${true} ] ; then # UCPP RUN
+        cd ucpp
+        print_header 'uC++'
+        ${UCPP} ${UCPPflags} uC++Repeat.cc -o a.${hostname} > /dev/null 2>&1
+        run_bench
+        rm a.${hostname}
+        cd - > /dev/null
+    fi # done UCPP
+    if [ ${runPROTO} -eq ${true} ] ; then # PROTO RUN
+        print_header 'ProtoActor'
+        cd proto/Repeat
+        go build -o a.${hostname} > /dev/null 2>&1
+        run_bench
+        rm a.${hostname}
+        cd - > /dev/null
+    fi # done PROTO
+    echo ""
+fi
+
+
+if [ ${static} -eq ${true} ] ; then
+    echo "static"
+    preprint=''
+    cd cfa
+    for i in ${!names[@]}; do
+        echo ${names[$i]}
+        ${cfa} ${cfa_flags} ${var_flags[$i]} static.cfa -o a.${hostname} > /dev/null 2>&1
+        repeat_command taskset -c ${startcore} ./a.${hostname} ${n_static_sends}
+        rm a.${hostname}
+    done
+    cd - > /dev/null
+    if [ ${runCAF} -eq ${true} ] ; then # CAF RUN
+        cd caf
+        echo 'CAF:'
+        g++ ${prefixCAF} CAFSendStatic.cpp ${suffixCAF} -o a.${hostname} > /dev/null 2>&1
+        sed -i "s/max-threads = .*/max-threads = 1/g" caf-application.conf # set CAF parallelism
+        repeat_command taskset -c ${startcore} ./a.${hostname} 'd'
+        rm a.${hostname}
+        cd - > /dev/null
+    fi # done CAF
+    if [ ${runAKKA} -eq ${true} ] ; then # AKKA RUN
+        cd akka/SendStatic
+        rm -rf project target				# random out of memory errors without this
+        echo 'Akka:'
+        set_akka_parallelism 1
+        taskset -c ${startcore} sbt ${sbtflags} "run ${n_static_sends} ${numtimes}" 2>&1 | grep -v "SLF4J:" | grep -v "Slf4jLogger started" | sed -e "s/\x1b\[0J//"
+        cd - > /dev/null
+    fi # done AKKA
+    if [ ${runUCPP} -eq ${true} ] ; then # UCPP RUN
+        cd ucpp
+        echo 'uC++:'
+        ${UCPP} ${UCPPflags} uC++SendStatic.cc -o a.${hostname} > /dev/null 2>&1
+        repeat_command taskset -c ${startcore} ./a.${hostname} ${n_static_sends}
+        rm a.${hostname}
+        cd - > /dev/null
+    fi # done UCPP
+    if [ ${runPROTO} -eq ${true} ] ; then # PROTO RUN
+        cd proto/SendStatic
+        echo 'ProtoActor:'
+        go build -o a.${hostname} > /dev/null 2>&1
+        repeat_command taskset -c ${startcore} ./a.${hostname} ${n_static_sends}
+        rm a.${hostname}
+        cd - > /dev/null
+    fi # done PROTO
+    echo ""
+fi
+
+if [ ${dynamic} -eq ${true} ] ; then
+    echo "dynamic"
+    cd cfa
+    for i in ${!names[@]}; do
+        echo ${names[$i]}
+        ${cfa} ${cfa_flags} ${var_flags[$i]} dynamic.cfa -o a.${hostname} > /dev/null 2>&1
+        repeat_command taskset -c ${startcore} ./a.${hostname} ${n_dynamic_sends}
+        rm a.${hostname}
+    done
+    cd - > /dev/null
+    if [ ${runCAF} -eq ${true} ] ; then # CAF RUN
+        cd caf
+        echo 'CAF:'
+        g++ ${prefixCAF} CAFSendDynamic.cpp ${suffixCAF} -o a.${hostname} > /dev/null 2>&1
+        sed -i "s/max-threads = .*/max-threads = 1/g" caf-application.conf # set CAF parallelism
+        repeat_command taskset -c ${startcore} ./a.${hostname} 'd'
+        rm a.${hostname}
+        cd - > /dev/null
+    fi # done CAF
+    if [ ${runAKKA} -eq ${true} ] ; then # AKKA RUN
+        cd akka/SendDynamic
+        rm -rf project target				# random out of memory errors without this
+        echo 'Akka:'
+        set_akka_parallelism 1
+        taskset -c ${startcore} sbt ${sbtflags} "run d ${numtimes}" 2>&1 | grep -v "SLF4J:" | grep -v "Slf4jLogger started" | sed -e "s/\x1b\[0J//"
+        cd - > /dev/null
+    fi # done AKKA
+    if [ ${runUCPP} -eq ${true} ] ; then # UCPP RUN
+        cd ucpp
+        echo 'uC++:'
+        ${UCPP} ${UCPPflags} uC++SendDynamic.cc -o a.${hostname} > /dev/null 2>&1
+        repeat_command taskset -c ${startcore} ./a.${hostname} ${n_dynamic_sends}
+        rm a.${hostname}
+        cd - > /dev/null
+    fi # done UCPP
+    if [ ${runPROTO} -eq ${true} ] ; then # PROTO RUN
+        cd proto/SendDynamic
+        echo 'ProtoActor:'
+        go build -o a.${hostname} > /dev/null 2>&1
+        repeat_command taskset -c ${startcore} ./a.${hostname} 'd'
+        rm a.${hostname}
+        cd - > /dev/null
+    fi # done PROTO
+    echo ""
+fi
+
+
+if [ ${balance} -eq ${true} ] ; then
+    cd cfa
+    echo "balance_one"
     for i in ${!names[@]}; do
         echo ${names[$i]}':'
         echo -e "proc\ttime (s)"
-        ${cfa} ${cfa_flags} ${var_flags[$i]} executor.cfa > /dev/null 2>&1
-        for p in ${bench_cores} ; do
-            affinity ${p}
-            # echo "taskset -c ${startcore}-`expr ${startcore} + ${p} - 1` ./a.out 40000 100 ${nRounds} ${p} ${batch}"
-            preprint="${p}\t"
-            repeat_command taskset -c ${taskset} ./a.out 40000 100 ${nRounds} ${p} ${batch}
-        done
-        rm a.out
-    done
-    echo ""
-fi
-
-if [ ${matrix} -eq ${true} ] ; then
-    echo "matrix"
-    for i in ${!names[@]}; do
-        echo ${names[$i]}
-        echo -e "proc\ttime (s)"
-        ${cfa} ${cfa_flags} ${var_flags[$i]} matrix.cfa > /dev/null 2>&1
-        for p in ${bench_cores} ; do
-            affinity ${p}
-            preprint="${p}\t"
-            repeat_command taskset -c ${taskset} ./a.out ${size} ${size} ${size} ${p}
-        done
-        rm a.out
-    done
-    echo ""
-fi
-
-if [ ${repeat} -eq ${true} ] ; then
-    echo "repeat"
-    echo -e "proc\ttime (s)"
-    for i in ${!names[@]}; do
-        echo ${names[$i]}
-        ${cfa} ${cfa_flags} ${var_flags[$i]} repeat.cfa > /dev/null 2>&1
+        ${cfa} ${cfa_flags} ${var_flags[$i]} balance.cfa -o a.${hostname} > /dev/null 2>&1
         for p in ${bench_cores} ; do 
             affinity ${p}
             preprint="${p}\t"
-            repeat_command taskset -c ${taskset} ./a.out ${messages} ${p} 256 ${n_repeats}
-        done
-        rm a.out
-    done
-    echo ""
-fi
-
-
-if [ ${static} -eq ${true} ] ; then
-    echo "static"
-        for i in ${!names[@]}; do
-            echo ${names[$i]}
-            ${cfa} ${cfa_flags} ${var_flags[$i]} static.cfa > /dev/null 2>&1
-            repeat_command taskset -c ${startcore} ./a.out ${n_static_sends}
-            rm a.out
-        done
-    echo ""
-fi
-
-if [ ${dynamic} -eq ${true} ] ; then
-    echo "dynamic"
-        for i in ${!names[@]}; do
-            echo ${names[$i]}
-            ${cfa} ${cfa_flags} ${var_flags[$i]} dynamic.cfa > /dev/null 2>&1
-            repeat_command taskset -c ${startcore} ./a.out ${n_dynamic_sends}
-        done
-    echo ""
-fi
-
-
-if [ ${balance} -eq ${true} ] ; then
-    echo "balance_one"
+            repeat_command taskset -c ${taskset} ./a.${hostname} 32 32 ${nOneRounds} ${p}
+        done
+        rm a.${hostname}
+    done
+    echo ""
+    echo "balance_multi"
     for i in ${!names[@]}; do
         echo ${names[$i]}':'
         echo -e "proc\ttime (s)"
-        ${cfa} ${cfa_flags} ${var_flags[$i]} balance.cfa > /dev/null 2>&1
+        ${cfa} ${cfa_flags} ${var_flags[$i]} -DMULTI balance.cfa -o a.${hostname} > /dev/null 2>&1
         for p in ${bench_cores} ; do 
             affinity ${p}
             preprint="${p}\t"
-            repeat_command taskset -c ${taskset} ./a.out 32 32 ${nOneRounds} ${p}
-        done
-        rm a.out
-    done
-    echo ""
-    echo "balance_multi"
-    for i in ${!names[@]}; do
-        echo ${names[$i]}':'
-        echo -e "proc\ttime (s)"
-        ${cfa} ${cfa_flags} ${var_flags[$i]} -DMULTI balance.cfa > /dev/null 2>&1
-        for p in ${bench_cores} ; do 
-            affinity ${p}
-            preprint="${p}\t"
-            repeat_command taskset -c ${taskset} ./a.out 32 32 ${nMultiRounds} ${p}
-        done
-        rm a.out
-    done
-    echo ""
-fi
-
+            repeat_command taskset -c ${taskset} ./a.${hostname} 32 32 ${nMultiRounds} ${p}
+        done
+        rm a.${hostname}
+    done
+    echo ""
+    cd - > /dev/null
+fi
+
