-
Notifications
You must be signed in to change notification settings - Fork 34
/
Make_template_combos
561 lines (423 loc) · 15.4 KB
/
Make_template_combos
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
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
# This is not a standalone Makefile
# It is intended to be included in other Makefiles
# It defines standard ccmbinations of generic object files for building code
# These definitions are intended to apply to all builds.
# If you want to customize a build, this list can be used as a starting point
# for making changes.
######################################################################
# Standard lattice routines
######################################################################
# These are required for essentially all applications
STANDARD_OBJECTS = \
blind_data.o \
field_translation.o \
field_utilities.o \
gauge_utilities.o \
io_detect.o \
io_helpers.o \
io_lat_utils.o \
make_lattice.o \
mmap_cache.o \
ranstuff.o \
remap_stdio_from_args.o
ifeq ($(strip ${HAVEQIO}),true)
STANDARD_OBJECTS += file_types_milc_usqcd.o io_scidac.o io_scidac_types.o
endif
ifeq ($(strip ${HAVE_APE_IO}),true)
STANDARD_OBJECTS += io_ape_links.o
endif
# These use the gauge field extensively
GAUGE_OBJECTS = \
ape_smear.o \
check_unitarity.o \
d_plaq4.o \
gaugefix2.o \
io_lat4.o \
momentum_twist.o \
nersc_cksum.o \
path_product.o \
project_su3_hit.o \
reunitarize2.o \
show_generic_opts.o \
show_scidac_opts.o
ifeq ($(strip ${HAVE_GRID}),true)
GAUGE_OBJECTS += gridMap.o milc_to_grid_utilities.o
endif
ifeq ($(strip ${HAVEQOP}),true)
GAUGE_OBJECTS += map_milc_to_qopqdp.o milc_to_qop_utilities.o
endif
ifeq ($(strip ${HAVE_QUDA}),true)
GAUGE_OBJECTS += milc_to_quda_utilities.o d_plaq4_gpu.o ploop3_gpu.o
endif
ifeq ($(strip ${HAVE_QPHIX}),true)
GAUGE_OBJECTS += map_milc_to_qphix.o milc_to_qphix_utilities.o
endif
ifeq ($(strip ${HAVE_QPHIXJ}),true)
GAUGE_OBJECTS += qphixjClovMap.o milc_to_qphixj_utilities.o
endif
ifeq ($(strip ${HAVEFFTW}),true)
FFT_OBJECTS = remap_fftw_fourier.o
else
FFT_OBJECTS = restrict_fourier.o
endif
######################################################################
# Standard fermion routines
######################################################################
# These are needed for either KS or Clover sources:
FERMION_OBJECTS = \
discretize_wf.o \
gammas.o \
io_source_cmplx_fm.o \
phases.o \
quark_source.o \
quark_source_io.o \
quark_source_sink_op.o \
spin_taste_ops.o \
shift_field.o
# These are used to build propagators
KS_LINKS_OBJECTS = \
charge_utilities.o \
fermion_links_from_site.o \
f_meas.o \
gauss_smear_ks.o \
gauss_smear_ks_cpu.o \
gauss_smear_ks_QUDA.o \
grsource_imp.o \
naik_eps_utilities.o \
path_transport.o \
rephase.o \
show_generic_ks_opts.o \
show_hisq_links_opts.o
# These are used to read propagators
KS_IO_OBJECTS = \
io_helpers_ks.o \
io_prop_ks.o
# These are used to compute the hadron correlators
KS_SPECTRUM_OBJECTS = ks_baryon.o
ifeq ($(strip ${HAVE_KS_CONT_GPU}),true)
# use QUDA GPU contraction code
KS_SPECTRUM_OBJECTS += ks_meson_mom_quda.o
else
# otherwise use old CPU contraction code
KS_SPECTRUM_OBJECTS += ks_meson_mom.o
endif
GB_BARYON_OBJECTS = \
gb_baryon_mmap.o \
gb_baryon_snk.o \
gb_baryon_src.o \
gb_baryon_3pt.o \
gb_ops.o
ifeq ($(strip ${HAVEQIO}),true)
KS_IO_OBJECTS += io_scidac_ks.o
endif
# These are used to build propagators
CL_LINKS_OBJECTS = \
gauss_smear_w.o
# These are used to read propagators
CL_IO_OBJECTS = \
canopy2weyl_rot.o \
io_helpers_w.o \
io_prop_w.o \
staggered2naive.o
# These are used to compute the spectrum
CL_SPECTRUM_OBJECTS = \
baryon_cont.o \
w_baryon.o \
w_baryon_hl.o \
w_meson_mom.o \
w_meson_open_mom.o
ifeq ($(strip ${HAVEQIO}),true)
CL_IO_OBJECTS += io_scidac_w.o
endif
# These are used to calculate eigenvectors
EIGEN_OBJECTS = eigen_stuff_helpers.o io_helpers_ks_eigen.o io_ks_eigen.o read_eigen_param.o
ifeq ($(strip ${HAVEQIO}),true)
EIGEN_OBJECTS += io_scidac_ks_eigen.o io_grid_ks_eigen.o
endif
ifeq ($(strip ${HAVE_EIG_GPU}),true)
ifeq ($(strip ${HAVE_GRID}),true)
EIGEN_OBJECTS += eigen_stuff_Grid.o gridStaggEigen.o
else ifeq ($(strip ${HAVE_QUDA}),true)
EIGEN_OBJECTS += eigen_stuff_QUDA.o
else
EIGEN_OBJECTS += must_specify_HAVE_QUDA_or_HAVE_GRID.o
endif
else
ifeq ($(strip ${HAVE_PRIMME}),true)
EIGEN_OBJECTS += eigen_stuff_PRIMME.o
else ifeq ($(strip ${HAVE_QDP}),true)
EIGEN_OBJECTS += eigen_stuff_qdp.o
else ifeq ($(strip ${HAVE_ARPACK}),true)
EIGEN_OBJECTS += eigen_stuff_ARPACK.o
else ifeq ($(strip ${HAVEQDP}),true)
EIGEN_OBJECTS += eigen_stuff_qdp.o jacobi.o
else
# Default solver
EIGEN_OBJECTS += eigen_stuff_Ritz.o jacobi.o
endif
endif
######################################################################
# Staggered fermion links routines
######################################################################
# Standard MILC combinations
FLINKS = fermion_links.o fermion_links_fn_load_milc.o \
fermion_links_fn_twist_milc.o general_staple.o fn_links_milc.o
FLINKS_FN_MILC = fermion_links_milc.o ${FLINKS} ks_action_paths.o
FLINKS_HISQ_MILC = fermion_links_hisq_milc.o fermion_links_hisq_load.o \
${FLINKS} ks_action_paths_hisq.o su3_mat_op.o stout_smear.o
FLINKS_EO_MILC = fermion_links.o fermion_links_milc.o fermion_links_eo_load_milc.o \
eo_links_milc.o ks_action_paths.o
# QUDA support
FLINKS_FN_QUDA = fermion_links_milc.o fermion_links_fn_load_quda.o \
${FLINKS} ks_action_paths.o
FLINKS_HISQ_QUDA = fermion_links.o fermion_links_fn_load_quda.o \
fermion_links_fn_twist_milc.o fn_links_milc.o \
ks_action_paths_hisq.o su3_mat_op.o stout_smear.o \
fermion_links_hisq_milc.o fermion_links_hisq_load.o
# GRID support
FLINKS_FN_GRID = fermion_links_milc.o \
fermion_links_hisq_load_grid.o fermion_links_hisq_load_grid_D.o fermion_links_hisq_load_grid_F.o \
gridHISQLinks.o ${FLINKS} ks_action_paths.o
FLINKS_HISQ_GRID = fermion_links_hisq_milc.o \
fermion_links_hisq_load.o \
fermion_links_hisq_load_grid.o fermion_links_hisq_load_grid_D.o fermion_links_hisq_load_grid_F.o \
gridHISQLinks.o ${FLINKS} ks_action_paths_hisq.o su3_mat_op.o stout_smear.o
# Standard QOP combinations
FLINKS_QOP = fermion_links.o
FLINKS_FN_QOP = ${FLINKS_QOP} fn_links_qop.o fermion_links_asqtad_qop.o \
fermion_links_fn_twist_qop.o ks_action_coeffs_asqtad_qop.o ks_action_paths.o
FLINKS_HISQ_QOP = ${FLINKS_QOP} fn_links_qop.o hisq_links_qop.o \
fermion_links_hisq_qop.o fermion_links_fn_twist_qop.o \
ks_action_coeffs_hisq_qop.o ks_action_paths_hisq.o \
su3_mat_op.o
# Generic actions are not supported in QOP, so we use MILC
FLINKS_EO_QOP = ${FLINKS_EO_MILC}
ifeq ($(strip ${HAVE_FL_GPU}),true)
ifeq ($(strip ${HAVE_QUDA}),true)
FLINKS_FN = ${FLINKS_FN_QUDA}
FLINKS_EO = ${FLINKS_EO_MILC}
FLINKS_HISQ = ${FLINKS_HISQ_QUDA}
else ifeq ($(strip ${HAVE_GRID}),true)
FLINKS_FN = ${FLINKS_FN_GRID}
FLINKS_EO = ${FLINKS_EO_MILC}
FLINKS_HISQ = ${FLINKS_HISQ_GRID}
endif
else
ifeq ($(strip ${HAVEQOP}),true)
FLINKS_FN = ${FLINKS_FN_QOP}
FLINKS_EO = ${FLINKS_EO_QOP}
FLINKS_HISQ = ${FLINKS_HISQ_QOP}
else
FLINKS_FN = ${FLINKS_FN_MILC}
FLINKS_EO = ${FLINKS_EO_MILC}
FLINKS_HISQ = ${FLINKS_HISQ_MILC}
endif
endif
######################################################################
# Staggered Dslash routine
######################################################################
# Standard MILC
# Choices here are dslash_fn.o dslash_fn2.o dslash_fn_dblstore.o
ifeq ($(strip ${HAVE_QUDA}),true)
# When using QUDA, the back links are not used and just add unnecessary overhead
DSLASH_FN_MILC = dslash_fn.o
else
DSLASH_FN_MILC = dslash_fn_dblstore.o
endif
# No other choice
DSLASH_EO = dslash_eo.o
DSLASH_CL = dslash_w_space.o dslash_w3.o
# Standard QOP
DSLASH_FN_QOP = dslash_fn_qop.o
######################################################################
# Staggered single-mass inverters
######################################################################
# Standard MILC combinations
CONGRAD_FN_BASE = mat_invert.o ks_invert.o d_congrad5_fn.o d_congrad_opt.o report_invert_status.o
CONGRAD_FN_MILC_CPU = d_congrad5_two_src.o d_congrad5_fn_milc.o ${CONGRAD_FN_BASE}
# No other choice
CONGRAD_EO = d_congrad5_eo.o d_congrad_opt.o mat_invert.o ks_invert.o report_invert_status.o
# GRID support
CONGRAD_FN_GRID = d_congrad5_two_src.o d_congrad5_fn_grid.o \
d_congrad5_fn_grid_D.o d_congrad5_fn_grid_F.o d_congrad5_fn_milc.o \
gridStaggInvert.o ${CONGRAD_FN_BASE}
# QUDA support
CONGRAD_FN_QUDA = d_congrad5_fn_quda.o ${CONGRAD_FN_MILC_CPU}
# QPHIX support
CONGRAD_FN_QPHIX = d_congrad5_two_src.o d_congrad5_fn_qphix.o \
d_congrad5_fn_qphix_D.o d_congrad5_fn_qphix_F.o d_congrad5_fn_milc.o \
${CONGRAD_FN_BASE}
# Standard QOP combinations
CONGRAD_FN_QOP = d_congrad5_fn_qop_two_src.o d_congrad5_fn_qop.o \
d_congrad5_fn_qop_D.o d_congrad5_fn_qop_F.o ${CONGRAD_FN_BASE}
ifeq ($(strip ${HAVE_FN_CG_GPU}),true)
ifeq ($(strip ${HAVE_QUDA}),true)
CONGRAD_FN_MILC = ${CONGRAD_FN_QUDA}
else ifeq ($(strip ${HAVE_GRID}),true)
CONGRAD_FN_MILC = ${CONGRAD_FN_GRID}
else ifeq ($(strip ${HAVE_QPHIX}),true)
CONGRAD_FN_MILC = ${CONGRAD_FN_QPHIX}
endif
else
CONGRAD_FN_MILC = ${CONGRAD_FN_MILC_CPU}
endif
######################################################################
# Staggered multimass inverters
######################################################################
# Standard MILC combinations
MULTI_INV_FN_MILC_CPU = ks_multicg.o ks_multicg_offset.o
# No other choice
MULTI_INV_EO = ks_multicg.o ks_multicg_offset.o
# QUDA support
MULTI_INV_FN_QUDA = ks_multicg_offset_quda.o ${MULTI_INV_FN_MILC_CPU}
# Grid support
MULTI_INV_FN_GRID = ks_multicg_offset_grid.o ${MULTI_INV_FN_MILC_CPU} \
ks_multicg_offset_grid_D.o ks_multicg_offset_grid_F.o
# QPHIX support
MULTI_INV_FN_QPHIX = ks_multicg.o ks_multicg_offset_qphix.o \
ks_multicg_offset_qphix_D.o ks_multicg_offset_qphix_F.o
# Standard QOP combinations
MULTI_INV_FN_QOP = ks_multicg.o ks_multicg_offset_qop.o \
ks_multicg_offset_qop_D.o ks_multicg_offset_qop_F.o
ifeq ($(strip ${HAVE_FN_CG_GPU}),true)
ifeq ($(strip ${HAVE_QUDA}),true)
MULTI_INV_FN_MILC = ${MULTI_INV_FN_QUDA}
else ifeq ($(strip ${HAVE_GRID}),true)
MULTI_INV_FN_MILC = ${MULTI_INV_FN_GRID}
else ifeq ($(strip ${HAVE_QPHIX}),true)
MULTI_INV_FN_MILC = ${MULTI_INV_FN_QPHIX}
endif
else
MULTI_INV_FN_MILC = ${MULTI_INV_FN_MILC_CPU}
endif
######################################################################
# Staggered fermion force routines
######################################################################
# Standard MILC CPU combinations
ASQ_FORCE_MILC = fermion_force_asqtad.o fermion_force_multi.o \
fermion_force_fn_multi.o ff_opt.o
HISQ_FORCE_MILC = fermion_force_hisq_multi.o fermion_force_hisq_multi_cpu.o \
show_hisq_force_opts.o
# For 2 and 2+1 flavor (one-term and two-term only)
EO_FORCE = fermion_force_eo_milc.o show_hisq_force_opts.o
# QOP support
ASQ_FORCE_QOP = fermion_force_asqtad_qop.o fermion_force_asqtad_qop_F.o \
fermion_force_asqtad_qop_D.o ff_opt.o ${FORCE_OPTS}
HISQ_FORCE_QOP = fermion_force_hisq_qop.o fermion_force_hisq_qop_F.o \
fermion_force_hisq_qop_D.o show_hisq_force_opts.o
# QUDA support
ASQ_FORCE_QUDA = ${ASQ_FORCE_MILC} fermion_force_asqtad_gpu.o
HISQ_FORCE_QUDA = fermion_force_hisq_multi.o fermion_force_hisq_multi_quda.o \
show_hisq_force_opts.o
# GRID support
HISQ_FORCE_GRID = fermion_force_hisq_multi.o fermion_force_hisq_multi_grid.o \
show_hisq_force_opts.o
# Define ASQ_FORCE and HISQ_FORCE depending on compilation parameters
ifeq ($(strip ${HAVE_FF_GPU}),true)
ifeq ($(strip ${HAVE_QUDA}),true)
ASQ_FORCE = ${ASQ_FORCE_QUDA}
HISQ_FORCE = ${HISQ_FORCE_QUDA}
else ifeq ($(strip ${HAVE_GRID}),true)
HISQ_FORCE = ${HISQ_FORCE_GRID}
endif
else
ifeq ($(strip ${HAVEQOP}),true)
ASQ_FORCE = ${ASQ_FORCE_QOP}
HISQ_FORCE = ${HISQ_FORCE_QOP}
else
ASQ_FORCE = ${ASQ_FORCE_MILC}
HISQ_FORCE = ${HISQ_FORCE_MILC}
endif
endif
######################################################################
# Clover link creation
######################################################################
FLINKS_CL = f_mu_nu.o make_clov2.o
######################################################################
# Clover inverters
######################################################################
CONGRAD_CL_BASE = d_cgilu_cl.o d_hopilu_cl.o d_mrilu_cl.o cl_solver_utilities.o \
wilson_invert.o
CONGRAD_CL_QOP = d_bicgilu_cl_qop.o d_bicgilu_cl_qop_D.o d_bicgilu_cl_qop_F.o \
${CONGRAD_CL_BASE}
# Standard MILC combinations
CONGRAD_CL_MILC_CPU = d_bicgilu_cl.o ${CONGRAD_CL_BASE}
# GPU support
CONGRAD_CL_MILC_GPU = d_bicgilu_cl_gpu.o ${CONGRAD_CL_BASE}
# QPHIXJ support
# CONGRAD_CL_MILC_QPHIXJ = d_bicgilu_cl_qphixj.o d_bicgilu_cl_qphixj_F.o \
# d_bicgilu_cl_qphixj_D.o ${CONGRAD_CL_BASE}
# QPHIXJ support
CONGRAD_CL_MILC_QPHIXJ = d_bicgilu_cl_qphixj.o qphixjClovInvert.o \
d_bicgilu_cl_qphixj_F.o d_bicgilu_cl_qphixj_D.o ${CONGRAD_CL_BASE}
ifeq ($(strip ${HAVE_CL_GPU}),true)
CONGRAD_CL_MILC = ${CONGRAD_CL_MILC_GPU}
else ifeq ($(strip ${HAVE_QPHIXJ}),true)
CONGRAD_CL_MILC = ${CONGRAD_CL_MILC_QPHIXJ}
else
CONGRAD_CL_MILC = ${CONGRAD_CL_MILC_CPU}
endif
######################################################################
# Gauge force routines
######################################################################
# Standard MILC combinations
GAUGE_FORCE_MILC_CPU = gauge_force_imp.o gauge_stuff.o gauge_action_imp.o ranmom.o
# GPU support
GAUGE_FORCE_MILC_GPU = gauge_force_imp_gpu.o gauge_action_imp_gpu.o gauge_action_imp.o gauge_stuff.o ranmom.o
# Standard QOP combinations
GAUGE_FORCE_QOP = gauge_force_symzk1_qop.o gauge_action_imp.o gauge_stuff.o ranmom.o
# Standard QPhiX combinations
GAUGE_FORCE_QPHIX = gauge_force_symzk1_qphix.o gauge_stuff.o ranmom.o \
gauge_force_symzk1_qphix_D.o gauge_force_symzk1_qphix_F.o
ifeq ($(strip ${HAVE_GF_GPU}),true)
GAUGE_FORCE_MILC = ${GAUGE_FORCE_MILC_GPU}
else
ifeq ($(strip ${HAVE_GF_QPHIX}),true)
GAUGE_FORCE_MILC = ${GAUGE_FORCE_QPHIX}
else
GAUGE_FORCE_MILC = ${GAUGE_FORCE_MILC_CPU}
endif
endif
######################################################################
# QOP or MILC/GPU or QPHIX or GRID
######################################################################
ifeq ($(strip ${HAVEQOP}),true)
# Interface to access QOP
CONGRAD_CL = ${CONGRAD_CL_QOP}
DSLASH_FN = ${DSLASH_FN_QOP}
CONGRAD_FN = ${CONGRAD_FN_QOP}
MULTI_INV_FN = ${MULTI_INV_FN_QOP}
GAUGE_FORCE = ${GAUGE_FORCE_QOP}
else
CONGRAD_CL = ${CONGRAD_CL_MILC}
DSLASH_FN = ${DSLASH_FN_MILC}
CONGRAD_FN = ${CONGRAD_FN_MILC}
MULTI_INV_FN = ${MULTI_INV_FN_MILC}
GAUGE_FORCE = ${GAUGE_FORCE_MILC}
endif
######################################################################
# Standard lists of objects for staggered fermion links and inverters
######################################################################
CL_OBJECTS = \
${CL_LINKS_OBJECTS} \
${FLINKS_CL} \
${CONGRAD_CL} \
${DSLASH_CL}
EO_OBJECTS = \
${KS_LINKS_OBJECTS} \
${FLINKS_EO} \
${CONGRAD_EO} \
${DSLASH_EO} \
${MULTI_INV_EO}
FN_OBJECTS = \
${KS_LINKS_OBJECTS} \
${FLINKS_FN} \
${CONGRAD_FN} \
${DSLASH_FN} \
${MULTI_INV_FN}
HISQ_OBJECTS = \
${KS_LINKS_OBJECTS} \
${FLINKS_HISQ} \
${CONGRAD_FN} \
${DSLASH_FN} \
${MULTI_INV_FN}