-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_mini_deployment_on_vm.sh
64 lines (50 loc) · 1.74 KB
/
run_mini_deployment_on_vm.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
#!/bin/bash
set -e # exits upon first error in any of the commands
# List of databases
DATABASES=("de")
# Run snakemake for each database in parallel
for db_name in "${DATABASES[@]}"; do
export DB_NAME=$db_name
# copy and agggregate data
cd snakemake/copy_and_agg
START=$(date +%s)
snakemake -c 1 -j 1
END=$(date +%s)
duration=$((END - START))
echo "Time taken to copy and aggregate data: $duration seconds ===================================="
# Disaggregate to NUTS1
cd ../nuts1_disagg
START=$(date +%s)
snakemake -c 1 -j 1
END=$(date +%s)
duration=$((END - START))
echo "Time taken to disaggregate to NUTS1: $duration seconds ===================================="
# Disaggregate to NUTS2
cd ../nuts2_disagg
START=$(date +%s)
snakemake -c 1 -j 1
END=$(date +%s)
duration=$((END - START))
echo "Time taken to disaggregate to NUTS2: $duration seconds ===================================="
# Disaggregate to NUTS3
cd ../nuts3_disagg
START=$(date +%s)
snakemake -c 1 -j 1
END=$(date +%s)
duration=$((END - START))
echo "Time taken to disaggregate to NUTS3: $duration seconds ===================================="
# Disaggregate to LAU
cd ../lau_disagg
START=$(date +%s)
snakemake -c 1 -j 1
END=$(date +%s)
duration=$((END - START))
echo "Time taken to disaggregate to LAU: $duration seconds ===================================="
# Post disaggregation calculation
cd ../post_disagg_calculation
START=$(date +%s)
snakemake -c 1 -j 1
END=$(date +%s)
duration=$((END - START))
echo "Time taken to perform post disaggregation calculation: $duration seconds ===================================="
done