-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
70 lines (54 loc) · 1.8 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
.PHONY: all clean clean-all libcm tabasco test test_CoEVP
FLANN=yes
ifeq ($(FLANN),yes)
FLANN_LOC=../CoEVP/flann/flann/src/cpp
endif
REDIS=yes
ifeq ($(REDIS),yes)
REDIS_LOC=../CoEVP/redis/hiredis
endif
SILO=yes
ifeq ($(SILO),yes)
SILO_LOC=../CoEVP/silo/silo
SILODIFF=CoEVP/silo/silo/bin/silodiff
endif
TWEMPROXY=no
all: tabasco
libcm:
${MAKE} -C CoEVP FLANN=$(FLANN) REDIS=$(REDIS) SILO=$(SILO) TWEMPROXY=$(TWEMPROXY) CHARM=yes
tabasco: charm++/charm_bin/TabaSCo
charm++/charm_bin/TabaSCo: libcm
${MAKE} -C charm++ FLANN_LOC=$(FLANN_LOC) SILO_LOC=$(SILO_LOC) REDIS_LOC=$(REDIS_LOC)
clean:
${MAKE} -C CoEVP clean
${MAKE} -C charm++ clean
clean-all: clean
${MAKE} -C CoEVP clean-all
get_reference:
${MAKE} -C CoEVP $@
reference:
${MAKE} -C CoEVP $@
test_CoEVP:
${MAKE} -C CoEVP FLANN=$(FLANN) REDIS=$(REDIS) SILO=$(SILO) CHARM=yes test
dummy: ;
TESTFILE=reftest.json
CHARMRUN=../charm++/charm_bin/charmrun ++local ++p 1
test/.charmflags: dummy
mkdir -p test
@[ -f $@ ] || touch $@
@echo "CHARMRUN=$(CHARMRUN)" | cmp -s $@ - || echo "CHARMRUN=$(CHARMRUN)" > $@
TABASCO_OPTS=../charm++/input/$(TESTFILE)
test/.tabascoopts: dummy
mkdir -p test
@[ -f $@ ] || touch $@
@echo "TABASCO_OPTS=$(TABASCO_OPTS)" | cmp -s $@ - || echo "TABASCO_OPTS=$(TABASCO_OPTS)" > $@
STEPS=0500
#bit hackish, but let's assume we have $(STEPS) steps
test/taylor_$(STEPS).silo: charm++/charm_bin/TabaSCo test/.charmflags test/.tabascoopts
mkdir -p test
cd test && $(CHARMRUN) ../charm++/charm_bin/TabaSCo $(TABASCO_OPTS)
SILODIFF_OPTS=-A 1e-8 -E _hdf5libinfo
test: test/taylor_$(STEPS).silo
@[ -x "$(SILODIFF)" ] || { echo "SILODIFF=$(SILODIFF) seems to be wrong" && exit 1; }
$(SILODIFF) ${SILODIFF_OPTS} CoEVP/test/reference test > test/diff
@[ ! -s test/diff ] || { echo "Difference in files" && head -n 50 test/diff && exit 1; }