-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMake_template.~1.8.~
248 lines (203 loc) · 5.98 KB
/
Make_template.~1.8.~
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
# Makefile for the hybrid mesons with clover fermions
# MIMD version 7
# Makefile for a generic workstation
#
# Generic make-include file for clover_hybrids codes
# This template file defines rules and macros common to all architectures
# It is intended to be an include file for other Makefiles.
# Don't use it by itself!
#
# "make hyb_bicg_clover" uses biconjugate gradient algorithm, lean
# dslash, but all vectors used in congrad().
#
# in all cases, defining "LU" causes the dynamical fermion matrix
# to be the LU preconditioned matrix, on even sites only.
# Edit the Makefiles to change this.
#
MYINCLUDEDIR = .
INCLUDEDIR = ../include
#Where the complex and su3 libraries are
LIBDIR = ../libraries
GLOBAL_HEADERS = ${INCLUDEDIR} ../libraries/include
INLINE_HEADERS = \
../sse/include/ \
../sse2/include/ \
../libraries/include/
MY_HEADERS = \
lattice.h \
params.h \
defines.h \
cl_hyb_includes.h
HEADERS = ${GLOBAL_HEADERS} ${MY_HEADERS} ${INLINE_HEADERS} ${SCIDAC_HEADERS}
# All required object files
# Basic set from current directory
MY_OBJECTS = \
control.o \
copy_site_wilson_vector.o \
f_measure_cl.o \
gauge_info.o \
ksprop_info.o \
mat_invert_clover.o \
setup.o \
smear_links_space.o \
spectrum_hybrids5_cl.o \
spectrum_light_light.o
# Basic set from generic directory
G_OBJECTS = \
ape_smear.o \
check_unitarity.o \
d_plaq4.o \
field_strength.o \
gaugefix2.o \
gauge_utilities.o \
io_detect.o \
io_helpers.o \
io_lat4.o \
io_lat_utils.o \
io_source_cmplx_fm.o \
make_lattice.o \
nersc_cksum.o \
project_su3_hit.o \
remap_stdio_from_args.o \
ranstuff.o \
reunitarize2.o
ifeq ($(strip ${HAVEQIO}),true)
G_OBJECTS += io_scidac.o io_scidac_types.o io_scidac_w.o
endif
# Set from generic_ks directory
G_KS_OBJECTS = \
io_helpers_ks.o \
io_prop_ks.o \
io_prop_ks_fm.o \
ks_source.o \
ks_utilities.o
ifeq ($(strip ${HAVEQIO}),true)
G_KS_OBJECTS += io_scidac_ks.o
endif
# Basic set from generic_wilson directory
G_WILSON_OBJECTS = \
baryon_cont.o \
boundary_flip.o \
canopy2weyl_rot.o \
dirac_utilities.o \
gauss_smear_w.o \
io_source_w_fm.o \
meson_cont.o \
w_baryon.o \
w_meson.o \
w_source.o \
wilson_invert.o
# Basic set from generic_clover directory
G_CLOVER_OBJECTS = \
f_mu_nu.o \
make_clov2.o
# Objects depending on architecture and software package
# Selection of layout
ifeq ($(strip ${QCDOC}),true)
LAYOUT = layout_qcdoc.o # Required
else
ifeq ($(strip ${HAVEQDP}),true)
LAYOUT = layout_qdp.o # Required
else
LAYOUT = layout_hyper_prime.o # Choices possible here
endif
endif
# Selection of the fermion links algorithm
FLINKS_WILSON = ${FLINKS_WILSONQOP}
# Selection of the conjugate gradient algorithm
# The following inverters are not supported in QOP
# so we use the plain MILC version:
CONGRAD_CL = \
cl_solver_utilities.o \
d_cgilu_cl.o \
d_hopilu_cl.o \
d_mrilu_cl.o
# The bicgilu inverter is supported, so select it
ifeq ($(strip ${HAVEQOP}),true)
# Interface to access QOP
CONGRAD_CL += d_bicgilu_cl_qop.o \
d_bicgilu_cl_qop_D.o d_bicgilu_cl_qop_F.o
CONGRAD_CL += ${WILSONINVERTQOP}
else
ifeq ($(strip ${HAVEQDP}),true)
# We don't have a working standalone QDP version of the bicgilu inverter
# so we use the plain MILC code version
CONGRAD_CL += d_bicgilu_cl.o
else
# Plain MILC inverter
CONGRAD_CL += d_bicgilu_cl.o
endif
endif
# For the moment we let the compilation target choose the inverter
#CL_OBJECTS = ${FLINKS_WILSON} ${CONGRAD_CL}
CL_OBJECTS = ${FLINKS_WILSON}
# EDRAM allocation for QCDOC
ifeq ($(strip ${QCDOC}),true)
QCDOC_OBJECTS = qcdoc_alloc.o
endif
ADD_OBJECTS = ${MACHINE_DEP_IO} ${COMMPKG} ${QCDOC_OBJECTS} ${QDP_OBJECTS} \
${SCIDAC_OBJECTS}
# Generic QOP objects
ifeq ($(strip ${HAVEQOP}),true)
ADD_OBJECTS += ${GENERICQOP}
endif
OBJECTS = ${MY_OBJECTS} ${G_OBJECTS} ${G_KS_OBJECTS} ${G_WILSON_OBJECTS} \
${G_CLOVER_OBJECTS} ${LAYOUT} ${CL_OBJECTS} ${ADD_OBJECTS} ${EXTRA_OBJECTS}
#Libraries for complex numbers and su3 functions
P = $(strip ${PRECISION})
QCDLIB = ${LIBDIR}/su3.${P}.a ${LIBDIR}/complex.${P}.a
LIBRARIES = ${QCDLIB} ${SCIDAC_LIBRARIES}
# Default rule for C compilation
.c.o: ; ${CC} -c ${CFLAGS} $<
# To force a full remake when changing targets
LASTMAKE = .lastmake.${MAKEFILE}.${P}.${MYTARGET}
${LASTMAKE}: ${ALL_MAKES}
-/bin/rm -f .lastmake.*
${MAKE} -f ${MAKEFILE} clean
touch ${LASTMAKE}
# All make files used in this compilation
ALL_MAKES = \
Make_template \
${MAKEFILE} \
../Make_template_qop \
../Make_template_scidac \
../generic/Make_template \
../generic_ks/Make_template \
../generic_wilson/Make_template \
../generic_clover/Make_template \
# To force a remake when changing any make file, header, or target
${OBJECTS} : ${HEADERS} ${LASTMAKE} ${ALL_MAKES}
##### Targets:
# Note: we prefer double precison version of inverters {for global sums}
# Optional DEFINES for timing:
# -DIOTIME for I/O timing
# -DPRTIME for propagator timing
# -DCGTIME for cg timing and iterations
hyb_bicg_clover::
${MAKE} -f ${MAKEFILE} target "MYTARGET= $@" \
"DEFINES= -DLU -DBI -DSMEAR=1" \
"EXTRA_OBJECTS= dslash_w3.o d_bicgilu_cl.o cl_solver_utilities.o "
hyb_cg_clover_for::
${MAKE} -f ${MAKEFILE} target "MYTARGET= $@" \
"DEFINES= -DLU -DSMEAR=1 -DFORWARDS_ONLY" \
"EXTRA_OBJECTS= dslash_lean_forwards.o d_cgilu_cl.o \
cl_solver_utilities.o "
clean:
-/bin/rm -f *.o
# Rules for generic routines
include ../generic/Make_template
# Rules for generic_wilson routines
include ../generic_ks/Make_template
# Rules for generic_wilson routines
include ../generic_wilson/Make_template
# Rules for generic_clover routines
include ../generic_clover/Make_template
libmake:
@echo Building libraries with ${MAKELIBRARIES}
cd ${LIBDIR} ;\
${MAKE} -f ${MAKELIBRARIES} "APP_CC=${CC}" "PRECISION=${PRECISION}" all
localmake: ${OBJECTS} ${LIBRARIES}
${LD} -o ${MYTARGET} ${LDFLAGS} \
${OBJECTS} ${QCDLIB} ${ILIB} -lm
touch localmake
target: libmake localmake