Browse Source

online phase of 2P

avadapal 2 years ago
parent
commit
5262f99b5d
1 changed files with 18 additions and 1 deletions
  1. 18 1
      Docker/run-experiment.sh

+ 18 - 1
Docker/run-experiment.sh

@@ -108,7 +108,7 @@ date "+===== Start %s %F %T"
         date "+===== End %s %F %T"
     fi
 
-    if [ "$1" = "write" -a "$5" = "2P" ]; then
+    if [ "$1" = "write" -a "$5" = "2P" -a "$4" = "preproc" ]; then
         # Run, saving the output
         savefilep0=$$.p1.out
         savefilep1=$$.p0.out
@@ -128,4 +128,21 @@ date "+===== Start %s %F %T"
         docker exec -w /root/duoram/2p-preprocessing duoram_p1 cat $savefilep1
         docker exec -w /root/duoram/2p-preprocessing duoram_p1 rm -f $savefilep1
         date "+===== End %s %F %T"
+    fi
+
+    if [ "$1" = "write" -a "$5" = "2P" -a "$4" = "online" ]; then
+        # Run, saving the output
+        savefilep0=$$.p1.out
+        savefilep1=$$.p0.out
+        docker exec -w /root/duoram/2p-preprocessing duoram_p1 bash -c "$DUORAM_NUMA_P1 stdbuf -o 0  ./2Pduoram1 $p0addr $p2addr $iters $size $modeval  > $savefilep1 2>&1" &
+        sleep 4
+        docker exec -w /root/duoram/2p-preprocessing duoram_p0 bash -c "$DUORAM_NUMA_P0 stdbuf -o 0  ./2Pduoram0 $p0addr $p2addr $iters $size $modeval  > $savefilep0 2>&1" &
+        wait
+        echo ===== P0 output
+        docker exec -w /root/duoram/2p-preprocessing duoram_p0 cat $savefilep0
+        docker exec -w /root/duoram/2p-preprocessing duoram_p0 rm -f $savefilep0
+        echo ===== P1 output
+        docker exec -w /root/duoram/2p-preprocessing duoram_p1 cat $savefilep1
+        docker exec -w /root/duoram/2p-preprocessing duoram_p1 rm -f $savefilep1
+        date "+===== End %s %F %T"
     fi