-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathMakefile
138 lines (114 loc) · 3.47 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
.PHONY: all clean clean-all lulesh libcm redis flann silo test logger twemproxy protobuf circle
all: lulesh
FLANN=yes
ifeq ($(FLANN),yes)
FLANN_LOC=../flann/flann/src/cpp
FLANN_TARGET=flann
libcm: $(FLANN_TARGET)
endif
REDIS=yes
ifeq ($(REDIS),yes)
REDIS_LOC=../redis/hiredis
REDIS_TARGET=redis
libcm: $(REDIS_TARGET)
endif
SILO=yes
ifeq ($(SILO),yes)
SILO_LOC=../silo/silo
SILODIFF=silo/silo/bin/silodiff
SILO_TARGET=silo
libcm: $(SILO_TARGET)
endif
TWEMPROXY=yes
ifeq ($(TWEMPROXY),yes)
libcm: twemproxy
endif
# LOGGER depends on REDIS=yes
# IF REDIS=no, logging ends up being a NO OP
LOGGER=no
ifeq ($(LOGGER)$(REDIS), yesno)
LOGGER=no
endif
ifeq ($(LOGGER)$(REDIS), yesyes)
LOGGER_LOC=../logger
libcm: logger
endif
PROTOBUF=no
ifeq ($(PROTOBUF),yes)
PROTOBUF_LOC=../serverize/protobuf
CIRCLE_LOC=../serverize/circle
PROTOBUF_TARGET=protobuf
libcm: $(PROTOBUF_TARGET)
endif
FSTRACE=no
USE_SSL=yes
ifeq ($(USE_SSL),no)
CURLFLAG=-k
WGETFLAG=--no-check-certificate
endif
libcm: vpsc taylor
lulesh: LULESH/lulesh
LULESH/lulesh: libcm
${MAKE} -C LULESH FLANN_LOC=$(FLANN_LOC) SILO_LOC=$(SILO_LOC) REDIS_LOC=$(REDIS_LOC) LOGGER_LOC=$(LOGGER_LOC) ROTOBUF_LOC=$(PROTOBUF_LOC) CIRCLE_LOC=$(CIRCLE_LOC) FSTRACE=$(FSTRACE) $(FORTRAN_FLAGS)
vpsc:
${MAKE} -C CM/src/fine_scale_models/fortran modules
taylor:
${MAKE} -C CM/src/fine_scale_models/fortran Taylor
libcm:
${MAKE} -C CM/exec REDIS=$(REDIS) FLANN=$(FLANN) TWEMPROXY=$(TWEMPROXY) FSTRACE=$(FSTRACE) LOGGER=$(LOGGER) PROTOBUF=$(PROTOBUF)
redis:
${MAKE} -C redis CURLFLAG=$(CURLFLAG) WGETFLAG=$(WGETFLAG)
silo:
${MAKE} -C silo CURLFLAG=$(CURLFLAG) WGETFLAG=$(WGETFLAG)
flann:
${MAKE} -C flann CURLFLAG=$(CURLFLAG) WGETFLAG=$(WGETFLAG)
twemproxy:
${MAKE} -C twemproxy CURLFLAG=$(CURLFLAG) WGETFLAG=$(WGETFLAG)
logger: redis
${MAKE} -C logger REDIS=$(REDIS) REDIS_LOC=$(REDIS_LOC)
protobuf:
${MAKE} -C serverize protobuf CURLFLAG=$(CURLFLAG) WGETFLAG=$(WGETFLAG)
circle:
${MAKE} -C serverize/circle
clean:
${MAKE} -C CM/src/fine_scale_models/fortran clean
${MAKE} -C CM/exec realclean
${MAKE} -C LULESH clean
rm -rf test/*.silo
clean-all: clean
${MAKE} -C redis clean
${MAKE} -C flann clean
${MAKE} -C silo clean
${MAKE} -C twemproxy clean
${MAKE} -C logger clean
${MAKE} -C serverize/protobuf clean
${MAKE} -C serverize/circle clean
COEVP_REFERENCE_BRANCH=master
get_reference:
mkdir -p test/reference
git clone https://github.com/exmatex/CoEVP_reference.git test/reference
git -C test/reference checkout ${COEVP_REFERENCE_BRANCH}
LULESH_OPTS=-p 4 -v 20
reference: LULESH/lulesh
@[ "$(SILO)" = "yes" ] || { echo "make test needs SILO=yes" && exit 1; }
mkdir -p test/reference
cd test/reference && ../../LULESH/lulesh $(LULESH_OPTS)
dummy: ;
test/.mpirunflags: dummy
mkdir -p test
@[ -f $@ ] || touch $@
@echo "MPIRUN=$(MPIRUN)" | cmp -s $@ - || echo "MPIRUN=$(MPIRUN)" > $@
test/.luleshopts: dummy
mkdir -p test
@[ -f $@ ] || touch $@
@echo "LULESH_OPTS=$(LULESH_OPTS)" | cmp -s $@ - || echo "LULESH_OPTS=$(LULESH_OPTS)" > $@
STEPS=0500
#bit hackish, but let's assume we have $(STEPS) steps
test/taylor_$(STEPS).silo: LULESH/lulesh test/.mpirunflags test/.luleshopts
mkdir -p test
cd test && $(MPIRUN) ../LULESH/lulesh $(LULESH_OPTS)
SILODIFF_OPTS=-A 1e-8 -E _hdf5libinfo
test: test/taylor_$(STEPS).silo silo
@[ -x "$(SILODIFF)" ] || { echo "SILODIFF=$(SILODIFF) seems to be wrong" && exit 1; }
$(SILODIFF) ${SILODIFF_OPTS} test/reference test > test/diff
@[ ! -s test/diff ] || { echo "Difference in files" && head -n 50 test/diff && exit 1; }