-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmakefile
58 lines (52 loc) · 1.48 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
CREATE_INPUT = create_input
SERIAL = seri
OMP = omp
DGEMM = dgemm
CAN = can
CAN_HYB = can_hyb
VSL = mkl_vsl.mod
CHECK = check
FC = ifort
MPIFC = mpiifort
FCFLAGS = -g -O3 -march=core-avx2 -mcmodel=medium -shared-intel
LDFLAGS =
LIBS = -mkl
OPENMP = -fopenmp
PREP = -fpp
SRCS = $(MKLROOT)/include/mkl_vsl.f90 generate.f seri.f dgemm.f omp.f
.SUFFIXES: .f.o
ALL: $(CREATE_INPUT) $(SERIAL) $(DGEMM) $(OMP) $(CAN) $(CAN_HYB) $(CHECK)
$(VSL): $(MKLROOT)/include/mkl_vsl.f90
ifort -c $(FCFLAGS) $(MKLROOT)/include/mkl_vsl.f90
create_input.o: create_input.f param.f
$(FC) -c $(FCFLAGS) $<
generate.o: generate.f $(VSL)
$(FC) -c $(FCFLAGS) $<
seri.o: seri.f param.f
$(FC) -c $(FCFLAGS) $<
dgemm.o: dgemm.f param.f
$(FC) -c $(FCFLAGS) $<
omp.o: omp.f param.f
$(FC) -c $(OPENMP) $(FCFLAGS) $<
can.o: can.f param.f
$(MPIFC) -c $(FCFLAGS) $<
can_hyb.o: can_hyb.f param.f
$(MPIFC) $(PREP) -c $(OPENMP) $(FCFLAGS) $<
check.o: check.f param.f
$(FC) -c $(OPENMP) $(FCFLAGS) $<
$(CREATE_INPUT): generate.o create_input.o
$(FC) $(LDFLAGS) $(LIBS) $^ -o $@
$(SERIAL): seri.o
$(FC) $^ -o $@
$(DGEMM): dgemm.o
$(FC) $(LDFLAGS) $(LIBS) $^ -o $@
$(OMP): omp.o
$(FC) $(OPENMP) $^ -o $@
$(CAN): can.o
$(MPIFC) $^ -o $@
$(CAN_HYB): can_hyb.o
$(MPIFC) $(OPENMP) $^ -o $@
$(CHECK): check.o
$(FC) $(OPENMP) $^ -o $@
clean:
rm -f *.o *.mod *~ $(SERIAL) $(DGEMM) $(OMP) $(CAN) $(CAN_HYB) $(CREATE_INPUT) $(CHECK) a b c.seri c.omp c.dgemm c.can c.can_hyb