diff --git a/Makefile.am b/Makefile.am index 1a75f2eb..0b9dc183 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,10 +5,13 @@ include $(top_srcdir)/doxygen.inc bin_SCRIPTS=grid-config -tests: all - $(MAKE) -C tests tests -.PHONY: tests doxygen-run doxygen-doc $(DX_PS_GOAL) $(DX_PDF_GOAL) +.PHONY: bench check tests doxygen-run doxygen-doc $(DX_PS_GOAL) $(DX_PDF_GOAL) + +tests-local: all +bench-local: all +check-local: tests AM_CXXFLAGS += -I$(top_builddir)/include + ACLOCAL_AMFLAGS = -I m4 diff --git a/benchmarks/Benchmark_su3.cc b/benchmarks/Benchmark_su3.cc index c234c301..1321715a 100644 --- a/benchmarks/Benchmark_su3.cc +++ b/benchmarks/Benchmark_su3.cc @@ -35,8 +35,9 @@ using namespace Grid::QCD; int main (int argc, char ** argv) { Grid_init(&argc,&argv); +#define LMAX (32) - int Nloop=1000; + int Nloop=200; std::vector simd_layout = GridDefaultSimd(Nd,vComplex::Nsimd()); std::vector mpi_layout = GridDefaultMpi(); @@ -50,7 +51,7 @@ int main (int argc, char ** argv) std::cout< latt_size ({lat*mpi_layout[0],lat*mpi_layout[1],lat*mpi_layout[2],lat*mpi_layout[3]}); int vol = latt_size[0]*latt_size[1]*latt_size[2]*latt_size[3]; @@ -82,7 +83,7 @@ int main (int argc, char ** argv) std::cout< latt_size ({lat*mpi_layout[0],lat*mpi_layout[1],lat*mpi_layout[2],lat*mpi_layout[3]}); int vol = latt_size[0]*latt_size[1]*latt_size[2]*latt_size[3]; @@ -113,7 +114,7 @@ int main (int argc, char ** argv) std::cout< latt_size ({lat*mpi_layout[0],lat*mpi_layout[1],lat*mpi_layout[2],lat*mpi_layout[3]}); int vol = latt_size[0]*latt_size[1]*latt_size[2]*latt_size[3]; @@ -144,7 +145,7 @@ int main (int argc, char ** argv) std::cout< latt_size ({lat*mpi_layout[0],lat*mpi_layout[1],lat*mpi_layout[2],lat*mpi_layout[3]}); int vol = latt_size[0]*latt_size[1]*latt_size[2]*latt_size[3]; diff --git a/benchmarks/Makefile.am b/benchmarks/Makefile.am index 1b345fd2..9d9f1a3e 100644 --- a/benchmarks/Makefile.am +++ b/benchmarks/Makefile.am @@ -1,11 +1,7 @@ include Make.inc -simple: simple_su3_test.o simple_su3_expr.o simple_simd_test.o - -EXTRA_LIBRARIES = libsimple_su3_test.a libsimple_su3_expr.a libsimple_simd_test.a - -libsimple_su3_test_a_SOURCES = simple_su3_test.cc - -libsimple_su3_expr_a_SOURCES = simple_su3_expr.cc - -libsimple_simd_test_a_SOURCES = simple_simd_test.cc +bench-local: all + ./Benchmark_su3 + ./Benchmark_memory_bandwidth + ./Benchmark_wilson + ./Benchmark_dwf --dslash-unroll \ No newline at end of file diff --git a/configure.ac b/configure.ac index faefad8b..8f569c57 100644 --- a/configure.ac +++ b/configure.ac @@ -4,6 +4,7 @@ AC_CANONICAL_BUILD AC_CANONICAL_HOST AC_CANONICAL_TARGET AM_INIT_AUTOMAKE(subdir-objects) +AM_EXTRA_RECURSIVE_TARGETS([tests bench]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR([lib/Grid.h]) AC_CONFIG_HEADERS([lib/Config.h],[sed -i 's|PACKAGE_|GRID_|' lib/Config.h]) diff --git a/scripts/filelist b/scripts/filelist index 38e8ea94..8d4b8e1a 100755 --- a/scripts/filelist +++ b/scripts/filelist @@ -23,8 +23,7 @@ for subdir in $dirs; do TESTS=`ls T*.cc` TESTLIST=`echo ${TESTS} | sed s/.cc//g ` PREF=`[ $subdir = '.' ] && echo noinst || echo EXTRA` - SUB=`[ $subdir = '.' ] && echo subtests` - echo "tests: ${TESTLIST} ${SUB}" > Make.inc + echo "tests-local: ${TESTLIST} " > Make.inc echo ${PREF}_PROGRAMS = ${TESTLIST} >> Make.inc echo >> Make.inc HADLINK=`[ $subdir = './hadrons' ] && echo '-lHadrons '` diff --git a/tests/Makefile.am b/tests/Makefile.am index 79e7e501..a37b8801 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,12 +1,17 @@ -SUBDIRS = core forces hmc solver debug smearing IO +SUBDIRS = . core forces hmc solver debug smearing if BUILD_CHROMA_REGRESSION SUBDIRS+= qdpxx endif -.PHONY: subtests - include Make.inc -subtests: - for d in $(SUBDIRS); do $(MAKE) -C $${d} tests; done +check-local: all + ./Test_simd + ./Test_cshift + ./Test_stencil + ./Test_cayley_even_odd_vec + ./Test_dwf_mixedcg_prec + + + diff --git a/tests/forces/Makefile.am b/tests/forces/Makefile.am index 60b82dd7..6fc4ca74 100644 --- a/tests/forces/Makefile.am +++ b/tests/forces/Makefile.am @@ -1 +1,14 @@ +.PHONY: check + include Make.inc + +check: all + ./Test_rect_force + ./Test_gp_rect_force + ./Test_laplacian_force + ./Test_wilson_force + ./Test_gpwilson_force + ./Test_dwf_force + ./Test_dwf_gpforce + ./Test_mobius_force + ./Test_zmobius_force