-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
99 lines (67 loc) · 2.93 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
CHARMC =../../../ofi-linux-x86_64-cxi-slurmpmi2cray/bin/charmc $(OPTS)
CHARMC_SMP =../../../ofi-linux-x86_64-cxi-slurmpmi2cray-smp/bin/charmc $(OPTS)
CHARMCFLAGS = $(OPTS) -O3
BINARY=histo_nonSmp histo_smp
all: $(BINARY)
include Makefile_htram
.PHONY: histo_nonSmp histo_smp
histo_smp: histo.C histo.ci histo.decl.h histo.def.h libhtram_group_histo.a
$(CHARMC_SMP) histo.ci -DTRAM_SMP -DGROUPBY
$(CHARMC_SMP) $(CHARMCFLAGS) libhtram_group_histo.a -language charm++ -o $@ $< -std=c++1z -DTRAM_SMP -DGROUPBY -DHISTO
ig_smp: smp_ig.C smp_ig.ci smp_ig.decl.h smp_ig.def.h libhtram_group_ig.a
$(CHARMC_SMP) smp_ig.ci -DTRAM_SMP -DGROUPBY
$(CHARMC_SMP) $(CHARMCFLAGS) libhtram_group_ig.a -language charm++ -o $@ $< -std=c++1z -DTRAM_SMP -DGROUPBY -DIG
phold_smp: hello.C hello.ci hello.decl.h hello.def.h libhtram_group_phold.a
$(CHARMC_SMP) hello.ci -DTRAM_SMP -DGROUPBY
$(CHARMC_SMP) $(CHARMCFLAGS) libhtram_group_phold.a -language charm++ -o $@ $< -std=c++1z -DTRAM_SMP -DGROUPBY -DPHOLD
# -tracemode projections
histo_nonSmp: histo.C histo.ci histo.decl.h histo.def.h libtramnonsmp.a
$(CHARMC) histo.ci -DTRAM_NON_SMP
$(CHARMC) $(CHARMCFLAGS) libtramnonsmp.a -language charm++ -o $@ $< -std=c++1z -DTRAM_NON_SMP
histo-non-smp-run: histo_nonSmp
./charmrun +p32 ./histo_nonSmp -n 1000000 -T 10000 +setcpuaffinity
histo-smp-run: histo_smp
./charmrun +p32 ./histo_smp -n 1000000 -T 10000 +setcpuaffinity
ig_nonSmp.decl.h ig_nonSmp.def.h:
$(CHARMC) ig_nonSmp.ci
ig_nonSmp: ig_nonSmp.decl.h ig_nonSmp.def.h tramNonSmp.decl.h libtramnonsmp.a
$(CHARMC) ig_nonSmp.C libtramnonsmp.a -O3 -language charm++ -o $@
.SECONDARY: $(patsubst %.C,%.decl.h,$(wildcard *.C))
.SECONDARY: $(patsubst %.C,%.def.h,$(wildcard *.C))
histo.def.h histo.decl.h: histo.ci.stamp
hello.def.h hello.decl.h: hello.ci.stamp
smp_ig.def.h smp_ig.decl.h: smp_ig.ci.stamp
histo_g.def.h histo_g.decl.h: histo_g.ci.stamp
histo_s.def.h histo_s.decl.h: histo_s.ci.stamp
histo.ci.stamp: histo.ci
$(CHARMC_SMP) $(CHARMCFLAGS) $<
touch $@
smp_ig.ci.stamp: smp_ig.ci
$(CHARMC_SMP) $(CHARMCFLAGS) $<
touch $@
histo_g.ci.stamp: histo.ci
$(CHARMC_SMP) $(CHARMCFLAGS) $< -DGROUPBY=1
touch $@
hello.ci.stamp: hello.ci
$(CHARMC_SMP) $(CHARMCFLAGS) $<
touch $@
histo.o: histo.C histo.decl.h histo.def.h
$(CHARMC_SMP) $(CHARMCFLAGS) -c histo.C
histo_group.o: histo.C histo_g.decl.h histo_g.def.h
$(CHARMC_SMP) $(CHARMCFLAGS) -c histo.C -o histo_group.o -DGROUPBY=1
histo_s.ci.stamp: histo.ci
$(CHARMC_SMP) $(CHARMCFLAGS) $< -DSORTBY=1
touch $@
histo_sort.o: histo.C histo_s.decl.h histo_s.def.h
$(CHARMC_SMP) $(CHARMCFLAGS) -c histo.C -o histo_sort.o -DSORTBY=1
test: $(BINARY)
$(call run, +p4 ./histo 14 8 )
smp-run:
./histo_smp -n 1000000 -T 10000 +setcpuaffinity ++ppn 32 +pemap 0-31 +commap 34
non-smp-run:
./charmrun +p32 ./histo -n 1000000 -T 10000 +setcpuaffinity ++local
clean:
$(MAKE) clean-libs
rm -f *.o *.decl.h *.def.h $(BINARY) charmrun* *.stamp
rm histo_nonsmp
rm histo_smp