Skip to content

Commit 18c7844

Browse files
committed
Merge pull request etmc#165 from urbach/NDTwistedClover
Non-degenerate twisted doublet with clover term and a number of bugfixes related to parallelization and RNG initialization.
2 parents f047ac7 + 7816296 commit 18c7844

File tree

243 files changed

+10539
-6767
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

243 files changed

+10539
-6767
lines changed

LapH_ev.c

+2-4
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,10 @@
4949
#include "geometry_eo.h"
5050
#include "read_input.h"
5151
#include "start.h"
52-
#include "xchange.h"
53-
#include "init_gauge_field.h"
54-
#include "init_geometry_indices.h"
52+
#include "xchange/xchange.h"
53+
#include "init/init.h"
5554
#include "mpi_init.h"
5655
#include "solver/eigenvalues_Jacobi.h"
57-
#include "init_jacobi_field.h"
5856

5957
int main(int argc,char *argv[])
6058
{

Makefile.global

+3-14
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,13 @@ $(abs_top_builddir)/config.h: $(top_srcdir)/config.h.in $(abs_top_builddir)/conf
2323
$(top_srcdir)/configure: $(top_srcdir)/configure.in
2424
-( cd $(top_srcdir) && $(AUTOCONF) )
2525

26-
#extern modules
27-
28-
$(addsuffix .o,$(EXTERNMODULES)): %.o:
29-
( cd $(dir $@) && ${MAKE} $(notdir $@) )
30-
31-
#extern libs
32-
33-
$(LINKLIBS): %.a: Makefile $(abs_top_builddir)/config.status $(top_srcdir)/configure
34-
@( cd $(dir $@) && ${MAKE} $(notdir $@) )
35-
3626
#dep rules
3727

3828
# PROGRAMS_WITH_GIT_HASH require git_hash.h which is dynamically built by a phony make target
3929
# to prevent too frequent building of git_hash (slowing down the build)
4030
# we filter the list of all objects and treat these separately
4131
$(addsuffix .d, $(filter-out ${PROGRAMS_WITH_GIT_HASH},${ALLOBJ})): %.d: ${srcdir}/%.c Makefile
42-
@ $(CCDEP) ${DEPFLAGS} ${CPPFLAGS} ${INCLUDES} ${DEFS} $< > $@
32+
@ $(CCDEP) ${DEPFLAGS} ${DEFS} ${INCLUDES} $< > $@
4333

4434
# dirty hack to prevent make from entering an infinite loop because a phony target is given as a real
4535
# dependency (make will build invert.d and hmc_tm.d indefinitely)
@@ -49,13 +39,12 @@ $(addsuffix .d, $(filter-out ${PROGRAMS_WITH_GIT_HASH},${ALLOBJ})): %.d: ${srcdi
4939
# irrelevant because it will be rebuilt during the compilation of either invert or hmc_tm
5040
ifneq (git_hash.h, $(findstring git_hash.h,$(wildcard $(top_srcdir)/git_has*.h)))
5141
$(addsuffix .d, $(filter ${PROGRAMS_WITH_GIT_HASH},${ALLOBJ})): %.d: ${srcdir}/%.c ${top_srcdir}/git_hash.h Makefile
52-
@ $(CCDEP) ${DEPFLAGS} ${CPPFLAGS} ${INCLUDES} ${DEFS} $< > $@
42+
@ $(CCDEP) ${DEPFLAGS} ${DEFS} ${INCLUDES} $< > $@
5343
else
5444
$(addsuffix .d, $(filter ${PROGRAMS_WITH_GIT_HASH},${ALLOBJ})): %.d: ${srcdir}/%.c Makefile
55-
@ $(CCDEP) ${DEPFLAGS} ${CPPFLAGS} ${INCLUDES} ${DEFS} $< > $@
45+
@ $(CCDEP) ${DEPFLAGS} ${DEFS} ${INCLUDES} $< > $@
5646
endif
5747

58-
5948
${top_builddir}/fixed_volume.h: ${top_srcdir}/fixed_volume.h.in ${top_builddir}/config.status
6049
cd ${abs_top_builddir} && CONFIG_FILES=fixed_volume.h CONFIG_HEADERS= $(SHELL) ${top_builddir}/config.status
6150

Makefile.in

+20-43
Original file line numberDiff line numberDiff line change
@@ -31,43 +31,29 @@ USESUBDIRS = @USESUBDIRS@
3131
NVCC = @NVCC@
3232
GPUMPICOMPILER = @GPUMPICOMPILER@
3333

34-
3534
INCLUDES = @INCLUDES@
3635
LINK = $(CCLD) -o $@ ${LDFLAGS}
37-
LINKLIBS = ${top_builddir}/linalg/liblinalg.a \
38-
${top_builddir}/solver/libsolver.a ${top_builddir}/io/libio.a \
39-
${top_builddir}/buffers/libbuffers.a $(top_builddir)/cu/libcu.a
4036

4137
COMPILE = ${CC} ${DEFS} ${INCLUDES} -o $@ ${CFLAGS}
4238

43-
SMODULES = Hopping_Matrix_nocom tm_times_Hopping_Matrix Hopping_Matrix tm_operators tm_sub_Hopping_Matrix
39+
SMODULES =
4440

4541
MODULES = read_input gamma hybrid_update measure_gauge_action start \
4642
expo get_staples update_backward_gauge \
4743
measure_rectangles get_rectangle_staples \
4844
test/check_geometry test/check_xchange \
49-
test/overlaptests clover clover_leaf \
45+
test/overlaptests \
5046
invert_eo invert_doublet_eo update_gauge \
5147
polyakov_loop getopt sighandler reweighting_factor \
5248
source_generation boundary update_tm ranlxd \
53-
mpi_init linsolve deriv_Sb deriv_Sb_D_psi ranlxs \
54-
xchange_deri geometry_eo invert_overlap \
55-
init_moment_field init_gauge_tmp \
56-
xchange_field xchange_gauge prepare_source \
57-
init_gauge_field init_geometry_indices init_spinor_field \
58-
init_dirac_halfspinor xchange_halffield \
59-
Nondegenerate_Matrix nddetratio_monomial \
60-
chebyshev_polynomial_nd Ptilde_nd \
61-
init_chi_spinor_field reweighting_factor_nd \
62-
init_bispinor_field eigenvalues_bi D_psi \
63-
xchange_lexicfield xchange_2fields online_measurement \
64-
monomial det_monomial detratio_monomial update_momenta \
65-
integrator gauge_monomial ndpoly_monomial phmc \
66-
clover_trlog_monomial cloverdet_monomial cloverdetratio_monomial \
67-
little_D block Dov_psi operator poly_monomial measurements pion_norm Dov_proj \
68-
xchange_field_tslice temporalgauge spinor_fft X_psi P_M_eta \
69-
xchange_jacobi jacobi init_jacobi_field \
70-
fatal_error invert_clover_eo gettime @SPI_FILES@ init_omp_accumulators
49+
mpi_init deriv_Sb deriv_Sb_D_psi ranlxs \
50+
geometry_eo invert_overlap \
51+
prepare_source chebyshev_polynomial_nd Ptilde_nd \
52+
reweighting_factor_nd \
53+
online_measurement update_momenta integrator phmc \
54+
little_D block operator measurements pion_norm \
55+
temporalgauge spinor_fft X_psi P_M_eta \
56+
jacobi fatal_error invert_clover_eo gettime @SPI_FILES@
7157

7258
## the GPU modules (all .cu files in $GPUDIR)
7359
GPUSOURCES := $(wildcard $(srcdir)/$(GPUDIR)/*.cu)
@@ -76,7 +62,6 @@ GPUOBJECTS := $(patsubst $(srcdir)/$(GPUDIR)/%.cu, $(GPUDIR)/%.o, $(GPUSOURCES))
7662
#GPUSOURCES_C := $(wildcard $(srcdir)/$(GPUDIR)/*.c)
7763
#GPUOBJECTS_C := $(patsubst $(srcdir)/$(GPUDIR)/%.c, $(GPUDIR)/%.o, $(GPUSOURCES_C))
7864

79-
8065
NOOPTMOD = test/check_xchange test/check_geometry
8166

8267
PROGRAMS = hmc_tm benchmark invert gen_sources \
@@ -88,18 +73,15 @@ SUBDIRS = ${USESUBDIRS}
8873
# delete the default suffix rules
8974
.SUFFIXES:
9075

91-
all: Makefile all-recursive dep hmc_tm invert
76+
all: Makefile dep $(SUBDIRS) hmc_tm invert benchmark
9277

93-
#ifneq (,$(findstring lapack,${LIBS}))
94-
#all: Makefile all-recursive dep hmc_tm invert
95-
#else
96-
#all: Makefile all-recursive dep hmc_tm invert
97-
#endif
78+
$(SUBDIRS):
79+
$(MAKE) --directory=$@
9880

9981
# run the GIT-VERSION-GEN script to generate version information in git_hash.h
10082
# making sure that we run in the correct directory
10183
${top_srcdir}/git_hash.h:
102-
@cd @srcdir@ && sh GIT-VERSION-GEN
84+
@ ( cd @srcdir@ && sh GIT-VERSION-GEN )
10385

10486
-include $(addsuffix .d,$(ALLOBJ))
10587

@@ -116,9 +98,6 @@ libhmc.a: ${addsuffix .o, ${MODULES} ${SMODULES}} Makefile
11698
@$(RANLIB) libhmc.a
11799
@cp libhmc.a ${top_builddir}/lib/libhmc.a
118100

119-
#${addsuffix .o, ${ALLOBJ}}: %.o: ${srcdir}/%.c %.d Makefile $(abs_top_builddir)/config.h
120-
# ${COMPILE} ${OPTARGS} -c $<
121-
122101
$(addsuffix .o,$(filter-out ${NOOPTMOD},${MODULES})): %.o: ${srcdir}/%.c %.d Makefile $(abs_top_builddir)/config.h
123102
${COMPILE} ${OPTARGS} -c $<
124103

@@ -132,7 +111,7 @@ ${addsuffix .o, ${SMODULES}}: %.o: ${srcdir}/%.c %.d Makefile $(abs_top_builddir
132111
${addsuffix .o, ${PROGRAMS}}: %.o: ${srcdir}/%.c %.d Makefile $(abs_top_builddir)/config.h ${top_srcdir}/git_hash.h
133112
${COMPILE} ${OPTARGS} -c $<
134113

135-
${PROGRAMS}: %: %.o libhmc.a all-recursive
114+
${PROGRAMS}: %: %.o libhmc.a $(SUBDIRS)
136115
${LINK} $@.o $(GPUOBJECTS) $(GPUOBJECTS_C) $(LIBS)
137116

138117
# The rules for unit tests are kept in a separate file for tidyness
@@ -162,15 +141,13 @@ compile-clean: compile-clean-recursive Makefile
162141
rm -f *.o *.d test/*.o test/*.d tests/*.o tests/*.d
163142

164143
clean: clean-recursive Makefile
165-
rm -f hmc_tm invert *.o *.d test/*.o test/*.d tests/*.o tests/*.d
144+
rm -f benchmark hmc_tm invert *.o *.d test/*.o test/*.d tests/*.o tests/*.d
166145

167146
distclean: distclean-recursive Makefile
168-
rm -f hmc_tm hybrid *.o *.d *~ Makefile config.log config.status fixed_volume.h
147+
rm -f benchmark hmc_tm invert *.o *.d *~ Makefile config.log config.status fixed_volume.h
169148
rm -f config.h
170149

171-
.PHONY: all ${top_srcdir}/git_hash.h clean compile-clean distclean dep install \
172-
$(PROGRAMS) all-recursive \
173-
all-debug-recursive all-profile-recursive \
150+
.PHONY: all ${SUBDIRS} ${top_srcdir}/git_hash.h clean compile-clean distclean dep install \
151+
all-recursive all-debug-recursive all-profile-recursive \
174152
clean-recursive distclean-recursive \
175-
compile-clean-recursive $(LINKLIBS) \
176-
tests libhmc.a
153+
compile-clean-recursive

Makefile.tests

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
TESTS = tests/test_sample tests/test_su3 tests/test_buffers tests/test_qpx tests/test_linalg
1+
TESTS = tests/test_sample tests/test_su3 tests/test_buffers tests/test_qpx tests/test_linalg tests/test_clover
22

33
TEMP = $(patsubst %.c,%,$(wildcard $(top_srcdir)/tests/*.c))
44
TESTMODULES = $(patsubst $(top_srcdir)/%,%,$(TEMP))
@@ -47,5 +47,11 @@ TEST_BUFFERS_LIBS:=$(top_builddir)/cu/libcu.a $(top_builddir)/buffers/libbuffers
4747
tests/test_buffers: $(TEST_BUFFERS_OBJECTS) $(TEST_BUFFERS_LIBS)
4848
${LINK} $(TEST_BUFFERS_OBJECTS) $(TESTFLAGS) $(TEST_BUFFERS_FLAGS)
4949

50+
TEST_CLOVER_OBJECTS:=$(patsubst $(top_srcdir)/%.c,%.o,$(wildcard $(top_srcdir)/tests/test_clover*.c)) clover_leaf.o
51+
TEST_CLOVER_FLAGS:=-lm -lhmc -llinalg
52+
TEST_CLOVER_LIBS:=$(top_builddir)/cu/libcu.a
53+
tests/test_clover: $(TEST_CLOVER_OBJECTS) $(TEST_CLOVER_LIBS)
54+
${LINK} $(TEST_CLOVER_OBJECTS) $(TESTFLAGS) $(TEST_CLOVER_FLAGS)
55+
5056
tests: ${TESTS}
5157

0 commit comments

Comments
 (0)