Makefile 3.38 KB
Newer Older
aumgn's avatar
aumgn committed
1
2
3
4
5
PARSEC_INPUTS_URL=http://parsec.cs.princeton.edu/download/3.0/parsec-3.0-input-native.tar.gz
PARSEC_INPUTS_ARCHIVE=tmp/parsec-inputs.tar.gz
PARSEC_INPUTS=tmp/parsec-inputs
PARSECMGMT=benchmarks/parsec/bin/parsecmgmt

aumgn's avatar
aumgn committed
6
7
WORD_COUNT_INPUTS_URL=http://csl.stanford.edu/~christos/data/word_count.tar.gz
WORD_COUNT_INPUTS_ARCHIVE=tmp/word_count_input.tar.gz
aumgn's avatar
aumgn committed
8
HISTOGRAM_INPUT=tmp/histogram_input.bmp
9
10
LIN_REG_INPUTS_URL=http://csl.stanford.edu/~christos/data/linear_regression.tar.gz
LIN_REG_INPUTS_ARCHIVE=tmp/lin_reg_input.tar.gz
aumgn's avatar
aumgn committed
11

aumgn's avatar
aumgn committed
12
.PHONY: install
13
14
15
16
17
install: submodules \
         $(PARSEC_INPUTS) \
         $(WORD_COUNT_INPUTS_ARCHIVE) \
         $(HISTOGRAM_INPUT) \
         $(LIN_REG_INPUTS_ARCHIVE)
aumgn's avatar
aumgn committed
18
19
20

.PHONY: submodules
submodules:
aumgn's avatar
aumgn committed
21
	git submodule update --init --depth 10
aumgn's avatar
aumgn committed
22
23
	make -Ctools/PinThreads
	make -Csrc/mini-volrend
aumgn's avatar
aumgn committed
24
	make -Cbenchmarks/phoenix/phoenix-2.0
aumgn's avatar
aumgn committed
25
26
	make -C. build-parsec

aumgn's avatar
aumgn committed
27
28
29
wastedcores: submodules
	cd tools/wastedcores/tools/visualizations_4.1/sched_profiler; make

aumgn's avatar
aumgn committed
30
.PHONY: build-parsec
aumgn's avatar
aumgn committed
31
build-parsec: build-bodytrack build-streamcluster build-volrend build-lu_cb build-lu_ncb #build-vips
aumgn's avatar
aumgn committed
32
33
34
35
36
37
38
39
40
41
42
43
44

.PHONY: build-bodytrack
build-bodytrack:
	$(PARSECMGMT) -a build -p parsec.bodytrack -c gcc-pthreads

.PHONY: build-streamcluster
build-streamcluster:
	$(PARSECMGMT) -a build -p parsec.streamcluster -c gcc-pthreads

.PHONY: build-volrend
build-volrend:
	$(PARSECMGMT) -a build -p splash2x.volrend -c gcc-pthreads

aumgn's avatar
aumgn committed
45
46
47
48
49
50
51
52
.PHONY: build-lu_cb
build-lu_cb:
	$(PARSECMGMT) -a build -p splash2x.lu_cb -c gcc-pthreads

.PHONY: build-lu_ncb
build-lu_ncb:
	$(PARSECMGMT) -a build -p splash2x.lu_ncb -c gcc-pthreads

aumgn's avatar
aumgn committed
53
54
55
56
.PHONY: build-vips
build-vips:
	$(PARSECMGMT) -a build -p parsec.vips -c gcc-pthreads

aumgn's avatar
aumgn committed
57
58
59
60
61
62
63
64
65
$(PARSEC_INPUTS_ARCHIVE):
	mkdir -p tmp/
	@echo "### Downloading inputs for Parsec (can take a while)"
	wget $(PARSEC_INPUTS_URL) -O $(PARSEC_INPUTS_ARCHIVE)

$(PARSEC_INPUTS): $(PARSEC_INPUTS_ARCHIVE)
	mkdir -p $(PARSEC_INPUTS)
	@echo "### Uncompressing inputs for Parsec (can take a while)"
	tar xzf $(PARSEC_INPUTS_ARCHIVE) -C$(PARSEC_INPUTS) --strip-components 1
aumgn's avatar
aumgn committed
66
67

$(WORD_COUNT_INPUTS_ARCHIVE):
aumgn's avatar
aumgn committed
68
	mkdir -p tmp/
aumgn's avatar
aumgn committed
69
	@echo "### Downloading input for word_count (can take a while)"
aumgn's avatar
aumgn committed
70
71
	wget $(WORD_COUNT_INPUTS_URL) -O $(WORD_COUNT_INPUTS_ARCHIVE)

aumgn's avatar
aumgn committed
72
73
$(HISTOGRAM_INPUT):
	mkdir -p tmp/
aumgn's avatar
aumgn committed
74
	@echo "# Generating input for histogram (can take a while)"
aumgn's avatar
aumgn committed
75
76
	convert -size 30000x30000 xc:gray +noise random $(HISTOGRAM_INPUT)

77
78
79
80
81
$(LIN_REG_INPUTS_ARCHIVE):
	mkdir -p tmp/
	@echo "### Downloading input for word_count (can take a while)"
	wget $(LIN_REG_INPUTS_URL) -O $(LIN_REG_INPUTS_ARCHIVE)

aumgn's avatar
aumgn committed
82
.PHONY: clean-parsec
aumgn's avatar
aumgn committed
83
clean-parsec: clean-bodytrack clean-streamcluster clean-volrend clean-lu_cb clean-lu_ncb #clean-vips
aumgn's avatar
aumgn committed
84
85
86
87
88
89
90
91
92
93
94
95
96

.PHONY: clean-bodytrack
clean-bodytrack:
	$(PARSECMGMT) -a uninstall -p parsec.bodytrack -c gcc-pthreads

.PHONY: clean-streamcluster
clean-streamcluster:
	$(PARSECMGMT) -a uninstall -p parsec.streamcluster -c gcc-pthreads

.PHONY: clean-volrend
clean-volrend:
	$(PARSECMGMT) -a uninstall -p splash2x.volrend -c gcc-pthreads

aumgn's avatar
aumgn committed
97
98
99
100
101
102
103
104
.PHONY: clean-lu_cb
clean-lu_cb:
	$(PARSECMGMT) -a uninstall -p splash2x.lu_cb -c gcc-pthreads

.PHONY: clean-lu_ncb
clean-lu_ncb:
	$(PARSECMGMT) -a uninstall -p splash2x.lu_ncb -c gcc-pthreads

aumgn's avatar
aumgn committed
105
106
107
108
.PHONY: clean-vips
clean-vips:
	$(PARSECMGMT) -a uninstall -p parsec.vips -c gcc-pthreads

aumgn's avatar
aumgn committed
109
.PHONY: clean
aumgn's avatar
aumgn committed
110
111
112
113
114
clean:
	rm -rf tmp
	make -Ctools/PinThreads clean
	make -Csrc/mini-volrend clean
	make -Cbenchmarks/phoenix/phoenix-2.0 clean
aumgn's avatar
aumgn committed
115
	git submodule deinit --force .
aumgn's avatar
aumgn committed
116