-
Notifications
You must be signed in to change notification settings - Fork 0
/
slurm_make_all.sh
executable file
·147 lines (126 loc) · 4.89 KB
/
slurm_make_all.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
#!/bin/bash
unset graph_path
while getopts :g: flag; do
case "${flag}" in
g) graph_path=${OPTARG} ;;
esac
done
partition="single -n 40"
time="-t 72:00:00"
graph_basename="$(basename -- "${graph_path}")"
mkdir ${graph_basename}
paths_path="${graph_basename}/random_paths.json"
random_tests_path="${graph_basename}/random_tests.json"
dijkstra_rank_tests_path="${graph_basename}/dijkstra_rank_tests.json"
random_tests_dijkstra_timing_results_path="${graph_basename}/random_tests_dijkstra_timing_results.json"
random_tests_ch_timing_results_path="${graph_basename}/random_tests_ch_timing_results.json"
rank_tests_ch_timing_results_path="${graph_basename}/rank_tests_ch_timing_results.json"
random_tests_hl_timing_results_path="${graph_basename}/random_tests_hl_timing_results.json"
rank_tests_hl_timing_results_path="${graph_basename}/rank_tests_hl_timing_results.json"
ch_path="${graph_basename}/graph.di_ch_bincode"
hl_path="${graph_basename}/graph.di_hl_bincode"
set -x
job_id_create_random_paths=$(
sbatch -p ${partition} ${time} --job-name=${graph_basename}_create_random_paths \
--output=${graph_basename}/create_paths.txt \
--wrap=" \
create_paths \
--pathfinder ${graph_path} \
--paths ${paths_path}" |
grep -o '[0-9]\+'
)
job_id_create_tests=$(
sbatch -p ${partition} ${time} --job-name=${graph_basename}_create_tests \
--output=${graph_basename}/create_tests.txt \
--wrap=" \
create_tests \
--graph ${graph_path} \
--number-of-tests 10000 \
--random-test-cases ${random_tests_path} \
--dijkstra-rank-test-cases ${dijkstra_rank_tests_path}" |
grep -o '[0-9]\+'
)
job_id_create_top_down_hl=$(
sbatch -p ${partition} ${time} --job-name=${graph_basename}_create_top_down_hl \
--output=${graph_basename}/create_top_down_hl.txt \
--dependency afterok:${job_id_create_random_paths} \
--wrap=" \
create_top_down_hl \
--graph ${graph_path} \
--paths ${paths_path} \
--hub-graph ${hl_path}" |
grep -o '[0-9]\+'
)
job_id_create_top_down_ch=$(
sbatch -p ${partition} ${time} --job-name=${graph_basename}_create_top_down_ch \
--output=${graph_basename}/create_top_down_ch.txt \
--dependency afterok:${job_id_create_random_paths} \
--wrap=" \
create_top_down_ch \
--graph ${graph_path} \
--paths ${paths_path} \
--contracted-graph ${ch_path}" |
grep -o '[0-9]\+'
)
job_id_validate_and_time_dijkstra=$(
sbatch -p ${partition} ${time} --job-name=${graph_basename}_validate_and_time_dijkstra \
--output=${graph_basename}/validate_and_time_dijkstra.txt \
--dependency afterok:${job_id_create_tests} \
--wrap=" \
validate_and_time \
--pathfinder ${graph_path} \
--graph ${graph_path} \
--test-cases ${random_tests_path} \
--timing-results ${random_tests_dijkstra_timing_results_path} \
--maximum-number-of-tests 1000" |
grep -o '[0-9]\+'
)
job_id_validate_and_time_random_ch=$(
sbatch -p ${partition} ${time} --job-name=${graph_basename}_validate_and_time_random_ch \
--output=${graph_basename}/validate_and_time_random_ch.txt \
--dependency afterok:${job_id_create_top_down_ch}:${job_id_create_tests} \
--wrap=" \
validate_and_time \
--pathfinder ${ch_path} \
--graph ${graph_path} \
--timing-results ${random_tests_ch_timing_results_path} \
--test-cases ${random_tests_path}" |
grep -o '[0-9]\+'
)
job_id_validate_and_time_random_hl=$(
sbatch -p ${partition} ${time} --job-name=${graph_basename}_validate_and_time_random_hl \
--output=${graph_basename}/validate_and_time_random_hl.txt \
--dependency afterok:${job_id_create_top_down_hl}:${job_id_create_tests} \
--wrap=" \
validate_and_time \
--pathfinder ${hl_path} \
--graph ${graph_path} \
--timing-results ${random_tests_hl_timing_results_path} \
--test-cases ${random_tests_path}" |
grep -o '[0-9]\+'
)
job_id_validate_and_time_rank_ch=$(
sbatch -p ${partition} ${time} --job-name=${graph_basename}_validate_and_time_rank_ch \
--output=${graph_basename}/validate_and_time_rank_ch.txt \
--dependency afterok:${job_id_create_top_down_ch}:${job_id_create_tests} \
--wrap=" \
validate_and_time \
--pathfinder ${ch_path} \
--graph ${graph_path} \
--timing-results ${rank_tests_ch_timing_results_path} \
--test-cases ${dijkstra_rank_tests_path}" |
grep -o '[0-9]\+'
)
job_id_validate_and_time_rank_hl=$(
sbatch -p ${partition} ${time} --job-name=${graph_basename}_validate_and_time_rank_hl \
--output=${graph_basename}/validate_and_time_rank_hl.txt \
--dependency afterok:${job_id_create_top_down_hl}:${job_id_create_tests} \
--wrap=" \
validate_and_time \
--pathfinder ${hl_path} \
--graph ${graph_path} \
--timing-results ${rank_tests_hl_timing_results_path} \
--test-cases ${dijkstra_rank_tests_path}" |
grep -o '[0-9]\+'
)
set +x