-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_remote_olsrv1_experiment.sh
executable file
·70 lines (61 loc) · 2.53 KB
/
run_remote_olsrv1_experiment.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
#!/usr/bin/env bash
if [ $# -ne 19 ]; then
echo "Usage: $0 <testbed> <channel> <legacy rate> <txpower> <strategy name> <strategy nrepeat> <strategy params> <graph params> <metrics seed> <exp name> <results_basedir> <weights (True|False)> <fixed intervals (True|False)> <verbose (True|False)> <copy results on local node (True|False)> <hello validity multiplier> <tc validity multiplier> <single interface (True|False)> <Disable link quality (True|False)>"
exit 1
fi
testbed=$1
channel=$2
legacyrate=$3
txpower=$4
killstrategy=$5
nrepeat=$6
strategyparam=$7
graphparams=$8
mseed=$9
expname=${10}
resultsdir=${11}
if [ "${12}" == "True" ]; then
weights="--weights"
else
weights=""
fi
if [ "${13}" == "True" ]; then
fixedintervals="--fixedintervals"
else
fixedintervals=""
fi
if [ "${14}" == "True" ]; then
verbose="--verbose"
else
verbose=""
fi
copyresults=${15}
hello_mult=${16}
tc_mult=${17}
if [ "${18}" == "True" ]; then
singleinterface="--singleinterface"
else
singleinterface=""
fi
if [ "${19}" == "True" ]; then
disablelq="--disablelq"
else
disablelq=""
fi
. ./setenv.sh $testbed
ANSIBLE_FOLDER=${HOME_FOLDER}/ansible/
EXPERIMENT_CONTROLLER=olsrv1_experiment_controller.py
echo "cd ${ANSIBLE_FOLDER} &&./${EXPERIMENT_CONTROLLER} --testbed ${testbed} --chan ${channel} --legacyrate ${legacyrate} --txpower ${txpower} --killstrategy ${killstrategy} --nrepeat ${nrepeat} --strategyparam ${strategyparam} --graphparams ${graphparams} --metricsseed ${mseed} --expname ${expname} --resultsdir ${resultsdir} ${weights} ${fixedintervals} ${verbose} --hellomult ${hello_mult} --tcmult ${tc_mult} ${singleinterface} ${disablelq}"
ssh -A -F ${CONFIG_FILE} ${MASTER_NODE} \
"cd ${ANSIBLE_FOLDER} &&./${EXPERIMENT_CONTROLLER} --testbed ${testbed} --chan ${channel} --legacyrate ${legacyrate} --txpower ${txpower} --killstrategy ${killstrategy} --nrepeat ${nrepeat} --strategyparam ${strategyparam} --graphparams ${graphparams} --metricsseed ${mseed} --expname ${expname} --resultsdir ${resultsdir} ${weights} ${fixedintervals} ${verbose} --hellomult ${hello_mult} --tcmult ${tc_mult} ${singleinterface} ${disablelq}"
# Probably it is better if we do some preliminary analysis on the master node
# for reducing the size of the results before copying everything on the local
# node
if [ "${copyresults}" == "True" ]; then
resdir=$(pwd)/${expname}_results
if [ -d ${resdir} ]; then
rm -rf ${resdir}
fi
echo "Copying results from master node (${MASTER_NODE}) to local directory ${resdir}"
scp -r -F ${CONFIG_FILE} ${MASTER_NODE}:${resultsdir}/${expname}_results ${resdir}
fi