-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.test
84 lines (66 loc) · 3.24 KB
/
Makefile.test
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
### cg: summarizes cpu usage of running and finished tests
JOBS=$(sort $(wildcard */job*/log))
cg:
ifeq ($(strip $(JOBS)),)
@echo "cg: nothing to do"
else
@$(MAKE) -s $(JOBS:%/log=%/cpu) | grep '^AV ' | awk '{ print $0; N=N+1; T=T+$$4 } END { printf "Total %5.3f\n",T/N}'
endif
compare_cpu: $(suite)/job*/cpu
%/cpu: %/log
@echo " NEW PREV ITEM"
-@paste <( grep 'cputime total' $< | awk '{ if (NF ==5) {print $$3, $$5} else {print $$3, "NA"} }' ) \
<( grep 'cputime total' $(dir $(dir $*))/time | awk '{ print $$3 }' ) \
<( grep 'Running parser(s) on' $< | awk '{ print $$6 }' ) |\
awk 'BEGIN {I=1} \
{ if (NF==4) { \
if ($$1>1.1*$$3 && $$1>500) \
{ F="???" }; \
if ($$3>1.1*$$1 && $$3>500) \
{ F="!!!" }; \
if(F) { printf "%10d %10d %30s %s %4d \n", $$1, $$3, $$4, F, $$2 } \
F=""; \
I=I+1; \
N=N+$$1; \
M=M+$$3 } \
} \
END {print "------------"; \
print "AVERAGES after " I-1 " sentences"; \
printf "AV %10.1f %10.1f %8.5f %30s\n", N/(I-1), M/(I-1), (N/(I-1))/(M/(I-1)),"$*"; \
print "================================================"; \
}'
## for running on the HPC cluster
include $(ALPINO_HOME)/Makefile.hpc
## for errormining:
include $(ALPINO_HOME)/Makefile.errormining
LOGS=*/job*/log
cat=cat
suitepath=../Suites
suite=g_suite
### UPDATE current test score as new baseline score for future reference
### it will echo the required command, not actually do it
upd_all: $(patsubst %/poslemma,%/poslemma.update,$(sort $(wildcard */job*/poslemma)))\
$(patsubst %/score,%/score.update,$(sort $(wildcard */job*/score)))\
$(patsubst %/best,%/best.update,$(sort $(wildcard */job*/best)))\
$(patsubst %/mwu,%/mwu.update,$(sort $(wildcard */job*/mwu)))\
$(patsubst %/time,%/time.update,$(sort $(wildcard */job*/time)))
%/poslemma.update:%/poslemma
@echo cp $< $(dir $(dir $*))/poslemma
%/score.update:%/score
@echo cp $< $(dir $(dir $*))/score
%/best.update:%/best
@echo cp $< $(dir $(dir $*))/best
%/mwu.update:%/mwu
@echo cp $< $(dir $(dir $*))/mwu
%/time.update:%/time
@echo cp $< $(dir $(dir $*))/time
### REMOVE current tests
### it will echo the required command, not actually do it
rm_all:
@for dir in */job*;\
do\
if cmp -s $$dir/score $$dir/../score \
|| cmp -s $$dir/best $$dir/../best ;\
then echo "rm -rf $$dir";\
fi;\
done