-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathMakefile
More file actions
78 lines (60 loc) · 2 KB
/
Makefile
File metadata and controls
78 lines (60 loc) · 2 KB
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
TESTDIR:= $(shell pwd)/examples
FPTAYLOR:=$(TESTDIR)/FPTaylor
NUMFUZZ:=$(TESTDIR)/NumFuzz
GAPPA:=$(TESTDIR)/Gappa
# Benchmarks
TEST_INPUTS:= hypot x_by_xy one_by_sqrtxx \
sqrt_add test02_sum8 nonlin1 \
test05_nonlin1 verhulst predatorPrey\
test06_sums4_sum1 test06_sums4_sum2 i4\
Horner2 Horner2_with_er Horner5\
Horner10 Horner20
# Mixed-precision benchmarks
MIXED_PREC := Horner2_with_er_mix sqrt_add_mix sums4_sums2 \
x_by_xy1 x_by_xy2 x_plus_one_by_x predatorPrey_mixed \
verhulst_mixed
.PHONY: autotest clean tests $(TEST_INPUTS) $(MIXED_PREC)
autotest: $(TEST_INPUTS)
$(TEST_INPUTS):
@printf "*** START BENCHMARK: $@ *** \n"
@printf "*** TOOL: NumFuzz *** \n"
@dune exec --no-print-directory -- nfuzz \
$(NUMFUZZ)/$@.fz
@printf "*** END NumFuzz *** \n \n"
@printf "*** BENCHMARK: $@ *** \n"
@printf "*** TOOL: FPTaylor *** \n"
@$(FPTAYLOR)/FPTaylor-0.9.4/fptaylor -c \
$(FPTAYLOR)/config.cfg $(FPTAYLOR)/$@.txt
@printf "*** END FPTAYLOR *** \n \n"
@printf "*** BENCHMARK: $@ *** \n"
@printf "*** TOOL: Gappa *** \n"
@bash -c "time gappa $(GAPPA)/$@.g"
@printf "*** END GAPPA *** \n"
@printf "*** END BENCHMARK: $@ *** \n \n"
$(MIXED_PREC):
@printf "*** START BENCHMARK: $@ *** \n"
@printf "*** TOOL: NumFuzz *** \n"
@dune exec --no-print-directory -- nfuzz \
$(NUMFUZZ)/mixed_precision/$@.fz
@printf "*** END NumFuzz *** \n \n"
@printf "*** BENCHMARK: $@ *** \n"
@printf "*** TOOL: FPTaylor *** \n"
@$(FPTAYLOR)/FPTaylor-0.9.4/fptaylor -c \
$(FPTAYLOR)/config.cfg $(FPTAYLOR)/mixed_precision/$@.txt
@printf "*** END FPTAYLOR *** \n \n"
@printf "*** BENCHMARK: $@ *** \n"
@printf "*** TOOL: Gappa *** \n"
@bash -c "time gappa $(GAPPA)/mixed_precision/$@.g"
@printf "*** END GAPPA *** \n"
@printf "*** END BENCHMARK: $@ *** \n \n"
tests_mixed:
@dune build
@$(MAKE) --no-print-directory $(MIXED_PREC) > mixed_test.txt 2>&1
@./out_table.sh
tests:
@dune build
@$(MAKE) --no-print-directory > tests.txt 2>&1
@./out_table.sh
clean:
rm tests.txt
dune clean