-
Notifications
You must be signed in to change notification settings - Fork 0
/
benchmark.sh
59 lines (45 loc) · 1.91 KB
/
benchmark.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# bash script to run all the benchmarks
TIMINGS_LOGS_DIR="timings"
# simulator 0
export TIMEIT=1
export TIMEIT_CYCLES=100
export TIMEIT_LOGFILE="${TIMINGS_LOGS_DIR}/timings_s0.txt"
gethurricaneloss 10 2 0.001 30 1 0.000001 -n 10 -s0
gethurricaneloss 10 2 0.001 30 1 0.000001 -n 100 -s0
gethurricaneloss 10 2 0.001 30 1 0.000001 -n 1000 -s0
export TIMEIT_CYCLES=10
gethurricaneloss 10 2 0.001 30 1 0.000001 -n 100000 -s0
export TIMEIT_CYCLES=4
gethurricaneloss 10 2 0.001 30 1 0.000001 -n 1000000 -s0
export TIMEIT_CYCLES=2
gethurricaneloss 10 2 0.001 30 1 0.000001 -n 10000000 -s0 # <-- THIS TAKES **A LOT** (~30 mins on Macbook Pro 2019)
# simulators 1, 2, 3, 4
export TIMEIT_CYCLES=1000
num_monte_carlo_samples="10 100 1000 10000 100000" #manca 100000
simulator_ids="1 2 3 4 5"
for simulator_id in $simulator_ids; do
for num_monte_carlo_sample in $num_monte_carlo_samples; do
export TIMEIT_LOGFILE="${TIMINGS_LOGS_DIR}/timings_s${simulator_id}.txt";
gethurricaneloss 10 2 0.001 30 1 0.000001 -n ${num_monte_carlo_sample} -s${simulator_id};
done
done
# run the largest MC simulations with reduced TIMEIT_CYCLES
export TIMEIT_CYCLES=50
num_monte_carlo_samples="1000000"
simulator_ids="1 2 3 4 5"
for simulator_id in $simulator_ids; do
for num_monte_carlo_sample in $num_monte_carlo_samples; do
export TIMEIT_LOGFILE="${TIMINGS_LOGS_DIR}/timings_s${simulator_id}.txt";
gethurricaneloss 10 2 0.001 30 1 0.000001 -n ${num_monte_carlo_sample} -s${simulator_id};
done
done
# run the largest MC simulations with reduced TIMEIT_CYCLES
export TIMEIT_CYCLES=5
num_monte_carlo_samples="10000000"
simulator_ids="1 2 3 4 5"
for simulator_id in $simulator_ids; do
for num_monte_carlo_sample in $num_monte_carlo_samples; do
export TIMEIT_LOGFILE="${TIMINGS_LOGS_DIR}/timings_s${simulator_id}.txt";
gethurricaneloss 10 2 0.001 30 1 0.000001 -n ${num_monte_carlo_sample} -s${simulator_id};
done
done