From 792792ce6326be00afda218204d790ef559cc436 Mon Sep 17 00:00:00 2001 From: Mathieu Taillefumier Date: Fri, 12 Jun 2026 17:44:21 +0200 Subject: [PATCH] Added all compiling tests from the test directory --- CMakeLists.txt | 1 + src/bin/CMakeLists.txt | 20 +-- src/lib/CMakeLists.txt | 11 +- src/lib/buffers/Makefile.in | 100 ------------- src/lib/cu/Makefile.in | 80 ---------- src/lib/init/Makefile.in | 100 ------------- src/lib/init/init_stout_smear_vars.c | 1 - src/lib/linalg/Makefile.in | 112 -------------- src/lib/meas/Makefile.in | 95 ------------ src/lib/monomial/Makefile.in | 101 ------------- src/lib/operator/Makefile.in | 93 ------------ src/lib/operator/hopping.h | 210 +++++++++++++-------------- src/lib/rational/Makefile.in | 96 ------------ src/lib/smearing/Makefile.in | 97 ------------- src/lib/wrapper/Makefile.in | 96 ------------ src/lib/xchange/Makefile.in | 98 ------------- tests/CMakeLists.txt | 38 +++++ tests/test_buffers_gauge.c | 2 +- tests/test_rat_init.c | 2 +- 19 files changed, 161 insertions(+), 1192 deletions(-) delete mode 100644 src/lib/buffers/Makefile.in delete mode 100644 src/lib/cu/Makefile.in delete mode 100644 src/lib/init/Makefile.in delete mode 100644 src/lib/linalg/Makefile.in delete mode 100644 src/lib/meas/Makefile.in delete mode 100644 src/lib/monomial/Makefile.in delete mode 100644 src/lib/operator/Makefile.in delete mode 100644 src/lib/rational/Makefile.in delete mode 100644 src/lib/smearing/Makefile.in delete mode 100644 src/lib/wrapper/Makefile.in delete mode 100644 src/lib/xchange/Makefile.in create mode 100644 tests/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index c32101132..a909d9a20 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -399,6 +399,7 @@ endif() configure_file(cmake/git_hash.c.in git_hash.c @ONLY) add_subdirectory(src/lib) add_subdirectory(src/bin) +add_subdirectory(tests) write_basic_package_version_file( "${PROJECT_BINARY_DIR}/tmLQCDConfigVersion.cmake" diff --git a/src/bin/CMakeLists.txt b/src/bin/CMakeLists.txt index f641f8b18..fa522efb1 100644 --- a/src/bin/CMakeLists.txt +++ b/src/bin/CMakeLists.txt @@ -1,4 +1,5 @@ -list(APPEND tmlqcd_prog "invert;benchmark;deriv_mg_tune;hmc_tm;offline_measurement") +list(APPEND tmlqcd_prog + "invert;benchmark;deriv_mg_tune;hmc_tm;offline_measurement") include_directories( $ @@ -18,23 +19,22 @@ foreach(_prog ${tmlqcd_prog}) LINKER_LANGUAGE "CXX") endforeach() +# check_locallity; compilation failure scalar_prod_r_test: compilation error +# header file missing test_eigenvalues: observables.h missing if(TM_ENABLE_TESTS) - list( - APPEND - tmlqcd_test_prog - "check_locallity.c;hopping_test.cscalar_prod_r_test.c;test_eigenvalues.c;test_lemon.c" - ) + list(APPEND tmlqcd_test_prog "hopping_test") if(TM_USE_LEMON) - list(APPEND tmlqcd_test_prog test_lemon.c) + list(APPEND tmlqcd_test_prog "test_lemon") endif() if(TN_USE_QPHIX) - list(APPEND tmlqcd_test_prog qphix_test_Dslash.c) + list(APPEND tmlqcd_test_prog "qphix_test_Dslash") endif() foreach(_prog ${tmlqcd_test_prog}) add_executable(${_prog} "${CMAKE_SOURCE_DIR}/src/bin/tests/${_prog}.c") - - target_link_libraries(${_prog} PUBLIC hmc) + target_include_directories(${_prog} + PUBLIC "${CMAKE_SOURCE_DIR}/src/lib/test") + target_link_libraries(${_prog} PUBLIC tmlqcd) set_target_properties( ${_prog} PROPERTIES IMPORTED_LINK_INTERFACE_LANGUAGES "CXX" diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt index 6974f4523..b036f479e 100644 --- a/src/lib/CMakeLists.txt +++ b/src/lib/CMakeLists.txt @@ -420,10 +420,10 @@ target_link_libraries( $<$:lemon::lemon> ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES} - $<$:MPI::MPI_C - MPI::MPI_CXX> - $<$:OpenMP::OpenMP_C - OpenMP::OpenMP_CXX> + $<$:MPI::MPI_C> + $<$:MPI::MPI_CXX> + $<$:OpenMP::OpenMP_C> + $<$:OpenMP::OpenMP_CXX> m) target_compile_definitions( @@ -449,8 +449,7 @@ install( install(FILES "${CMAKE_SOURCE_DIR}/src/lib/include/tmLQCD.h" "${CMAKE_SOURCE_DIR}/src/lib/include/tmlqcd_config.h" - DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}" - ) + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}") install(FILES "${CMAKE_BINARY_DIR}/tmlqcd_config_internal.h" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}") diff --git a/src/lib/buffers/Makefile.in b/src/lib/buffers/Makefile.in deleted file mode 100644 index cfa220ae6..000000000 --- a/src/lib/buffers/Makefile.in +++ /dev/null @@ -1,100 +0,0 @@ - -srcdir = @srcdir@ -top_builddir = @top_builddir@ -abs_top_builddir = @abs_top_builddir@ -top_srcdir = @top_srcdir@ -abs_top_srcdir = @abs_top_srcdir@ -subdir = buffers -builddir = @builddir@ - -CFLAGS = @CFLAGS@ -DEPFLAGS = @DEPFLAGS@ -LDFLAGS = @LDFLAGS@ -DEFS = @DEFS@ -OPTARGS = @OPTARGS@ - -AR = @AR@ -RANLIB = @RANLIB@ -CC = @CC@ -CCDEP = @CCDEP@ -CCLD = $(CC) -LINK = $(CCLD) $(CFLAGS) $(LDFLAGS) ${OPTARGS} -o $@ -LEX = @LEX@ -AUTOCONF = @AUTOCONF@ -DEFS = @DEFS@ - -INCLUDES = @INCLUDES@ -LDADD = -COMPILE = ${CC} ${DEFS} ${INCLUDES} ${CFLAGS} ${OPTARGS} - -LIBRARIES = libbuffers - -libbuffers_TARGETS = gauge \ - gauge_allocate_gauge_buffers \ - gauge_finalize_gauge_buffers \ - gauge_free_unused_gauge_buffers \ - gauge_get_gauge_field \ - gauge_get_gauge_field_array \ - gauge_initialize_gauge_buffers \ - gauge_return_gauge_field \ - gauge_return_gauge_field_array \ - utils_generic_exchange - -libbuffers_OBJECTS = $(addsuffix .o, ${libbuffers_TARGETS}) - -# default rule - -all: Makefile dep libbuffers.a - -# rules for debugging -debug all-debug: CFLAGS := $(CFLAGS) @DEBUG_FLAG@ -debug all-debug: all - -# rules for profiling information -profile all-profile: CFLAGS := $(filter-out -fomit-frame-pointer,${CFLAGS}) @PROFILE_FLAG@ -profile all-profile: all - - -#include dep rules - - --include $(addsuffix .d,${libbuffers_TARGETS}) - -include ${top_srcdir}/Makefile.global - -# rule to compile objects - -%.o: ${srcdir}/%.c %.d Makefile ${abs_top_builddir}/include/tmlqcd_config_internal.h - $(COMPILE) -c $< - - -# rule to make libbuffers -libbuffers.a: ${libbuffers_OBJECTS} Makefile - @rm -f libbuffers.a - @${AR} cru libbuffers.a $(libbuffers_OBJECTS) - @$(RANLIB) libbuffers.a - @cp libbuffers.a ${top_builddir}/lib/libbuffers.a - -# rule to generate .d files - -$(addsuffix .d,$(libbuffers_TARGETS)): %.d: ${srcdir}/%.c Makefile - @$(CCDEP) ${DEFS} ${DEPFLAGS} ${INCLUDES} $< > $@ - -# rule to make dependencies - -dep: ${addsuffix .d, ${libbuffers_TARGETS}} - -# rules to clean - -compile-clean: Makefile - rm -f ${$(addsuffix _OBJECTS, ${LIBRARIES})} *.d - -clean: compile-clean - rm -f $(addsuffix .a, ${LIBRARIES}) - rm -f ../lib/libbuffers.a - -distclean: clean - rm -f Makefile - - -.PHONY: all dep clean compile-clean distclean debug all-debug profile all-profile diff --git a/src/lib/cu/Makefile.in b/src/lib/cu/Makefile.in deleted file mode 100644 index 578483ecb..000000000 --- a/src/lib/cu/Makefile.in +++ /dev/null @@ -1,80 +0,0 @@ - -srcdir = @srcdir@ -top_builddir = @top_builddir@ -abs_top_builddir = @abs_top_builddir@ -top_srcdir = @top_srcdir@ -abs_top_srcdir = @abs_top_srcdir@ -subdir = cu -builddir = @builddir@ - -CFLAGS = @CFLAGS@ -DEPFLAGS = @DEPFLAGS@ -LDFLAGS = @LDFLAGS@ -DEFS = @DEFS@ -OPTARGS = @OPTARGS@ - -AR = @AR@ -RANLIB = @RANLIB@ -CC = @CC@ -CCDEP = @CCDEP@ -CCLD = $(CC) -LINK = $(CCLD) $(CFLAGS) $(LDFLAGS) ${OPTARGS} -o $@ -LEX = @LEX@ -AUTOCONF = @AUTOCONF@ -DEFS = @DEFS@ - -INCLUDES = @INCLUDES@ -LDADD = -COMPILE = ${CC} ${DEFS} ${INCLUDES} ${CFLAGS} ${OPTARGS} - -LIBRARIES = libcu - -libcu_TARGETS = cu - -libcu_OBJECTS = $(addsuffix .o, ${libcu_TARGETS}) - -# default rule -all: Makefile dep libcu.a - -#include dep rules - --include $(addsuffix .d,${libcu_TARGETS}) - -include ${top_srcdir}/Makefile.global - -# rule to compile objects - -${libcu_OBJECTS}: %.o : ${srcdir}/%.c %.d Makefile ${abs_top_builddir}/include/tmlqcd_config_internal.h - $(COMPILE) -c $< - - -# rule to make libcu - -libcu.a: ${libcu_OBJECTS} Makefile - @rm -f libcu.a - @${AR} cru libcu.a $(libcu_OBJECTS) - @$(RANLIB) libcu.a -# @cp libcu.a ${top_builddir}/cu/libcu.a - -# rule to generate .d files - -$(addsuffix .d,$(libcu_TARGETS)): %.d: ${srcdir}/%.c Makefile - @$(CCDEP) ${DEFS} ${DEPFLAGS} ${INCLUDES} $< > $@ - -# rule to make dependencies - -dep: ${addsuffix .d, ${libcu_TARGETS}} - -# rules to clean - -compile-clean: Makefile - rm -f ${$(addsuffix _OBJECTS, ${LIBRARIES})} *.d - -clean: compile-clean - rm -f $(addsuffix .a, ${LIBRARIES}) - -distclean: clean - rm -f Makefile - - -.PHONY: all dep clean compile-clean distclean diff --git a/src/lib/init/Makefile.in b/src/lib/init/Makefile.in deleted file mode 100644 index a297119ad..000000000 --- a/src/lib/init/Makefile.in +++ /dev/null @@ -1,100 +0,0 @@ - -srcdir = @srcdir@ -top_builddir = @top_builddir@ -abs_top_builddir = @abs_top_builddir@ -top_srcdir = @top_srcdir@ -abs_top_srcdir = @abs_top_srcdir@ -subdir = init -builddir = @builddir@ - -CFLAGS = @CFLAGS@ -DEPFLAGS = @DEPFLAGS@ -LDFLAGS = @LDFLAGS@ -DEFS = @DEFS@ -OPTARGS = @OPTARGS@ -SOPTARGS = @SOPTARGS@ - -AR = @AR@ -RANLIB = @RANLIB@ -CC = @CC@ -CCDEP = @CCDEP@ -CCLD = ${CC} -LINK = ${CCLD} ${CFLAGS} ${LDFLAGS} ${OPTARGS} -o $@ -LEX = @LEX@ -AUTOCONF = @AUTOCONF@ -DEFS = @DEFS@ - -INCLUDES = @INCLUDES@ -LDADD = -#COMPILE = ${CC} ${DEFS} ${INCLUDES} ${CFLAGS} -COMPILE = ${CC} $(DEFS) ${INCLUDES} ${CFLAGS} - -LIBRARIES = libinit -libinit_TARGETS = init_moment_field init_gauge_tmp init_gauge_fg init_gauge_field \ - init_geometry_indices init_spinor_field init_dirac_halfspinor \ - init_chi_spinor_field init_bispinor_field\ - init_omp_accumulators init_openmp init_parallel init_global_states \ - init_critical_globals - -libinit_STARGETS = - -libinit_OBJECTS = $(addsuffix .o, ${libinit_TARGETS}) -libinit_SOBJECTS = $(addsuffix .o, ${libinit_STARGETS}) - -# default rule - -all: Makefile dep libinit.a - -# rules for debugging -debug all-debug: CFLAGS := $(CFLAGS) @DEBUG_FLAG@ -debug all-debug: all - -# rules for profiling information -profile all-profile: CFLAGS := $(filter-out -fomit-frame-pointer,${CFLAGS}) @PROFILE_FLAG@ -profile all-profile: all - - -#include dep rules - --include $(addsuffix .d,${libinit_TARGETS}) - -include ${top_srcdir}/Makefile.global - -# rule to compile objects - -${libinit_OBJECTS}: %.o: ${srcdir}/%.c %.d Makefile ${abs_top_builddir}/include/tmlqcd_config_internal.h - $(COMPILE) ${OPTARGS} -c $< - -${libinit_SOBJECTS}: %.o: ${srcdir}/%.c %.d Makefile ${abs_top_builddir}/include/tmlqcd_config_internal.h - $(COMPILE) ${SOPTARGS} -c $< - -# rule to make libinit - -libinit.a: ${libinit_OBJECTS} ${libinit_SOBJECTS} Makefile - @rm -f libinit.a - @${AR} cru libinit.a ${libinit_OBJECTS} ${libinit_SOBJECTS} - @$(RANLIB) libinit.a - @cp libinit.a ../lib/libinit.a - -# rule to generate .d files - -$(addsuffix .d, $(libinit_TARGETS) ${libinit_STARGETS}): %.d: ${srcdir}/%.c Makefile - @${CCDEP} ${DEFS} ${DEPFLAGS} ${INCLUDES} $< > $@ - -# rule to make dependencies - -dep: ${addsuffix .d, ${libinit_TARGETS} ${libinit_STARGETS}} - -# rules to clean - -compile-clean: Makefile - rm -f ${$(addsuffix _OBJECTS, ${LIBRARIES})} ${$(addsuffix _SOBJECTS, ${LIBRARIES})} *.d - -clean: compile-clean - rm -f $(addsuffix .a, ${LIBRARIES}) - rm -f ../lib/libinit.a - -distclean: clean - rm -f Makefile - -.PHONY: all dep clean compile-clean distclean profile all-profile debug all-debug diff --git a/src/lib/init/init_stout_smear_vars.c b/src/lib/init/init_stout_smear_vars.c index 5b69005b2..ddc45ae94 100644 --- a/src/lib/init/init_stout_smear_vars.c +++ b/src/lib/init/init_stout_smear_vars.c @@ -84,7 +84,6 @@ int init_stout_smear_vars(const int V, const int stout_no_iter) { /* int i, k, x, mu; */ - if (g_exposu3_no_c == 0) init_exposu3(); /* diff --git a/src/lib/linalg/Makefile.in b/src/lib/linalg/Makefile.in deleted file mode 100644 index 56ddd2ea4..000000000 --- a/src/lib/linalg/Makefile.in +++ /dev/null @@ -1,112 +0,0 @@ - -srcdir = @srcdir@ -top_builddir = @top_builddir@ -abs_top_builddir = @abs_top_builddir@ -top_srcdir = @top_srcdir@ -abs_top_srcdir = @abs_top_srcdir@ -subdir = linalg -builddir = @builddir@ - -CFLAGS = @CFLAGS@ -DEPFLAGS = @DEPFLAGS@ -LDFLAGS = @LDFLAGS@ -DEFS = @DEFS@ -OPTARGS = @OPTARGS@ -SOPTARGS = @SOPTARGS@ - -AR = @AR@ -RANLIB = @RANLIB@ -CC = @CC@ -CCDEP = @CCDEP@ -CCLD = ${CC} -LINK = ${CCLD} ${CFLAGS} ${LDFLAGS} ${OPTARGS} -o $@ -LEX = @LEX@ -AUTOCONF = @AUTOCONF@ -DEFS = @DEFS@ - -INCLUDES = @INCLUDES@ -LDADD = -#COMPILE = ${CC} ${DEFS} ${INCLUDES} ${CFLAGS} -COMPILE = ${CC} $(DEFS) ${INCLUDES} ${CFLAGS} - -LIBRARIES = liblinalg -liblinalg_TARGETS = assign_add_mul_r_add_mul \ - assign_mul_bra_add_mul_ket_add_r \ - scalar_prod_r scalar_prod_i \ - square_and_prod_r assign_mul_bra_add_mul_r mul_r mul_r_32 \ - diff_and_square_norm square_and_minmax assign \ - scalar_prod mul_diff_r mul_diff_mul assign_add_mul assign_mul_add add \ - assign_diff_mul mul_add_mul mul assign_add_mul_add_mul \ - assign_mul_bra_add_mul_ket_add assign_mul_add_mul_add_mul_add_mul_r \ - mul_diff_mul_r assign_add_mul_add_mul_r \ - comp_decomp assign_mul_add_mul \ - convert_eo_to_lexic assign_mul_add_mul_r assign_mul_add_mul_r_32 \ - mul_add_mul_r assign_mul_add_mul_add_mul_r mattimesvec \ - assign_mul_add_r_and_square \ - addto_32 scalar_prod_r_32 assign_mul_add_r_32 assign_add_mul_r_32 \ - square_norm_32 assign_to_32 diff_32 \ - convert_odd_to_lexic convert_even_to_lexic set_even_to_zero \ - mul_gamma5 mul_r_gamma5 ratio print_spinor print_spinor_similar_components - -liblinalg_STARGETS = diff assign_add_mul_r assign_mul_add_r square_norm - -liblinalg_OBJECTS = $(addsuffix .o, ${liblinalg_TARGETS}) -liblinalg_SOBJECTS = $(addsuffix .o, ${liblinalg_STARGETS}) - -# default rule - -all: Makefile dep liblinalg.a - -# rules for debugging -debug all-debug: CFLAGS := $(CFLAGS) @DEBUG_FLAG@ -debug all-debug: all - -# rules for profiling information -profile all-profile: CFLAGS := $(filter-out -fomit-frame-pointer,${CFLAGS}) @PROFILE_FLAG@ -profile all-profile: all - - -#include dep rules - --include $(addsuffix .d,${liblinalg_TARGETS}) - -include ${top_srcdir}/Makefile.global - -# rule to compile objects - -${liblinalg_OBJECTS}: %.o: ${srcdir}/%.c %.d Makefile ${abs_top_builddir}/include/tmlqcd_config_internal.h - $(COMPILE) ${OPTARGS} -c $< - -${liblinalg_SOBJECTS}: %.o: ${srcdir}/%.c %.d Makefile ${abs_top_builddir}/include/tmlqcd_config_internal.h - $(COMPILE) ${SOPTARGS} -c $< - -# rule to make liblinalg - -liblinalg.a: ${liblinalg_OBJECTS} ${liblinalg_SOBJECTS} Makefile - @rm -f liblinalg.a - @${AR} cru liblinalg.a ${liblinalg_OBJECTS} ${liblinalg_SOBJECTS} - @$(RANLIB) liblinalg.a - @cp liblinalg.a ../lib/liblinalg.a - -# rule to generate .d files - -$(addsuffix .d, $(liblinalg_TARGETS) ${liblinalg_STARGETS}): %.d: ${srcdir}/%.c Makefile - @${CCDEP} ${DEFS} ${DEPFLAGS} ${INCLUDES} $< > $@ - -# rule to make dependencies - -dep: ${addsuffix .d, ${liblinalg_TARGETS} ${liblinalg_STARGETS}} - -# rules to clean - -compile-clean: Makefile - rm -f ${$(addsuffix _OBJECTS, ${LIBRARIES})} ${$(addsuffix _SOBJECTS, ${LIBRARIES})} *.d - -clean: compile-clean - rm -f $(addsuffix .a, ${LIBRARIES}) - rm -f ../lib/liblinalg.a - -distclean: clean - rm -f Makefile - -.PHONY: all dep clean compile-clean distclean profile all-profile debug all-debug diff --git a/src/lib/meas/Makefile.in b/src/lib/meas/Makefile.in deleted file mode 100644 index 1d04ce4e8..000000000 --- a/src/lib/meas/Makefile.in +++ /dev/null @@ -1,95 +0,0 @@ - -srcdir = @srcdir@ -top_builddir = @top_builddir@ -abs_top_builddir = @abs_top_builddir@ -top_srcdir = @top_srcdir@ -abs_top_srcdir = @abs_top_srcdir@ -subdir = meas -builddir = @builddir@ - -CFLAGS = @CFLAGS@ @MEASDIR@ -DEPFLAGS = @DEPFLAGS@ -LDFLAGS = @LDFLAGS@ -DEFS = @DEFS@ -OPTARGS = @OPTARGS@ - -AR = @AR@ -RANLIB = @RANLIB@ -CC = @CC@ -CCDEP = @CCDEP@ -CCLD = $(CC) -LINK = $(CCLD) $(CFLAGS) $(LDFLAGS) ${OPTARGS} -o $@ -LEX = @LEX@ -AUTOCONF = @AUTOCONF@ -DEFS = @DEFS@ - -LEMON_AVAILABLE = @LEMON_AVAILABLE@ - -INCLUDES = @INCLUDES@ -LDADD = -COMPILE = ${CC} ${DEFS} ${INCLUDES} ${CFLAGS} ${OPTARGS} - -LIBRARIES = libmeas - -libmeas_TARGETS = measurements \ - oriented_plaquettes \ - correlators \ - pion_norm \ - polyakov_loop \ - measure_clover_field_strength_observables \ - gradient_flow - -libmeas_OBJECTS = $(addsuffix .o, ${libmeas_TARGETS}) - -# default rule - -all: Makefile dep libmeas.a - -# rules for debugging -debug all-debug: CFLAGS := $(CFLAGS) @DEBUG_FLAG@ -debug all-debug: all - -# rules for profiling information -profile all-profile: CFLAGS := $(filter-out -fomit-frame-pointer,${CFLAGS}) @PROFILE_FLAG@ -profile all-profile: all - - -#include dep rules --include $(addsuffix .d,${libmeas_TARGETS}) - -include ${top_srcdir}/Makefile.global - -# rule to compile objects - -%.o: ${srcdir}/%.c %.d Makefile ${abs_top_builddir}/include/tmlqcd_config_internal.h - $(COMPILE) -c $< - -libmeas.a: ${libmeas_OBJECTS} Makefile - @rm -f libmeas.a - @${AR} cru libmeas.a $(libmeas_OBJECTS) - @$(RANLIB) libmeas.a - @cp libmeas.a ${top_builddir}/lib/libmeas.a - -# rule to generate .d files - -$(addsuffix .d,$(libmeas_TARGETS)): %.d: ${srcdir}/%.c Makefile - @$(CCDEP) ${DEFS} ${DEPFLAGS} ${INCLUDES} $< > $@ - -# rule to make dependencies - -dep: ${addsuffix .d, ${libmeas_TARGETS}} - -# rules to clean - -compile-clean: Makefile - rm -f ${$(addsuffix _OBJECTS, ${LIBRARIES})} *.d - -clean: compile-clean - rm -f $(addsuffix .a, ${LIBRARIES}) - rm -f ../lib/libmeas.a - -distclean: clean - rm -f Makefile - - -.PHONY: all dep clean compile-clean distclean debug all-debug profile all-profile diff --git a/src/lib/monomial/Makefile.in b/src/lib/monomial/Makefile.in deleted file mode 100644 index 317a9b66c..000000000 --- a/src/lib/monomial/Makefile.in +++ /dev/null @@ -1,101 +0,0 @@ - -srcdir = @srcdir@ -top_builddir = @top_builddir@ -abs_top_builddir = @abs_top_builddir@ -top_srcdir = @top_srcdir@ -abs_top_srcdir = @abs_top_srcdir@ -subdir = monomial -builddir = @builddir@ - -CFLAGS = @CFLAGS@ -DEPFLAGS = @DEPFLAGS@ -LDFLAGS = @LDFLAGS@ -DEFS = @DEFS@ -OPTARGS = @OPTARGS@ -SOPTARGS = @SOPTARGS@ - -AR = @AR@ -RANLIB = @RANLIB@ -CC = @CC@ -CCDEP = @CCDEP@ -CCLD = ${CC} -LINK = ${CCLD} ${CFLAGS} ${LDFLAGS} ${OPTARGS} -o $@ -LEX = @LEX@ -AUTOCONF = @AUTOCONF@ -DEFS = @DEFS@ - -INCLUDES = @INCLUDES@ -LDADD = -#COMPILE = ${CC} ${DEFS} ${INCLUDES} ${CFLAGS} -COMPILE = ${CC} $(DEFS) ${INCLUDES} ${CFLAGS} - -LIBRARIES = libmonomial -libmonomial_TARGETS = nddetratio_monomial monomial det_monomial detratio_monomial \ - gauge_monomial ndpoly_monomial clover_trlog_monomial cloverdet_monomial cloverdetratio_monomial \ - cloverdetratio_rwmonomial \ - clovernd_trlog_monomial poly_monomial cloverndpoly_monomial moment_energy \ - ndrat_monomial ndratcor_monomial rat_monomial ratcor_monomial monitor_forces - - -libmonomial_STARGETS = - -libmonomial_OBJECTS = $(addsuffix .o, ${libmonomial_TARGETS}) -libmonomial_SOBJECTS = $(addsuffix .o, ${libmonomial_STARGETS}) - -# default rule - -all: Makefile dep libmonomial.a - -# rules for debugging -debug all-debug: CFLAGS := $(CFLAGS) @DEBUG_FLAG@ -debug all-debug: all - -# rules for profiling information -profile all-profile: CFLAGS := $(filter-out -fomit-frame-pointer,${CFLAGS}) @PROFILE_FLAG@ -profile all-profile: all - - -#include dep rules - --include $(addsuffix .d,${libmonomial_TARGETS}) - -include ${top_srcdir}/Makefile.global - -# rule to compile objects - -${libmonomial_OBJECTS}: %.o: ${srcdir}/%.c %.d Makefile ${abs_top_builddir}/include/tmlqcd_config_internal.h - $(COMPILE) ${OPTARGS} -c $< - -${libmonomial_SOBJECTS}: %.o: ${srcdir}/%.c %.d Makefile ${abs_top_builddir}/include/tmlqcd_config_internal.h - $(COMPILE) ${SOPTARGS} -c $< - -# rule to make libmonomial - -libmonomial.a: ${libmonomial_OBJECTS} ${libmonomial_SOBJECTS} Makefile - @rm -f libmonomial.a - @${AR} cru libmonomial.a ${libmonomial_OBJECTS} ${libmonomial_SOBJECTS} - @$(RANLIB) libmonomial.a - @cp libmonomial.a ../lib/libmonomial.a - -# rule to generate .d files - -$(addsuffix .d, $(libmonomial_TARGETS) ${libmonomial_STARGETS}): %.d: ${srcdir}/%.c Makefile - @${CCDEP} ${DEFS} ${DEPFLAGS} ${INCLUDES} $< > $@ - -# rule to make dependencies - -dep: ${addsuffix .d, ${libmonomial_TARGETS} ${libmonomial_STARGETS}} - -# rules to clean - -compile-clean: Makefile - rm -f ${$(addsuffix _OBJECTS, ${LIBRARIES})} ${$(addsuffix _SOBJECTS, ${LIBRARIES})} *.d - -clean: compile-clean - rm -f $(addsuffix .a, ${LIBRARIES}) - rm -f ../lib/libmonomial.a - -distclean: clean - rm -f Makefile - -.PHONY: all dep clean compile-clean distclean profile all-profile debug all-debug diff --git a/src/lib/operator/Makefile.in b/src/lib/operator/Makefile.in deleted file mode 100644 index ea3b15a89..000000000 --- a/src/lib/operator/Makefile.in +++ /dev/null @@ -1,93 +0,0 @@ - -srcdir = @srcdir@ -top_builddir = @top_builddir@ -abs_top_builddir = @abs_top_builddir@ -top_srcdir = @top_srcdir@ -abs_top_srcdir = @abs_top_srcdir@ -subdir = operator -builddir = @builddir@ - -CFLAGS = @CFLAGS@ -DEPFLAGS = @DEPFLAGS@ -LDFLAGS = @LDFLAGS@ -DEFS = @DEFS@ -OPTARGS = @OPTARGS@ -SOPTARGS = @SOPTARGS@ - -AR = @AR@ -RANLIB = @RANLIB@ -CC = @CC@ -CCDEP = @CCDEP@ -CCLD = ${CC} -LINK = ${CCLD} ${CFLAGS} ${LDFLAGS} ${OPTARGS} -o $@ -LEX = @LEX@ -AUTOCONF = @AUTOCONF@ -DEFS = @DEFS@ - -INCLUDES = @INCLUDES@ -LDADD = -#COMPILE = ${CC} ${DEFS} ${INCLUDES} ${CFLAGS} -COMPILE = ${CC} $(DEFS) ${INCLUDES} ${CFLAGS} - -LIBRARIES = liboperator -liboperator_TARGETS = clover_accumulate_deriv clover_deriv clovertm_operators clover_leaf \ - tm_operators_nd tm_operators_nd_32 clover_term clover_invert clover_det \ - clovertm_operators_32 - -liboperator_STARGETS = Hopping_Matrix_nocom tm_times_Hopping_Matrix Hopping_Matrix Hopping_Matrix_32 Hopping_Matrix_32_nocom \ - tm_operators tm_operators_32 tm_sub_Hopping_Matrix D_psi Dov_psi Dov_proj - -liboperator_OBJECTS = $(addsuffix .o, ${liboperator_TARGETS}) -liboperator_SOBJECTS = $(addsuffix .o, ${liboperator_STARGETS}) - -# default rule - -all: Makefile dep liboperator.a - -# rules for debugging -debug all-debug: CFLAGS := $(CFLAGS) @DEBUG_FLAG@ -debug all-debug: all - -# rules for profiling information -profile all-profile: CFLAGS := $(filter-out -fomit-frame-pointer,${CFLAGS}) @PROFILE_FLAG@ -profile all-profile: all - -#include dep rules --include $(addsuffix .d,${liboperator_TARGETS}) - -include ${top_srcdir}/Makefile.global - -# rule to compile objects -${liboperator_OBJECTS}: %.o: ${srcdir}/%.c %.d Makefile ${abs_top_builddir}/include/tmlqcd_config_internal.h - $(COMPILE) ${OPTARGS} -c $< - -${liboperator_SOBJECTS}: %.o: ${srcdir}/%.c %.d Makefile ${abs_top_builddir}/include/tmlqcd_config_internal.h - $(COMPILE) ${SOPTARGS} -c $< - -# rule to make liboperator -liboperator.a: ${liboperator_OBJECTS} ${liboperator_SOBJECTS} Makefile - @rm -f liboperator.a - @${AR} cru liboperator.a ${liboperator_OBJECTS} ${liboperator_SOBJECTS} - @$(RANLIB) liboperator.a - @cp liboperator.a ../lib/liboperator.a - -# rule to generate .d files -$(addsuffix .d, $(liboperator_TARGETS) ${liboperator_STARGETS}): %.d: ${srcdir}/%.c Makefile - @${CCDEP} ${DEFS} ${DEPFLAGS} ${INCLUDES} $< > $@ - -# rule to make dependencies -dep: ${addsuffix .d, ${liboperator_TARGETS} ${liboperator_STARGETS}} - -# rules to clean - -compile-clean: Makefile - rm -f ${$(addsuffix _OBJECTS, ${LIBRARIES})} ${$(addsuffix _SOBJECTS, ${LIBRARIES})} *.d - -clean: compile-clean - rm -f $(addsuffix .a, ${LIBRARIES}) - rm -f ../lib/liboperator.a - -distclean: clean - rm -f Makefile - -.PHONY: all dep clean compile-clean distclean profile all-profile debug all-debug diff --git a/src/lib/operator/hopping.h b/src/lib/operator/hopping.h index 5027f1976..af968c4e3 100644 --- a/src/lib/operator/hopping.h +++ b/src/lib/operator/hopping.h @@ -28,126 +28,126 @@ #ifndef _HOPPING_H #define _HOPPING_H -#define _declare_regs() \ +#define _declare_regs() \ su3_vector ALIGN psi, chi; \ spinor ALIGN temp; -#define _hop_t_p() \ - _vector_add(psi,sp->s0,sp->s2); \ - _su3_multiply(chi,(*up),psi); \ - _complex_times_vector(psi,ka0,chi); \ - _vector_assign(temp.s0,psi); \ - _vector_assign(temp.s2,psi); \ - _vector_add(psi,sp->s1,sp->s3); \ - _su3_multiply(chi,(*up),psi); \ - _complex_times_vector(psi,ka0,chi); \ - _vector_assign(temp.s1,psi); \ - _vector_assign(temp.s3,psi); - -#define _hop_t_m() \ - _vector_sub(psi,sm->s0,sm->s2); \ - _su3_inverse_multiply(chi,(*um),psi); \ - _complexcjg_times_vector(psi,ka0,chi); \ - _vector_add_assign(temp.s0,psi); \ - _vector_sub_assign(temp.s2,psi); \ - _vector_sub(psi,sm->s1,sm->s3); \ - _su3_inverse_multiply(chi,(*um),psi); \ - _complexcjg_times_vector(psi,ka0,chi); \ - _vector_add_assign(temp.s1,psi); \ - _vector_sub_assign(temp.s3,psi); +#define _hop_t_p() \ + _vector_add(psi, sp->s0, sp->s2); \ + _su3_multiply(chi, (*up), psi); \ + _complex_times_vector(psi, ka0, chi); \ + _vector_assign(temp.s0, psi); \ + _vector_assign(temp.s2, psi); \ + _vector_add(psi, sp->s1, sp->s3); \ + _su3_multiply(chi, (*up), psi); \ + _complex_times_vector(psi, ka0, chi); \ + _vector_assign(temp.s1, psi); \ + _vector_assign(temp.s3, psi); -#define _hop_x_p() \ - _vector_i_add(psi,sp->s0,sp->s3); \ - _su3_multiply(chi,(*up),psi); \ - _complex_times_vector(psi,ka1,chi); \ - _vector_add_assign(temp.s0,psi); \ - _vector_i_sub_assign(temp.s3,psi); \ - _vector_i_add(psi,sp->s1,sp->s2); \ - _su3_multiply(chi,(*up),psi); \ - _complex_times_vector(psi,ka1,chi); \ - _vector_add_assign(temp.s1,psi); \ - _vector_i_sub_assign(temp.s2,psi); +#define _hop_t_m() \ + _vector_sub(psi, sm->s0, sm->s2); \ + _su3_inverse_multiply(chi, (*um), psi); \ + _complexcjg_times_vector(psi, ka0, chi); \ + _vector_add_assign(temp.s0, psi); \ + _vector_sub_assign(temp.s2, psi); \ + _vector_sub(psi, sm->s1, sm->s3); \ + _su3_inverse_multiply(chi, (*um), psi); \ + _complexcjg_times_vector(psi, ka0, chi); \ + _vector_add_assign(temp.s1, psi); \ + _vector_sub_assign(temp.s3, psi); -#define _hop_x_m() \ - _vector_i_sub(psi,sm->s0,sm->s3); \ - _su3_inverse_multiply(chi,(*um),psi); \ - _complexcjg_times_vector(psi,ka1,chi); \ - _vector_add_assign(temp.s0,psi); \ - _vector_i_add_assign(temp.s3,psi); \ - _vector_i_sub(psi,sm->s1,sm->s2); \ - _su3_inverse_multiply(chi,(*um),psi); \ - _complexcjg_times_vector(psi,ka1,chi); \ - _vector_add_assign(temp.s1,psi); \ - _vector_i_add_assign(temp.s2,psi); +#define _hop_x_p() \ + _vector_i_add(psi, sp->s0, sp->s3); \ + _su3_multiply(chi, (*up), psi); \ + _complex_times_vector(psi, ka1, chi); \ + _vector_add_assign(temp.s0, psi); \ + _vector_i_sub_assign(temp.s3, psi); \ + _vector_i_add(psi, sp->s1, sp->s2); \ + _su3_multiply(chi, (*up), psi); \ + _complex_times_vector(psi, ka1, chi); \ + _vector_add_assign(temp.s1, psi); \ + _vector_i_sub_assign(temp.s2, psi); -#define _hop_y_p() \ - _vector_add(psi,sp->s0,sp->s3); \ - _su3_multiply(chi,(*up),psi); \ - _complex_times_vector(psi,ka2,chi); \ - _vector_add_assign(temp.s0,psi); \ - _vector_add_assign(temp.s3,psi); \ - _vector_sub(psi,sp->s1,sp->s2); \ - _su3_multiply(chi,(*up),psi); \ - _complex_times_vector(psi,ka2,chi); \ - _vector_add_assign(temp.s1,psi); \ - _vector_sub_assign(temp.s2,psi); +#define _hop_x_m() \ + _vector_i_sub(psi, sm->s0, sm->s3); \ + _su3_inverse_multiply(chi, (*um), psi); \ + _complexcjg_times_vector(psi, ka1, chi); \ + _vector_add_assign(temp.s0, psi); \ + _vector_i_add_assign(temp.s3, psi); \ + _vector_i_sub(psi, sm->s1, sm->s2); \ + _su3_inverse_multiply(chi, (*um), psi); \ + _complexcjg_times_vector(psi, ka1, chi); \ + _vector_add_assign(temp.s1, psi); \ + _vector_i_add_assign(temp.s2, psi); -#define _hop_y_m() \ - _vector_sub(psi,sm->s0,sm->s3); \ - _su3_inverse_multiply(chi,(*um),psi); \ - _complexcjg_times_vector(psi,ka2,chi); \ - _vector_add_assign(temp.s0,psi); \ - _vector_sub_assign(temp.s3,psi); \ - _vector_add(psi,sm->s1,sm->s2); \ - _su3_inverse_multiply(chi,(*um),psi); \ - _complexcjg_times_vector(psi,ka2,chi); \ - _vector_add_assign(temp.s1,psi); \ - _vector_add_assign(temp.s2,psi); +#define _hop_y_p() \ + _vector_add(psi, sp->s0, sp->s3); \ + _su3_multiply(chi, (*up), psi); \ + _complex_times_vector(psi, ka2, chi); \ + _vector_add_assign(temp.s0, psi); \ + _vector_add_assign(temp.s3, psi); \ + _vector_sub(psi, sp->s1, sp->s2); \ + _su3_multiply(chi, (*up), psi); \ + _complex_times_vector(psi, ka2, chi); \ + _vector_add_assign(temp.s1, psi); \ + _vector_sub_assign(temp.s2, psi); -#define _hop_z_p() \ - _vector_i_add(psi,sp->s0,sp->s2); \ - _su3_multiply(chi,(*up),psi); \ - _complex_times_vector(psi,ka3,chi); \ - _vector_add_assign(temp.s0,psi); \ - _vector_i_sub_assign(temp.s2,psi); \ - _vector_i_sub(psi,sp->s1,sp->s3); \ - _su3_multiply(chi,(*up),psi); \ - _complex_times_vector(psi,ka3,chi); \ - _vector_add_assign(temp.s1,psi); \ - _vector_i_add_assign(temp.s3,psi); +#define _hop_y_m() \ + _vector_sub(psi, sm->s0, sm->s3); \ + _su3_inverse_multiply(chi, (*um), psi); \ + _complexcjg_times_vector(psi, ka2, chi); \ + _vector_add_assign(temp.s0, psi); \ + _vector_sub_assign(temp.s3, psi); \ + _vector_add(psi, sm->s1, sm->s2); \ + _su3_inverse_multiply(chi, (*um), psi); \ + _complexcjg_times_vector(psi, ka2, chi); \ + _vector_add_assign(temp.s1, psi); \ + _vector_add_assign(temp.s2, psi); -#define _hop_z_m() \ - _vector_i_sub(psi,sm->s0,sm->s2); \ - _su3_inverse_multiply(chi,(*um),psi); \ - _complexcjg_times_vector(psi,ka3,chi); \ - _vector_add_assign(temp.s0, psi); \ - _vector_i_add_assign(temp.s2, psi); \ - _vector_i_add(psi,sm->s1,sm->s3); \ - _su3_inverse_multiply(chi,(*um),psi); \ - _complexcjg_times_vector(psi,ka3,chi); \ - _vector_add_assign(temp.s1, psi); \ +#define _hop_z_p() \ + _vector_i_add(psi, sp->s0, sp->s2); \ + _su3_multiply(chi, (*up), psi); \ + _complex_times_vector(psi, ka3, chi); \ + _vector_add_assign(temp.s0, psi); \ + _vector_i_sub_assign(temp.s2, psi); \ + _vector_i_sub(psi, sp->s1, sp->s3); \ + _su3_multiply(chi, (*up), psi); \ + _complex_times_vector(psi, ka3, chi); \ + _vector_add_assign(temp.s1, psi); \ + _vector_i_add_assign(temp.s3, psi); + +#define _hop_z_m() \ + _vector_i_sub(psi, sm->s0, sm->s2); \ + _su3_inverse_multiply(chi, (*um), psi); \ + _complexcjg_times_vector(psi, ka3, chi); \ + _vector_add_assign(temp.s0, psi); \ + _vector_i_add_assign(temp.s2, psi); \ + _vector_i_add(psi, sm->s1, sm->s3); \ + _su3_inverse_multiply(chi, (*um), psi); \ + _complexcjg_times_vector(psi, ka3, chi); \ + _vector_add_assign(temp.s1, psi); \ _vector_i_sub_assign(temp.s3, psi); -#define _hop_mul_g5_cmplx_and_store() \ - _complex_times_vector(rn->s0, cfactor, temp.s0); \ - _complex_times_vector(rn->s1, cfactor, temp.s1); \ - _complexcjg_times_vector(rn->s2, cfactor, temp.s2); \ +#define _hop_mul_g5_cmplx_and_store() \ + _complex_times_vector(rn->s0, cfactor, temp.s0); \ + _complex_times_vector(rn->s1, cfactor, temp.s1); \ + _complexcjg_times_vector(rn->s2, cfactor, temp.s2); \ _complexcjg_times_vector(rn->s3, cfactor, temp.s3); -#define _g5_cmplx_sub_hop_and_g5store() \ - _complex_times_vector(psi, cfactor, pn->s0); \ - _vector_sub(rn->s0, psi, temp.s0); \ - _complex_times_vector(chi, cfactor, pn->s1); \ - _vector_sub(rn->s1, chi, temp.s1); \ - _complexcjg_times_vector(psi, cfactor, pn->s2); \ - _vector_sub(rn->s2, temp.s2, psi); \ - _complexcjg_times_vector(chi, cfactor, pn->s3); \ +#define _g5_cmplx_sub_hop_and_g5store() \ + _complex_times_vector(psi, cfactor, pn->s0); \ + _vector_sub(rn->s0, psi, temp.s0); \ + _complex_times_vector(chi, cfactor, pn->s1); \ + _vector_sub(rn->s1, chi, temp.s1); \ + _complexcjg_times_vector(psi, cfactor, pn->s2); \ + _vector_sub(rn->s2, temp.s2, psi); \ + _complexcjg_times_vector(chi, cfactor, pn->s3); \ _vector_sub(rn->s3, temp.s3, chi); -#define _store_res() \ - _vector_assign(rn->s0, temp.s0); \ - _vector_assign(rn->s1, temp.s1); \ - _vector_assign(rn->s2, temp.s2); \ +#define _store_res() \ + _vector_assign(rn->s0, temp.s0); \ + _vector_assign(rn->s1, temp.s1); \ + _vector_assign(rn->s2, temp.s2); \ _vector_assign(rn->s3, temp.s3); #endif diff --git a/src/lib/rational/Makefile.in b/src/lib/rational/Makefile.in deleted file mode 100644 index 686a1b629..000000000 --- a/src/lib/rational/Makefile.in +++ /dev/null @@ -1,96 +0,0 @@ - -srcdir = @srcdir@ -top_builddir = @top_builddir@ -abs_top_builddir = @abs_top_builddir@ -top_srcdir = @top_srcdir@ -abs_top_srcdir = @abs_top_srcdir@ -subdir = rational -builddir = @builddir@ - -CFLAGS = @CFLAGS@ -DEPFLAGS = @DEPFLAGS@ -LDFLAGS = @LDFLAGS@ -DEFS = @DEFS@ -OPTARGS = @OPTARGS@ -SOPTARGS = @SOPTARGS@ - -AR = @AR@ -RANLIB = @RANLIB@ -CC = @CC@ -CCDEP = @CCDEP@ -CCLD = ${CC} -LINK = ${CCLD} ${CFLAGS} ${LDFLAGS} ${OPTARGS} -o $@ -LEX = @LEX@ -AUTOCONF = @AUTOCONF@ -DEFS = @DEFS@ - -INCLUDES = @INCLUDES@ -LDADD = -#COMPILE = ${CC} ${DEFS} ${INCLUDES} ${CFLAGS} -COMPILE = ${CC} $(DEFS) ${INCLUDES} ${CFLAGS} - -LIBRARIES = librational -librational_TARGETS = zolotarev elliptic rational - -librational_STARGETS = - -librational_OBJECTS = $(addsuffix .o, ${librational_TARGETS}) -librational_SOBJECTS = $(addsuffix .o, ${librational_STARGETS}) - -# default rule - -all: Makefile dep librational.a - -# rules for debugging -debug all-debug: CFLAGS := $(CFLAGS) @DEBUG_FLAG@ -debug all-debug: all - -# rules for profiling information -profile all-profile: CFLAGS := $(filter-out -fomit-frame-pointer,${CFLAGS}) @PROFILE_FLAG@ -profile all-profile: all - - -#include dep rules - --include $(addsuffix .d,${librational_TARGETS}) - -include ${top_srcdir}/Makefile.global - -# rule to compile objects - -${librational_OBJECTS}: %.o: ${srcdir}/%.c %.d Makefile ${abs_top_builddir}/include/tmlqcd_config_internal.h - $(COMPILE) ${OPTARGS} -c $< - -${librational_SOBJECTS}: %.o: ${srcdir}/%.c %.d Makefile ${abs_top_builddir}/include/tmlqcd_config_internal.h - $(COMPILE) ${SOPTARGS} -c $< - -# rule to make librational - -librational.a: ${librational_OBJECTS} ${librational_SOBJECTS} Makefile - @rm -f librational.a - @${AR} cru librational.a ${librational_OBJECTS} ${librational_SOBJECTS} - @$(RANLIB) librational.a - @cp librational.a ../lib/librational.a - -# rule to generate .d files - -$(addsuffix .d, $(librational_TARGETS) ${librational_STARGETS}): %.d: ${srcdir}/%.c Makefile - @${CCDEP} ${DEFS} ${DEPFLAGS} ${INCLUDES} $< > $@ - -# rule to make dependencies - -dep: ${addsuffix .d, ${librational_TARGETS} ${librational_STARGETS}} - -# rules to clean - -compile-clean: Makefile - rm -f ${$(addsuffix _OBJECTS, ${LIBRARIES})} ${$(addsuffix _SOBJECTS, ${LIBRARIES})} *.d - -clean: compile-clean - rm -f $(addsuffix .a, ${LIBRARIES}) - rm -f ../lib/librational.a - -distclean: clean - rm -f Makefile - -.PHONY: all dep clean compile-clean distclean profile all-profile debug all-debug diff --git a/src/lib/smearing/Makefile.in b/src/lib/smearing/Makefile.in deleted file mode 100644 index 0f85599c9..000000000 --- a/src/lib/smearing/Makefile.in +++ /dev/null @@ -1,97 +0,0 @@ - -srcdir = @srcdir@ -top_builddir = @top_builddir@ -abs_top_builddir = @abs_top_builddir@ -top_srcdir = @top_srcdir@ -abs_top_srcdir = @abs_top_srcdir@ -subdir = smearing -builddir = @builddir@ - -CFLAGS = @CFLAGS@ -DEPFLAGS = @DEPFLAGS@ -LDFLAGS = @LDFLAGS@ -DEFS = @DEFS@ -OPTARGS = @OPTARGS@ - -AR = @AR@ -RANLIB = @RANLIB@ -CC = @CC@ -CCDEP = @CCDEP@ -CCLD = $(CC) -LINK = $(CCLD) $(CFLAGS) $(LDFLAGS) ${OPTARGS} -o $@ -LEX = @LEX@ -AUTOCONF = @AUTOCONF@ -DEFS = @DEFS@ - -LEMON_AVAILABLE = @LEMON_AVAILABLE@ - -INCLUDES = @INCLUDES@ -LDADD = -COMPILE = ${CC} ${DEFS} ${INCLUDES} ${CFLAGS} ${OPTARGS} - -LIBRARIES = libsmear - -libsmear_TARGETS = hex_hex_smear hex_stout_exclude_none hex_stout_exclude_one hex_stout_exclude_two \ - hyp_APE_project_exclude_one hyp_APE_project_exclude_two hyp_APE_project_exclude_none \ - hyp_hyp_staples_exclude_none hyp_hyp_staples_exclude_one hyp_hyp_staples_exclude_two \ - hyp_hyp_smear stout_stout_smear ape_ape_smear utils_reunitarize utils_generic_staples \ - utils_project_antiherm utils_print_su3 utils_print_config_to_screen - -libsmear_OBJECTS = $(addsuffix .o, ${libsmear_TARGETS}) - -# default rule - -all: Makefile dep libsmear.a - -# rules for debugging -debug all-debug: CFLAGS := $(CFLAGS) @DEBUG_FLAG@ -debug all-debug: all - -# rules for profiling information -profile all-profile: CFLAGS := $(filter-out -fomit-frame-pointer,${CFLAGS}) @PROFILE_FLAG@ -profile all-profile: all - - -#include dep rules - - --include $(addsuffix .d,${libsmear_TARGETS}) - -include ${top_srcdir}/Makefile.global - -# rule to compile objects - -%.o: ${srcdir}/%.c %.d Makefile ${abs_top_builddir}/include/tmlqcd_config_internal.h - $(COMPILE) -c $< - - -# rule to make libsmear -libsmear.a: ${libsmear_OBJECTS} Makefile - @rm -f libsmear.a - @${AR} cru libsmear.a $(libsmear_OBJECTS) - @$(RANLIB) libsmear.a - @cp libsmear.a ${top_builddir}/lib/libsmear.a - -# rule to generate .d files - -$(addsuffix .d,$(libsmear_TARGETS)): %.d: ${srcdir}/%.c Makefile - @$(CCDEP) ${DEFS} ${DEPFLAGS} ${INCLUDES} $< > $@ - -# rule to make dependencies - -dep: ${addsuffix .d, ${libsmear_TARGETS}} - -# rules to clean - -compile-clean: Makefile - rm -f ${$(addsuffix _OBJECTS, ${LIBRARIES})} *.d - -clean: compile-clean - rm -f $(addsuffix .a, ${LIBRARIES}) - rm -f ../lib/libsmear.a - -distclean: clean - rm -f Makefile - - -.PHONY: all dep clean compile-clean distclean debug all-debug profile all-profile diff --git a/src/lib/wrapper/Makefile.in b/src/lib/wrapper/Makefile.in deleted file mode 100644 index 09e68cced..000000000 --- a/src/lib/wrapper/Makefile.in +++ /dev/null @@ -1,96 +0,0 @@ - -srcdir = @srcdir@ -top_builddir = @top_builddir@ -abs_top_builddir = @abs_top_builddir@ -top_srcdir = @top_srcdir@ -abs_top_srcdir = @abs_top_srcdir@ -subdir = wrapper -builddir = @builddir@ - -CFLAGS = @CFLAGS@ -DEPFLAGS = @DEPFLAGS@ -LDFLAGS = @LDFLAGS@ -DEFS = @DEFS@ -OPTARGS = @OPTARGS@ -SOPTARGS = @SOPTARGS@ - -AR = @AR@ -RANLIB = @RANLIB@ -CC = @CC@ -CCDEP = @CCDEP@ -CCLD = ${CC} -LINK = ${CCLD} ${CFLAGS} ${LDFLAGS} ${OPTARGS} -o $@ -LEX = @LEX@ -AUTOCONF = @AUTOCONF@ -DEFS = @DEFS@ - -INCLUDES = @INCLUDES@ -LDADD = -#COMPILE = ${CC} ${DEFS} ${INCLUDES} ${CFLAGS} -COMPILE = ${CC} $(DEFS) ${INCLUDES} ${CFLAGS} - -LIBRARIES = libwrapper -libwrapper_TARGETS = lib_wrapper - -libwrapper_STARGETS = - -libwrapper_OBJECTS = $(addsuffix .o, ${libwrapper_TARGETS}) -libwrapper_SOBJECTS = $(addsuffix .o, ${libwrapper_STARGETS}) - -# default rule - -all: Makefile dep libwrapper.a - -# rules for debugging -debug all-debug: CFLAGS := $(CFLAGS) @DEBUG_FLAG@ -debug all-debug: all - -# rules for profiling information -profile all-profile: CFLAGS := $(filter-out -fomit-frame-pointer,${CFLAGS}) @PROFILE_FLAG@ -profile all-profile: all - - -#include dep rules - --include $(addsuffix .d,${libwrapper_TARGETS}) - -include ${top_srcdir}/Makefile.global - -# rule to compile objects - -${libwrapper_OBJECTS}: %.o: ${srcdir}/%.c %.d Makefile ${abs_top_builddir}/include/tmlqcd_config_internal.h - $(COMPILE) ${OPTARGS} -c $< - -${libwrapper_SOBJECTS}: %.o: ${srcdir}/%.c %.d Makefile ${abs_top_builddir}/include/tmlqcd_config_internal.h - $(COMPILE) ${SOPTARGS} -c $< - -# rule to make libwrapper - -libwrapper.a: ${libwrapper_OBJECTS} ${libwrapper_SOBJECTS} Makefile - @rm -f libwrapper.a - @${AR} cru libwrapper.a ${libwrapper_OBJECTS} ${libwrapper_SOBJECTS} - @$(RANLIB) libwrapper.a - @cp libwrapper.a ../lib/libwrapper.a - -# rule to generate .d files - -$(addsuffix .d, $(libwrapper_TARGETS) ${libwrapper_STARGETS}): %.d: ${srcdir}/%.c Makefile - @${CCDEP} ${DEFS} ${DEPFLAGS} ${INCLUDES} $< > $@ - -# rule to make dependencies - -dep: ${addsuffix .d, ${libwrapper_TARGETS} ${libwrapper_STARGETS}} - -# rules to clean - -compile-clean: Makefile - rm -f ${$(addsuffix _OBJECTS, ${LIBRARIES})} ${$(addsuffix _SOBJECTS, ${LIBRARIES})} *.d - -clean: compile-clean - rm -f $(addsuffix .a, ${LIBRARIES}) - rm -f ../lib/libwrapper.a - -distclean: clean - rm -f Makefile - -.PHONY: all dep clean compile-clean distclean profile all-profile debug all-debug diff --git a/src/lib/xchange/Makefile.in b/src/lib/xchange/Makefile.in deleted file mode 100644 index 6afdcaa8a..000000000 --- a/src/lib/xchange/Makefile.in +++ /dev/null @@ -1,98 +0,0 @@ - -srcdir = @srcdir@ -top_builddir = @top_builddir@ -abs_top_builddir = @abs_top_builddir@ -top_srcdir = @top_srcdir@ -abs_top_srcdir = @abs_top_srcdir@ -subdir = xchange -builddir = @builddir@ - -CFLAGS = @CFLAGS@ -DEPFLAGS = @DEPFLAGS@ -LDFLAGS = @LDFLAGS@ -DEFS = @DEFS@ -OPTARGS = @OPTARGS@ -SOPTARGS = @SOPTARGS@ - -AR = @AR@ -RANLIB = @RANLIB@ -CC = @CC@ -CCDEP = @CCDEP@ -CCLD = ${CC} -LINK = ${CCLD} ${CFLAGS} ${LDFLAGS} ${OPTARGS} -o $@ -LEX = @LEX@ -AUTOCONF = @AUTOCONF@ -DEFS = @DEFS@ - -INCLUDES = @INCLUDES@ -LDADD = -#COMPILE = ${CC} ${DEFS} ${INCLUDES} ${CFLAGS} -COMPILE = ${CC} $(DEFS) ${INCLUDES} ${CFLAGS} - -LIBRARIES = libxchange -libxchange_TARGETS = xchange_deri xchange_field xchange_gauge xchange_halffield \ - xchange_lexicfield xchange_2fields \ - little_field_gather - -libxchange_STARGETS = - -libxchange_OBJECTS = $(addsuffix .o, ${libxchange_TARGETS}) -libxchange_SOBJECTS = $(addsuffix .o, ${libxchange_STARGETS}) - -# default rule - -all: Makefile dep libxchange.a - -# rules for debugging -debug all-debug: CFLAGS := $(CFLAGS) @DEBUG_FLAG@ -debug all-debug: all - -# rules for profiling information -profile all-profile: CFLAGS := $(filter-out -fomit-frame-pointer,${CFLAGS}) @PROFILE_FLAG@ -profile all-profile: all - - -#include dep rules - --include $(addsuffix .d,${libxchange_TARGETS}) - -include ${top_srcdir}/Makefile.global - -# rule to compile objects - -${libxchange_OBJECTS}: %.o: ${srcdir}/%.c %.d Makefile ${abs_top_builddir}/include/tmlqcd_config_internal.h - $(COMPILE) ${OPTARGS} -c $< - -${libxchange_SOBJECTS}: %.o: ${srcdir}/%.c %.d Makefile ${abs_top_builddir}/include/tmlqcd_config_internal.h - $(COMPILE) ${SOPTARGS} -c $< - -# rule to make libxchange - -libxchange.a: ${libxchange_OBJECTS} ${libxchange_SOBJECTS} Makefile - @rm -f libxchange.a - @${AR} cru libxchange.a ${libxchange_OBJECTS} ${libxchange_SOBJECTS} - @$(RANLIB) libxchange.a - @cp libxchange.a ../lib/libxchange.a - -# rule to generate .d files - -$(addsuffix .d, $(libxchange_TARGETS) ${libxchange_STARGETS}): %.d: ${srcdir}/%.c Makefile - @${CCDEP} ${DEFS} ${DEPFLAGS} ${INCLUDES} $< > $@ - -# rule to make dependencies - -dep: ${addsuffix .d, ${libxchange_TARGETS} ${libxchange_STARGETS}} - -# rules to clean - -compile-clean: Makefile - rm -f ${$(addsuffix _OBJECTS, ${LIBRARIES})} ${$(addsuffix _SOBJECTS, ${LIBRARIES})} *.d - -clean: compile-clean - rm -f $(addsuffix .a, ${LIBRARIES}) - rm -f ../lib/libxchange.a - -distclean: clean - rm -f Makefile - -.PHONY: all dep clean compile-clean distclean profile all-profile debug all-debug diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt new file mode 100644 index 000000000..f3db7db31 --- /dev/null +++ b/tests/CMakeLists.txt @@ -0,0 +1,38 @@ +list(APPEND tmlqcd_tests + "test_buffers;test_clover;test_linalg;test_rat;test_sample;test_su3") + +if(TM_ENABLE_TESTS) + add_executable( + test_buffers + "test_buffers.c;test_buffers_gauge.c;${CMAKE_SOURCE_DIR}/src/lib/cu/cu.c") + add_executable( + test_clover + "test_clover.c;test_clover_six_invert.c;${CMAKE_SOURCE_DIR}/src/lib/cu/cu.c" + ) + add_executable( + test_linalg + "test_linalg.c;test_linalg_spinor.c;${CMAKE_SOURCE_DIR}/src/lib/cu/cu.c") + add_executable( + test_rat "test_rat.c;test_rat_init.c;${CMAKE_SOURCE_DIR}/src/lib/cu/cu.c") + add_executable( + test_sample + "test_sample.c;test_sample_ts1.c;test_sample_ts2.c;${CMAKE_SOURCE_DIR}/src/lib/cu/cu.c" + ) + add_executable( + test_su3 + "test_su3_algebra.c;test_su3.c;${CMAKE_SOURCE_DIR}/src/lib/cu/cu.c") + + foreach(_prog ${tmlqcd_tests}) + target_link_libraries(${_prog} PUBLIC tmlqcd) + target_include_directories( + ${_prog} + PUBLIC "${CMAKE_SOURCE_DIR}/src/lib/test" ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src/lib ${CMAKE_SOURCE_DIR}/src/lib/include + ${CMAKE_SOURCE_DIR}/src/lib/cu) + set_target_properties( + ${_prog} + PROPERTIES IMPORTED_LINK_INTERFACE_LANGUAGES "CXX" + POSITION_INDEPENDENT_CODE ON + LINKER_LANGUAGE "CXX") + endforeach() +endif() diff --git a/tests/test_buffers_gauge.c b/tests/test_buffers_gauge.c index 0e8d44214..bb3182418 100644 --- a/tests/test_buffers_gauge.c +++ b/tests/test_buffers_gauge.c @@ -7,7 +7,7 @@ #define EPS 5e-16 -int VOLUMEPLUSRAND = 10000; +int VOLUMEPLUSRAND_ = 10000; /* g_gauge_buffers is defined in one of the includes! */ extern gauge_buffers_t g_gauge_buffers; diff --git a/tests/test_rat_init.c b/tests/test_rat_init.c index decc6bcfd..9ccffe2cc 100644 --- a/tests/test_rat_init.c +++ b/tests/test_rat_init.c @@ -48,7 +48,7 @@ TEST(rat_init) { rat.crange[0] = 0; rat.crange[1] = order - 1; - ret = init_rational(&rat); + ret = init_rational(&rat, 1); assertFalseM(ret, "rat_init failed\n"); for (int i = 0; i < order; i++) {