-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
292 lines (227 loc) · 7.76 KB
/
Makefile
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
#########################################################
# GENERAL DIRECTOIRES #
#########################################################
# globals binaary /bin/open-graph name doesn't need to match main/open-graph.c
APP ?= open-graph
# test name needs to match the file name test/test_accel-graph.c
# export APP_TEST ?= test_open-graph-match
# export APP_TEST ?= test_grasp-cache-original
export APP_TEST ?= sweep_unified-cache-graph
# export APP_TEST ?= sweep_capi-cache-graph
# export APP_TEST ?= sweep_order-OpenGraph-performance-graph
# export APP_TEST ?= sweep_order-PR-performance-graph
# export APP_TEST ?= sweep_order-BFS-performance-graph
# dirs Root app
export APP_DIR ?= .
#dir root/managed_folders
export SRC_DIR = src
export OBJ_DIR = obj
export INC_DIR = include
export BIN_DIR = bin
export RES_DIR = results
export SNI_DIR = sniper
export CONFIG_DIR = config
#if you want to compile from cmake you need this directory
#cd build
#cmake ..
export BUILD_DIR = build
# relative directories used for managing src/obj files
export STRUCT_DIR = structures
export PREPRO_DIR = preprocess
export ALGO_DIR = algorithms
export UTIL_DIR = utils
export CAPI_UTIL_DIR = capi_utils
export CACHE_DIR = cache
export CONFIG_DIR = config
#contains the tests use make run-test to compile what in this directory
export TEST_DIR = tests
#contains the main for the graph processing framework
export MAIN_DIR = main
##################################################
##################################################
#########################################################
# ACCEL RUN GRAPH ARGUMENTS #
#########################################################
# export BENCHMARKS_DIR ?= ../../01_GraphDatasets
export BENCHMARKS_DIR ?= ../01_test_graphs
# export GRAPH_SUIT ?= TEST
export GRAPH_SUIT ?= LAW
# export GRAPH_SUIT ?= GAP
# export GRAPH_SUIT ?= SNAP
# export GRAPH_SUIT ?= KONECT
# export GRAPH_SUIT ?= GONG
# TEST # small test graphs
# export GRAPH_NAME ?= test
# export GRAPH_NAME ?= v51_e1021
# export GRAPH_NAME ?= v300_e2730
# GONG # https://gonglab.pratt.duke.edu/google-dataset
# export GRAPH_NAME ?= GONG-gplus
# export GRAPH_NAME ?= Gong-gplus
# GAP # https://sparse.tamu.edu/MM/GAP/
# export GRAPH_NAME ?= GAP-twitter
# export GRAPH_NAME ?= GAP-road
# SNAP # https://snap.stanford.edu/data/
# export GRAPH_NAME ?= SNAP-cit-Patents
# export GRAPH_NAME ?= SNAP-com-Orkut
# export GRAPH_NAME ?= SNAP-soc-LiveJournal1
# export GRAPH_NAME ?= SNAP-soc-Pokec
# export GRAPH_NAME ?= SNAP-web-Google
# KONECT # http://konect.cc/networks/wikipedia_link_en/
# export GRAPH_NAME ?= KONECT-wikipedia_link_en
# LAW # https://sparse.tamu.edu/MM/LAW/
export GRAPH_NAME ?= LAW-amazon-2008
# export GRAPH_NAME ?= LAW-arabic-2005
# export GRAPH_NAME ?= LAW-cnr-2000
# export GRAPH_NAME ?= LAW-dblp-2010
# export GRAPH_NAME ?= LAW-enron
# export GRAPH_NAME ?= LAW-eu-2005
# export GRAPH_NAME ?= LAW-hollywood-2009
# export GRAPH_NAME ?= LAW-in-2004
# export GRAPH_NAME ?= LAW-indochina-2004
# export GRAPH_NAME ?= LAW-it-2004
# export GRAPH_NAME ?= LAW-ljournal-2008
# export GRAPH_NAME ?= LAW-uk-2002
# export GRAPH_NAME ?= LAW-uk-2005
# export GRAPH_NAME ?= LAW-webbase-2001
# export FILE_BIN_TYPE ?= graph
export FILE_BIN_TYPE ?= graph.bin
# export FILE_BIN_TYPE ?= graph.wbin
# export FILE_LABEL_TYPE ?= graph_Gorder.labels
export FILE_LABEL_TYPE ?= graph_Rabbit.labels
#GRAPH file
export FILE_BIN = $(BENCHMARKS_DIR)/$(GRAPH_SUIT)/$(GRAPH_NAME)/$(FILE_BIN_TYPE)
export FILE_LABEL = $(BENCHMARKS_DIR)/$(GRAPH_SUIT)/$(GRAPH_NAME)/$(FILE_LABEL_TYPE)
#ALGORITHM
export PULL_PUSH ?= 0
export ALGORITHMS ?= 0
#GRAPH DATA_STRUCTURES
export SORT_TYPE ?= 1
export DATA_STRUCTURES ?= 0
export REORDER_LAYER1 ?= 0
export REORDER_LAYER2 ?= 0
export REORDER_LAYER3 ?= 0
#ALGORITHM SPECIFIC ARGS
export ROOT ?= 46050
export TOLERANCE ?= 1e-8
export DELTA ?= 800
export NUM_ITERATIONS ?= 100
#PERFORMANCE
# export NUM_THREADS_PRE ?= $(shell grep -c ^processor /proc/cpuinfo)
# export NUM_THREADS_ALGO ?= $(shell grep -c ^processor /proc/cpuinfo)
# export NUM_THREADS_KER ?= 1
export NUM_THREADS_PRE ?= 1
export NUM_THREADS_ALGO ?= 1
export NUM_THREADS_KER ?= 1
#EXPERIMENTS
export NUM_TRIALS ?= 1
#GRAPH FROMAT EDGELIST
export FILE_FORMAT ?= 1
export CONVERT_FORMAT ?= 1
#STATS COLLECTION VARIABLES
export BIN_SIZE ?= 1000
export INOUT_STATS ?= 0
export MASK_MODE ?= 0
##################################################
APP_DIR = .
MAKE_DIR = 00_graph_bench
MAKE_NUM_THREADS = $(shell grep -c ^processor /proc/cpuinfo)
MAKE_ARGS = -w -C $(APP_DIR)/$(MAKE_DIR) -j$(MAKE_NUM_THREADS)
#########################################################
# RUN ARGUMENTS #
#########################################################
export ARGS ?= -k -M $(MASK_MODE) -j $(INOUT_STATS) -g $(BIN_SIZE) -z $(FILE_FORMAT) -d $(DATA_STRUCTURES) -a $(ALGORITHMS) -r $(ROOT) -n $(NUM_THREADS_PRE) -N $(NUM_THREADS_ALGO) -K $(NUM_THREADS_KER) -i $(NUM_ITERATIONS) -o $(SORT_TYPE) -p $(PULL_PUSH) -t $(NUM_TRIALS) -e $(TOLERANCE) -F $(FILE_LABEL) -l $(REORDER_LAYER1) -L $(REORDER_LAYER2) -O $(REORDER_LAYER3) -b $(DELTA)
export SNIPER_ARGS ?= -n $(NUM_THREADS_ALGO) -c gainestown -s markers:verbose:markers:stats --roi --profile --no-cache-warming -d $(APP_DIR)/sniper-results
##################################################
##################################################
##############################################
# ACCEL GRAPH TOP LEVEL RULES #
##############################################
.PHONY: help
help:
$(MAKE) help $(MAKE_ARGS)
.PHONY: run
run:
$(MAKE) run $(MAKE_ARGS)
.PHONY: sweep-run
sweep-run:
$(MAKE) run-test $(MAKE_ARGS)
.PHONY: run-cache
run-cache:
$(MAKE) run-cache $(MAKE_ARGS)
.PHONY: sweep-cache
sweep-cache:
$(MAKE) sweep-cache $(MAKE_ARGS)
.PHONY: run-sniper
run-sniper:
$(MAKE) run-sniper $(MAKE_ARGS)
.PHONY: debug-cache
debug-cache:
$(MAKE) debug-cache $(MAKE_ARGS)
.PHONY: run-openmp
run-openmp:
$(MAKE) run-openmp $(MAKE_ARGS)
.PHONY: convert
convert:
$(MAKE) convert $(MAKE_ARGS)
.PHONY: sweep-convert
sweep-convert:
$(MAKE) sweep-convert $(MAKE_ARGS)
.PHONY: echo-dir
echo-dir:
$(MAKE) echo-dir $(MAKE_ARGS)
.PHONY: convert-w
convert-w:
$(MAKE) convert-w $(MAKE_ARGS)
.PHONY: stats-openmp
stats-openmp: graph-openmp
$(MAKE) stats-openmp $(MAKE_ARGS)
.PHONY: debug-openmp
debug-openmp:
$(MAKE) debug-openmp $(MAKE_ARGS)
.PHONY: debug-memory-openmp
debug-memory-openmp:
$(MAKE) debug-memory-openmp $(MAKE_ARGS)
.PHONY: test-verbose
test-verbose:
$(MAKE) test-verbose $(MAKE_ARGS)
# test files
.PHONY: test
test:
$(MAKE) test $(MAKE_ARGS)
.PHONY: run-test
run-test:
$(MAKE) run-test $(MAKE_ARGS)
.PHONY: run-test-openmp
run-test-openmp:
$(MAKE) run-test-openmp $(MAKE_ARGS)
.PHONY: debug-test-openmp
debug-test-openmp:
$(MAKE) debug-test-openmp $(MAKE_ARGS)
.PHONY: debug-memory-test-openmp
debug-memory-test-openmp:
$(MAKE) debug-memory-test-openmp $(MAKE_ARGS)
# cache performance
.PHONY: cachegrind-perf-openmp
cachegrind-perf-openmp:
$(MAKE) cachegrind-perf-openmp $(MAKE_ARGS)
.PHONY: cache-perf
cache-perf-openmp:
$(MAKE) cache-perf-openmp $(MAKE_ARGS)
.PHONY: clean
clean:
$(MAKE) clean $(MAKE_ARGS)
.PHONY: clean-obj
clean-obj:
$(MAKE) clean-obj $(MAKE_ARGS)
.PHONY: clean-all
clean-all: clean
.PHONY: scrub
scrub: clean clean-nohup clean-stats
.PHONY: clean-stats
clean-stats:
$(MAKE) clean-stats $(MAKE_ARGS)
.PHONY: clean-nohup
clean-nohup:
@rm -f $(APP_DIR)/nohup.out
##################################################
##################################################