-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.sh
executable file
·88 lines (79 loc) · 1.99 KB
/
test.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
#!/bin/bash
exeorplot="${1:-0}"
whichN="${2:-2}"
strat="${3:-0}"
gamma=0.3
sm=100
force=10
k=0
r=1
rnd=200
if [[ $whichN -eq 0 ]]
then
expe=0
N=10 # 100
v=5 #20 # 160
rnd=10
f=0.3
sm=10
fi
if [[ $whichN -eq 1 ]]
then
expe=21
N=1000 # 100
v=100 # 160
rnd=20
f=0.2
fi
if [[ $whichN -eq 2 ]]
then
expe=30
N=10000
v=160
rnd=200
f=0.2
fi
if [ $strat -eq 0 ]; then
stratLitt="aupe-merge"
elif [ $strat -eq 1 ]; then
stratLitt="aupe-global"
elif [ $strat -eq 2 ]; then
stratLitt="aupe"
elif [ $strat -eq 3 ]; then
stratLitt="basalt-simple"
elif [ $strat -eq 4 ]; then
stratLitt="brahms"
fi
rho=$(echo "scale=0; $k / $r / 1" | bc)
if [[ $exeorplot -eq 0 ]]
then
mkdir analysis
mkdir "./analysis/rho"$rho
mkdir "./analysis/rho"$rho"/"$N
mkdir "./analysis/rho"$rho"/"$N"/"$stratLitt
folder="./analysis/rho"$rho"/"$N"/"$stratLitt"/expe"$expe
mkdir $folder
F=$(echo "scale=0; 100.0 * $f / 1" | bc)
echo $folder"/text"$F
byz=$(echo "scale=0; $N * $f / 1" | bc)
if [ $strat -eq 0 ]; then
cargo run -- -T $roundMax -n $N aupe -O -G samples -f $force -t $byz \
-v $v -u $v -k $k -r $r -m $sm -n $N > $folder"/text"$F
elif [ $strat -eq 1 ]; then
cargo run -- -T $roundMax -n $N aupe -L -G samples -f $force -t $byz \
-v $v -u $v -k $k -r $r -m $sm -n $N > $folder"/text"$F
elif [ $strat -eq 2 ]; then
cargo run -- -T $roundMax -n $N aupe -G samples -f $force -t $byz \
-v $v -u $v -k $k -r $r -m $sm -n $N > $folder"/text"$F
elif [ $strat -eq 3 ]; then
cargo run -- -T $roundMax -n $N basalt-simple -G -f $force -t $byz \
-v $v -i 50 -k $k -r $r > $folder"/text"$F
elif [ $strat -eq 4 ]; then
cargo run -- -T $roundMax -n $N brahms -G samples -f $force -t $byz \
-v $v -u $v -k $k -r $r > $folder"/text"$F
fi
else
cd ./plots
mkdir "./analysis/expe"$expe
Rscript test.r $expe $N $v $f $sm $stratLitt $mergeLitt $gamma $rnd $t $k $s
fi