forked from kostrzewa/tmLQCD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
176 lines (142 loc) · 5.68 KB
/
Makefile.in
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
srcdir = @srcdir@
top_srcdir = @top_srcdir@
abs_top_srcdir = @abs_top_srcdir@
top_builddir = .
abs_top_builddir = @abs_top_builddir@
builddir = @builddir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
program_transform_name = @program_transform_name@
subdir = .
AR = @AR@
RANLIB = @RANLIB@
CC = @CC@
CCDEP = @CCDEP@
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
DEPFLAGS = @DEPFLAGS@
CPPFLAGS = @CPPFLAGS@
CCLD = @CCLD@
LEX = @LEX@
AUTOCONF = @AUTOCONF@
LIBS = @LIBS@
SHELL = @SHELL@
OPTARGS = @OPTARGS@
SOPTARGS = @SOPTARGS@
DEFS = @DEFS@
GPUDIR = @GPUDIR@
USESUBDIRS = @USESUBDIRS@
NVCC = @NVCC@
GPUMPICOMPILER = @GPUMPICOMPILER@
INCLUDES = @INCLUDES@
LINK = $(CCLD) -o $@ ${LDFLAGS}
LINKLIBS = ${top_builddir}/linalg/liblinalg.a \
${top_builddir}/solver/libsolver.a ${top_builddir}/io/libio.a \
${top_builddir}/buffers/libbuffers.a $(top_builddir)/cu/libcu.a
COMPILE = ${CC} ${DEFS} ${INCLUDES} -o $@ ${CFLAGS}
SMODULES = Hopping_Matrix_nocom tm_times_Hopping_Matrix Hopping_Matrix tm_operators tm_sub_Hopping_Matrix
MODULES = read_input gamma hybrid_update measure_gauge_action start \
expo get_staples update_backward_gauge \
measure_rectangles get_rectangle_staples \
test/check_geometry test/check_xchange \
test/overlaptests clover clover_leaf \
invert_eo invert_doublet_eo update_gauge \
polyakov_loop getopt sighandler reweighting_factor \
source_generation boundary update_tm ranlxd \
mpi_init linsolve deriv_Sb deriv_Sb_D_psi ranlxs \
xchange_deri geometry_eo invert_overlap \
init_moment_field init_gauge_tmp \
xchange_field xchange_gauge prepare_source \
init_gauge_field init_geometry_indices init_spinor_field \
init_dirac_halfspinor xchange_halffield \
Nondegenerate_Matrix nddetratio_monomial \
chebyshev_polynomial_nd Ptilde_nd \
init_chi_spinor_field reweighting_factor_nd \
init_bispinor_field eigenvalues_bi D_psi \
xchange_lexicfield xchange_2fields online_measurement \
monomial det_monomial detratio_monomial update_momenta \
integrator gauge_monomial ndpoly_monomial phmc \
clover_trlog_monomial cloverdet_monomial cloverdetratio_monomial \
little_D block Dov_psi operator poly_monomial measurements pion_norm Dov_proj \
xchange_field_tslice temporalgauge spinor_fft X_psi P_M_eta \
xchange_jacobi jacobi init_jacobi_field \
fatal_error invert_clover_eo gettime @SPI_FILES@ init_omp_accumulators
## the GPU modules (all .cu files in $GPUDIR)
GPUSOURCES := $(wildcard $(srcdir)/$(GPUDIR)/*.cu)
GPUOBJECTS := $(patsubst $(srcdir)/$(GPUDIR)/%.cu, $(GPUDIR)/%.o, $(GPUSOURCES))
#GPUSOURCES_C := $(wildcard $(srcdir)/$(GPUDIR)/*.c)
#GPUOBJECTS_C := $(patsubst $(srcdir)/$(GPUDIR)/%.c, $(GPUDIR)/%.o, $(GPUSOURCES_C))
NOOPTMOD = test/check_xchange test/check_geometry
PROGRAMS = hmc_tm benchmark invert gen_sources \
check_locallity test_lemon hopping_test LapH_ev
ALLOBJ = ${MODULES} ${PROGRAMS} ${SMODULES}
SUBDIRS = ${USESUBDIRS}
# delete the default suffix rules
.SUFFIXES:
all: Makefile all-recursive dep hmc_tm invert
#ifneq (,$(findstring lapack,${LIBS}))
#all: Makefile all-recursive dep hmc_tm invert
#else
#all: Makefile all-recursive dep hmc_tm invert
#endif
# run the GIT-VERSION-GEN script to generate version information in git_hash.h
# making sure that we run in the correct directory
${top_srcdir}/git_hash.h:
@cd @srcdir@ && sh GIT-VERSION-GEN
-include $(addsuffix .d,$(ALLOBJ))
include ${top_srcdir}/Makefile.global
ifneq (,$(findstring lex,${LEX}))
${top_srcdir}/read_input.c: ${top_srcdir}/read_input.l
@${LEX} -Ptmlqcd -i -t ${top_srcdir}/read_input.l > ${top_srcdir}/read_input.c
endif
libhmc.a: ${addsuffix .o, ${MODULES} ${SMODULES}} Makefile
@rm -f libhmc.a
@${AR} cru libhmc.a ${addsuffix .o, ${MODULES} ${SMODULES}}
@$(RANLIB) libhmc.a
@cp libhmc.a ${top_builddir}/lib/libhmc.a
#${addsuffix .o, ${ALLOBJ}}: %.o: ${srcdir}/%.c %.d Makefile $(abs_top_builddir)/config.h
# ${COMPILE} ${OPTARGS} -c $<
$(addsuffix .o,$(filter-out ${NOOPTMOD},${MODULES})): %.o: ${srcdir}/%.c %.d Makefile $(abs_top_builddir)/config.h
${COMPILE} ${OPTARGS} -c $<
#here we don't need optimisation
$(addsuffix .o,$(filter ${NOOPTMOD},${MODULES})): %.o: ${srcdir}/%.c %.d Makefile $(abs_top_builddir)/config.h
${COMPILE} -c $<
${addsuffix .o, ${SMODULES}}: %.o: ${srcdir}/%.c %.d Makefile $(abs_top_builddir)/config.h
${COMPILE} ${SOPTARGS} -c $<
${addsuffix .o, ${PROGRAMS}}: %.o: ${srcdir}/%.c %.d Makefile $(abs_top_builddir)/config.h ${top_srcdir}/git_hash.h
${COMPILE} ${OPTARGS} -c $<
${PROGRAMS}: %: %.o libhmc.a all-recursive
${LINK} $@.o $(GPUOBJECTS) $(GPUOBJECTS_C) $(LIBS)
# The rules for unit tests are kept in a separate file for tidyness
include ${top_srcdir}/Makefile.tests
dep: $(addsuffix .d,$(ALLOBJ))
@ echo "...dependency files built"
install: Makefile
@mkdir -p $(bindir); \
for p in hmc_tm invert; do \
progname=`echo $$p | sed '$(program_transform_name)'`; \
echo "Installing $$p as $$progname in $(bindir)..."; \
cp $$p $(bindir)/$$progname; \
done; \
echo "done";
uninstall: Makefile
for p in hmc_tm invert; do \
progname=`echo $$p | sed '$(program_transform_name)'`; \
echo "Un-Installing $$progname in $(bindir)..."; \
rm $(bindir)/$$progname; \
done; \
echo "done";
compile-clean: compile-clean-recursive Makefile
rm -f *.o *.d test/*.o test/*.d tests/*.o tests/*.d
clean: clean-recursive Makefile
rm -f hmc_tm invert *.o *.d test/*.o test/*.d tests/*.o tests/*.d
distclean: distclean-recursive Makefile
rm -f hmc_tm hybrid *.o *.d *~ Makefile config.log config.status fixed_volume.h
rm -f config.h
.PHONY: all ${top_srcdir}/git_hash.h clean compile-clean distclean dep install \
$(PROGRAMS) all-recursive \
all-debug-recursive all-profile-recursive \
clean-recursive distclean-recursive \
compile-clean-recursive $(LINKLIBS) \
tests libhmc.a