-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_lte.sh
executable file
·37 lines (34 loc) · 1.45 KB
/
run_lte.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
#!/bin/bash
OUTPUT=$1
CELLS=$2
OPTIONS=${@:3}
INI=./parameters_lte.ini
MAX_NP=60
if [ -n "${OUTPUT}" ] && [ -n "${CELLS}" ] && [ -n "${OPTIONS}" ]; then
#
# create as many workers as there are cells
#
NP="$( echo "${CELLS}" | tr ',' '\n' | wc -l )"
if [ ${NP} -gt ${MAX_NP} ]; then
NP=${MAX_NP}
fi
#
# start MPI jobs for LTE network
#
mpirun --mca btl_tcp_if_include 192.168.1.0/24 --mca btl tcp,sm,self --host localhost -np 1 r.coverage ${OPTIONS} ini_file=${INI} tx_ini_sections=${CELLS} : --hostfile hostfile.ninestein -np ${NP} ${HOME}/etc/dr/tun_par/prato/src/run_worker.sh ${OUTPUT}
#mpirun --mca btl tcp,sm,self --host localhost -np 1 r.coverage ${OPTIONS} ini_file=${INI} tx_ini_sections=${CELLS} : --hostfile hostfile.local -np 4 ${HOME}/etc/dr/tun_par/prato/src/run_worker.sh ${OUTPUT}
#
# aggregate the partial prediction only if output is database
#
if [ "${OUTPUT}" = "-db" ]; then
time ./aggregate.sh ${CELLS} ${INI} final_coverage
fi
else
echo "Usage: $0 [output] [comma-separated cell list] [module opts ...]"
echo "Runs the [r.coverage] tool module for the LTE network with the given parameters.-"
echo "[output] May be one of -db, -rast or - for standard output."
echo "[cell list] A comma-separated list of cell names."
echo "[module opts] Any combination of flags and options for the 'r.coverage' GRASS module. Help follows."
./r.coverage --help
exit -1
fi