-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathstart-args_taf.sh
executable file
·62 lines (49 loc) · 1.35 KB
/
start-args_taf.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
#!/bin/bash
set -e
function setup {
# Make sure that folder for hipe-network exists
mkdir -p bin
mkdir -p metrics
mkdir -p resources
# Get resources from scenario project
if ! [[ "$(find ./resources -maxdepth 3 -type f -iname \*.json)" ]];
then
rsync -a ../vne.scenarios/resources .
fi
# Extract hipe-network.xmi file
unzip -o $JAR "network/model/rules/*/hipe-network.xmi"
rsync -a ./network ./bin
rm -r ./network
mkdir -p logs
}
function run {
# Execute the program itself and save its output to logfile
java -Xmx120g -jar $JAR $ARGS 2>&1 | tee "./logs/$RUN_NAME.log"
}
# Set env vars
source env.sh
# Config
export JAR="iflye.jar"
setup
# Example arguments:
# pm two-tier-4-pods 4 1 3
# $1 $2 $3 $4 $5
# pm two-tier-4-pods auto 1 3
export a=$1 # algorithm
export s=$2 # scenario
export l=$3 # maximum path length
export k=$4 # k fastest paths to generate
export r=$5 # number of runs
for ((i=1;i<=$r;i++));
do
# Without memory measurement
export RUN_NAME="${a}_${s}_l${l}_k${k}_run${i}_taf"
export ARGS="-a $a -o total-taf-comm -e emoflon_wo_update -l $l -k $k -s resources/$s/snet.json -v resources/40-vnets/vnets.json -c ./metrics/$RUN_NAME.csv -i 600"
echo "#"
echo "# => Using ARGS: $ARGS"
echo "#"
run
done
echo "#"
echo "# => Arg script done."
echo "#"