Skip to content

Commit

Permalink
Merge branch 'master' into omf4
Browse files Browse the repository at this point in the history
  • Loading branch information
urbach committed Dec 11, 2012
2 parents 4358cbf + 0437e50 commit 98ee3ee
Show file tree
Hide file tree
Showing 262 changed files with 11,100 additions and 7,245 deletions.
6 changes: 2 additions & 4 deletions LapH_ev.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,10 @@
#include "geometry_eo.h"
#include "read_input.h"
#include "start.h"
#include "xchange.h"
#include "init_gauge_field.h"
#include "init_geometry_indices.h"
#include "xchange/xchange.h"
#include "init/init.h"
#include "mpi_init.h"
#include "solver/eigenvalues_Jacobi.h"
#include "init_jacobi_field.h"

int main(int argc,char *argv[])
{
Expand Down
17 changes: 3 additions & 14 deletions Makefile.global
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,13 @@ $(abs_top_builddir)/config.h: $(top_srcdir)/config.h.in $(abs_top_builddir)/conf
$(top_srcdir)/configure: $(top_srcdir)/configure.in
-( cd $(top_srcdir) && $(AUTOCONF) )

#extern modules

$(addsuffix .o,$(EXTERNMODULES)): %.o:
( cd $(dir $@) && ${MAKE} $(notdir $@) )

#extern libs

$(LINKLIBS): %.a: Makefile $(abs_top_builddir)/config.status $(top_srcdir)/configure
@( cd $(dir $@) && ${MAKE} $(notdir $@) )

#dep rules

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

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


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

Expand Down
63 changes: 20 additions & 43 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -31,43 +31,29 @@ 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
SMODULES =

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 \
test/overlaptests \
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
mpi_init deriv_Sb deriv_Sb_D_psi ranlxs \
geometry_eo invert_overlap \
prepare_source chebyshev_polynomial_nd Ptilde_nd \
reweighting_factor_nd \
online_measurement update_momenta integrator phmc \
little_D block operator measurements pion_norm \
temporalgauge spinor_fft X_psi P_M_eta \
jacobi fatal_error invert_clover_eo gettime @SPI_FILES@

## the GPU modules (all .cu files in $GPUDIR)
GPUSOURCES := $(wildcard $(srcdir)/$(GPUDIR)/*.cu)
Expand All @@ -76,7 +62,6 @@ 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 \
Expand All @@ -88,18 +73,15 @@ SUBDIRS = ${USESUBDIRS}
# delete the default suffix rules
.SUFFIXES:

all: Makefile all-recursive dep hmc_tm invert
all: Makefile dep $(SUBDIRS) hmc_tm invert benchmark

#ifneq (,$(findstring lapack,${LIBS}))
#all: Makefile all-recursive dep hmc_tm invert
#else
#all: Makefile all-recursive dep hmc_tm invert
#endif
$(SUBDIRS):
$(MAKE) --directory=$@

# 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
@ ( cd @srcdir@ && sh GIT-VERSION-GEN )

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

Expand All @@ -116,9 +98,6 @@ libhmc.a: ${addsuffix .o, ${MODULES} ${SMODULES}} Makefile
@$(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 $<

Expand All @@ -132,7 +111,7 @@ ${addsuffix .o, ${SMODULES}}: %.o: ${srcdir}/%.c %.d Makefile $(abs_top_builddir
${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
${PROGRAMS}: %: %.o libhmc.a $(SUBDIRS)
${LINK} $@.o $(GPUOBJECTS) $(GPUOBJECTS_C) $(LIBS)

# The rules for unit tests are kept in a separate file for tidyness
Expand Down Expand Up @@ -162,15 +141,13 @@ 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
rm -f benchmark 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 benchmark hmc_tm invert *.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 \
.PHONY: all ${SUBDIRS} ${top_srcdir}/git_hash.h clean compile-clean distclean dep install \
all-recursive all-debug-recursive all-profile-recursive \
clean-recursive distclean-recursive \
compile-clean-recursive $(LINKLIBS) \
tests libhmc.a
compile-clean-recursive
8 changes: 7 additions & 1 deletion Makefile.tests
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TESTS = tests/test_sample tests/test_su3 tests/test_buffers tests/test_qpx tests/test_linalg
TESTS = tests/test_sample tests/test_su3 tests/test_buffers tests/test_qpx tests/test_linalg tests/test_clover

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

TEST_CLOVER_OBJECTS:=$(patsubst $(top_srcdir)/%.c,%.o,$(wildcard $(top_srcdir)/tests/test_clover*.c)) clover_leaf.o
TEST_CLOVER_FLAGS:=-lm -lhmc -llinalg
TEST_CLOVER_LIBS:=$(top_builddir)/cu/libcu.a
tests/test_clover: $(TEST_CLOVER_OBJECTS) $(TEST_CLOVER_LIBS)
${LINK} $(TEST_CLOVER_OBJECTS) $(TESTFLAGS) $(TEST_CLOVER_FLAGS)

tests: ${TESTS}

Loading

0 comments on commit 98ee3ee

Please sign in to comment.