-
Notifications
You must be signed in to change notification settings - Fork 1
/
run_xp1_parallel.sh
executable file
·110 lines (103 loc) · 4.18 KB
/
run_xp1_parallel.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#!/usr/bin/bash
result_dir="results_xp1"
rep_test="$@"
[ -d $result_dir ] || mkdir $result_dir
ID=$RANDOM
runny()
{
local seed=$1
local tree_count=$2
local extend_type=$3
local dataset=$4
local memory=$5
local iteration_dir=$6
local binary="bin/$dataset/mondrian_coarse_empty_"$memory
local f="mondrian_t$tree_count"_"$extend_type"_"$memory"
if [ "$iteration_dir" -le "11" ]; then
echo "$binary $dataset.log $seed 3 $seed lifetime:0.5 base_measure:0.0 discount_factor:1.0 tree_management:phoenix tree_count:$tree_count extend_type:$extend_type >> $result_dir/$dataset/$iteration_dir/$f.csv" >> commands_$ID.txt
else
echo "$binary $dataset.log $seed 3 $seed lifetime:0.5 base_measure:0.0 discount_factor:1.0 tree_management:phoenix tree_count:$tree_count extend_type:$extend_type | tail -n 1 >> $result_dir/$dataset/$iteration_dir/$f.csv" >> commands_$ID.txt
fi
}
runny_generated()
{
local seed=$1
local tree_count=$2
local extend_type=$3
local dataset=$4
local memory=$5
local iteration_dir=$6
local binary="bin/$dataset/mondrian_coarse_empty_"$memory
local f="mondrian_t$tree_count"_"$extend_type"_"$memory"
if [ "$iteration_dir" -le "11" ]; then
echo "$binary datasets/$dataset.log $seed 3 $seed lifetime:0.5 base_measure:0.0 discount_factor:1.0 tree_management:phoenix tree_count:$tree_count extend_type:$extend_type >> $result_dir/$dataset/$iteration_dir/$f.csv" >> commands_$ID.txt
else
echo "$binary datasets/$dataset.log $seed 3 $seed lifetime:0.5 base_measure:0.0 discount_factor:1.0 tree_management:phoenix tree_count:$tree_count extend_type:$extend_type | tail -n 1 >> $result_dir/$dataset/$iteration_dir/$f.csv" >> commands_$ID.txt
fi
}
#Run all out-of-memory strategy for validation generated datasets
for s in $rep_test; do
for memory in '0.6M'; do
#for d in datasets/*.log; do
for d in datasets/hyperplane_0_4_001_01.*; do
dataset=`basename $d .log`
[ -d $result_dir/$dataset ] || mkdir $result_dir/$dataset
[ -d $result_dir/$dataset/$s ] || mkdir $result_dir/$dataset/$s
for t in 1 5 10 20 30 50; do
for et in none original count_only partial ghost; do
runny_generated $s $t $et $dataset $memory $s
done
done
done
done
done
#Run all out-of-memory strategy
for s in $rep_test; do
for memory in '0.6M'; do
for dataset in recofit_6 banos_6 RandomRBF_stable RandomRBF_drift covtype drift_6 pamap_chest harth har70; do
[ -d $result_dir/$dataset ] || mkdir $result_dir/$dataset
[ -d $result_dir/$dataset/$s ] || mkdir $result_dir/$dataset/$s
for t in 1 5 10 20 30 50; do
for et in none original count_only partial ghost; do
runny $s $t $et $dataset $memory $s
done
done
done
done
done
#Run all out-of-memory strategy with more memory
#Only run 10 repetitions
for s in ${rep_test[@]:0:10}; do
for memory in '1M' '10M' '50M' '100M' '200M'; do
for dataset in recofit_6 banos_6 RandomRBF_stable RandomRBF_drift covtype drift_6 pamap_chest harth har70; do
[ -d $result_dir/$dataset ] || mkdir $result_dir/$dataset
[ -d $result_dir/$dataset/$s ] || mkdir $result_dir/$dataset/$s
for t in 1 5 10 20 30 50; do
for et in none original count_only partial ghost; do
runny $s $t $et $dataset $memory $s
done
done
done
done
done
#Run with unbound
for dataset in recofit_6 banos_6 RandomRBF_stable RandomRBF_drift covtype drift_6 pamap_chest harth har70; do
binary="bin/$dataset/mondrian_coarse_empty_2G"
[ -d $result_dir/$dataset ] || mkdir $result_dir/$dataset
[ -d $result_dir/$dataset/$s ] || mkdir $result_dir/$dataset/$s
for s in $rep_test; do
for t in 1 5 10 20 30 50; do
for et in original; do
f="mondrian_unbound_t$t"_"$et"
if [ "$s" -le "11" ]; then
echo "$binary $dataset.log $s 3 $s lifetime:0.5 base_measure:0.0 discount_factor:1.0 tree_management:phoenix tree_count:$t extend_type:$et >> $result_dir/$dataset/$s/$f.csv" >> commands_$ID.txt
else
echo "$binary $dataset.log $s 3 $s lifetime:0.5 base_measure:0.0 discount_factor:1.0 tree_management:phoenix tree_count:$t extend_type:$et | tail -n 1 >> $result_dir/$dataset/$s/$f.csv" >> commands_$ID.txt
fi
done
done
done
done
echo "Done Listing; Start Running"
parallel --memfree 4G --retries 10 --progress < commands_$ID.txt
rm -f commands_$ID.txt