-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrun_timing.sh
executable file
·42 lines (34 loc) · 2.63 KB
/
run_timing.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
TOWER_ROOT=tower-src
MEMORY_LIMIT_KB=32000000
TIMEOUT_SEC=3600
set -x
mkdir -p timing
i=10
for j in {1..5}
do
( ulimit -v $MEMORY_LIMIT_KB && exec timeout $TIMEOUT_SEC /usr/bin/time -v ./tower -c --optimize_lir --dotQC --timing -b length:$i $TOWER_ROOT/tests/list.twr $TOWER_ROOT/tests/length.twr > timing/length${i}_${j}.qc 2> timing/tower_length${i}_${j}.log ) || echo 'errored or timed out'
( ulimit -v $MEMORY_LIMIT_KB && exec timeout $TIMEOUT_SEC /usr/bin/time -v ./tower -c --dotQC --timing -b length:$i $TOWER_ROOT/tests/list.twr $TOWER_ROOT/tests/length.twr > timing/length_orig${i}_${j}.qc 2> timing/tower_length_orig${i}_${j}.log ) || echo 'errored or timed out'
( ulimit -v $MEMORY_LIMIT_KB && exec timeout $TIMEOUT_SEC /usr/bin/time -v ./tower -c --optimize_lir --dotQC --timing -b length:$i $TOWER_ROOT/tests/list.twr length_simplified.twr > timing/length_simplified${i}_${j}.qc 2> timing/tower_length_simplified${i}_${j}.log ) || echo 'errored or timed out'
( ulimit -v $MEMORY_LIMIT_KB && exec timeout $TIMEOUT_SEC /usr/bin/time -v ./tower -c --dotQC --timing -b length:$i $TOWER_ROOT/tests/list.twr length_simplified.twr > timing/length_simplified_orig${i}_${j}.qc 2> timing/tower_length_simplified_orig${i}_${j}.log ) || echo 'errored or timed out'
done
for j in {1..5}
do
( ulimit -v $MEMORY_LIMIT_KB && exec timeout $TIMEOUT_SEC /usr/bin/time -v ./feynopt -mctExpand -O2 circuits/qc/length_simplified${i}.qc > timing/feynopt_length_simplified${i}_${j}.qc 2> timing/feynopt_length_simplified${i}_${j}.log ) || echo 'errored or timed out'
done
for j in {1..5}
do
( ulimit -v $MEMORY_LIMIT_KB && exec timeout $TIMEOUT_SEC /usr/bin/time -v ./feynopt -mctExpand -O2 circuits/qc/length_simplified_orig${i}.qc > timing/feynopt_length_simplified_orig${i}_${j}.qc 2> timing/feynopt_length_simplified_orig${i}_${j}.log ) || echo 'errored or timed out'
done
for j in {1..5}
do
( ulimit -v $MEMORY_LIMIT_KB && exec timeout $TIMEOUT_SEC /usr/bin/time -v ./run_quizx circuits/qasm/length_simplified${i}.qasm > timing/quizx_length_simplified${i}_${j}.qasm 2> timing/quizx_length_simplified${i}_${j}.log ) || echo 'errored or timed out'
done
for j in {1..5}
do
( ulimit -v $MEMORY_LIMIT_KB && exec timeout $TIMEOUT_SEC /usr/bin/time -v ./feynopt -mctExpand -O2 circuits/qc/length${i}.qc > timing/feynopt_length${i}_${j}.qc 2> timing/feynopt_length${i}_${j}.log ) || echo 'errored or timed out'
done
for j in {1..5}
do
( ulimit -v $MEMORY_LIMIT_KB && exec timeout $TIMEOUT_SEC /usr/bin/time -v ./feynopt -mctExpand -O2 circuits/qc/length_orig${i}.qc > timing/feynopt_length_orig${i}_${j}.qc 2> timing/feynopt_length_orig${i}_${j}.log ) || echo 'errored or timed out'
done