-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile.mike
121 lines (106 loc) · 4.23 KB
/
Makefile.mike
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
INTELHOME=/opt/intel/2019_up5/impi/2019.5.281/intel64
GCCHOME=/opt/gcc/9.2.0
YAMLHOME=/home/Miguel.Zuniga/diag_manager2/libyaml
FIO2HOME=/home/Miguel.Zuniga/FMS/fms2_io
ifeq ($(CC),gcc)
FTN=mpif90
CC=mpicc
MPFTN=mpif90
COMPHOME=$(GCCHOME)
FFLAGS=-Wall -std=f2018 -g -O0 -fopenmp
else ifeq ($(CC),icc)
FTN=mpiifort
CC=mpiicc
MPFTN=mpiifort
COMPHOME=$(INTELHOME)
#FFLAGS=-no-wrap-margin -traceback -stand f18 -g -Wall
#FFLAGS=-stand f18 -g -Wall -Ofast
FFLAGS=-stand f18 -g -qopenmp -warn
endif
INCLUDE= -I$(YAMLHOME)/include -I. -I$(COMPHOME)/include -I$(FIO2HOME) #-I$(FIO2HOME)/include
CFLAGS=-Wall -g
LIB=-L$(YAMLHOME)/install/lib -L$(COMPHOME)/lib -L$(FIO2HOME)
l=-lyaml
#$(FIO2HOME)/fms2_io.F90
all: fms_diag_manager_test
fms_diag_manager_test: fms_diag_manager_test.x
# ./$<
fms_diag_manager_test.x: fms_diag_util.o fms_diag_object.o fms_diag_register.o \
fms_diag_axis.o fms_diag_table.o fms_diag_concur.o \
fms_diag_data.o fms_diag_parse.o fms_c_to_fortran.o fms_diag_send_data.o \
fms_diag_write_data.o fms_diag_averaging.o fms_diag_manager2.o
# $(MPFTN) $(INCLUDE) $(LIB) $(FFLAGS) $(l) $^ test/diag_manager2/diag_manager_test1.F90 -o $@
# mpirun -n 6 ./$@ : -n 7 ./$@
# mpirun -n 6 ./$@
# mpirun -n 10 ./$@
# mpirun -n 5 ./$@ : -n 6 ./$@
# mpirun -n 10 ./$@ : -n 7 ./$@
# mpirun -n 6 ./$@ : -n 6 ./$@
# mpirun -n 6 ./$@ : -n 6 ./$@ : -n 3 ./$@ : -n 6 ./$@ : -n 1 ./$@
# rm $@
$(MPFTN) $(INCLUDE) $(LIB) $(FFLAGS) $(l) $(FFLAGS) $^ test/diag_manager2/diag_manager_test2.F90 -o $@
# ./$@
# make clean
diag_table_test: diag_table_test.x
# make clean
./$<
make clean
parser_test: parser.x
# make clean
./$< diag_yaml
make clean
diag_ave_test: diag_manager_averaging_test.x
# make clean
./$<
make clean
concur: concur.x
# make clean
./$<
make clean
diag_table_test.x: fms_diag_data.o fms_c_to_fortran.o fms_diag_parse.o fms_diag_table.o
$(FTN) $(INCLUDE) $(LIB) $(l) $(FFLAGS) $^ test/diag_table_test.F90 -o $@
diag_manager_averaging_test.x: fms_diag_averaging.o fms_diag_averaging_dummy.o
$(MPFTN) $(INCLUDE) $(LIB) $(l) $(FFLAGS) $^ test/diag_manager2/diag_manager_averaging_test.F90 -o $@
fms_diag_manager2.o:fms_diag_register.o fms_diag_object.o fms_diag_table.o \
fms_diag_data.o fms_diag_concur.o fms_diag_send_data.o fms_diag_write_data.o
$(MPFTN) $(INCLUDE) $(LIB) $(l) $(FFLAGS) $^ fms_diag_manager2.F90 -c
fms_diag_register.o: fms_diag_object.o fms_diag_concur.o fms_diag_data.o
$(MPFTN) $(INCLUDE) $(LIB) $(l) $(FFLAGS) $^ fms_diag_register.F90 -c
fms_diag_table.o: fms_diag_parse.o fms_diag_data.o fms_c_to_fortran.o
$(FTN) $(INCLUDE) $(LIB) $(l) $(FFLAGS) $^ fms_diag_table.F90 -c
fms_diag_data.o:
$(FTN) $(INCLUDE) $(LIB) $(l) $(FFLAGS) $^ fms_diag_data.F90 -c
fms_diag_object.o: fms_diag_table.o fms_diag_data.o fms_diag_axis.o
$(MPFTN) $(INCLUDE) $(LIB) $(l) $(FFLAGS) $^ fms_diag_object.F90 -c
fms_diag_util.o:
$(MPFTN) $(INCLUDE) $(LIB) $(l) $(FFLAGS) $^ fms_diag_util.F90 -c
fms_diag_parse.o:
$(CC) $(INCLUDE) $(LIB) $(l) $(CFLAGS) $^ fms_diag_parse.c -c
fms_diag_concur.o: fms_diag_data.o
$(MPFTN) $(INCLUDE) $(LIB) $(l) $(FFLAGS) $^ fms_diag_concur.F90 -c
fms_c_to_fortran.o:
$(MPFTN) $(INCLUDE) $(LIB) $(l) $(FFLAGS) $^ fms_c_to_fortran.F90 -c
parser.x: fms_diag_parse.o
$(CC) $(INCLUDE) $(LIB) $(l) -dynamic $(CFLAGS) $^ parser.c -o $@
fms_diag_axis.o:
$(FTN) $(INCLUDE) $(LIB) $(l) $(FFLAGS) $^ fms_diag_axis.F90 -c
fms_diag_send_data.o: fms_diag_object.o fms_diag_averaging.o fms_diag_write_data.o
$(FTN) $(INCLUDE) $(LIB) $(l) $(FFLAGS) $^ fms_diag_send_data.F90 -c
fms_diag_write_data.o: fms_diag_object.o fms_diag_averaging.o fms_diag_data.o fms_diag_axis.o
$(FTN) $(INCLUDE) $(LIB) $(l) $(FFLAGS) $^ fms_diag_write_data.F90 -c
fms_diag_averaging.o:
$(FTN) $(INCLUDE) $(LIB) $(l) $(FFLAGS) $^ fms_diag_averaging.F90 -c
fms_diag_averaging_dummy.o:
$(FTN) $(INCLUDE) $(LIB) $(l) $(FFLAGS) $^ fms_diag_averaging_dummy.F90 -c
concur.x: fms_diag_concur.o fms_diag_data.o
$(MPFTN) $(FFLAGS) $^ test/concur/fms_diag_concur_test.F90 -o $@
mpirun -n 6 ./$@ : -n 7 ./$@
mpirun -n 6 ./$@
mpirun -n 5 ./$@ : -n 6 ./$@
mpirun -n 10 ./$@ : -n 7 ./$@
mpirun -n 6 ./$@ : -n 6 ./$@
mpirun -n 6 ./$@ : -n 6 ./$@ : -n 3 ./$@ : -n 6 ./$@ : -n 1 ./$@
clean:
rm -rf *.x *.o *.mod *.swo
#MZ eclipse
distclean : clean