From 72a8219fa5debd0bc35cad1937f45d462b3054a0 Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Thu, 5 Jul 2018 09:07:23 +0200 Subject: [PATCH 1/4] set build name --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ad98b6dee5..b46864db7e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -683,6 +683,7 @@ mark_as_advanced(CMAKE_C_FLAGS_DEVICEDEBUG) mark_as_advanced(CMAKE_F_FLAGS) +set(BUILDNAME ${HASH}) include( CTest ) ### add tests and quda library add_subdirectory(lib) From b214fe564f88d81276657d6a4d96e12e9871a677 Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Thu, 5 Jul 2018 14:15:48 +0200 Subject: [PATCH 2/4] enable GDR policies for separate Dslash policy testing if QUDA_ENABLE_GDR=1 when running cmake(!). For policy tuning it is enabled when QUDA_ENABLE_GDR is set before running ctest like usual. --- tests/CMakeLists.txt | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index fa4ddaaf55..83ad6c4900 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -42,9 +42,9 @@ if(QUDA_DIRAC_WILSON OR QUDA_DIRAC_CLOVER OR QUDA_DIRAC_TWISTED_MASS OR QUDA_DIR endif() if(QUDA_DIRAC_WILSON OR QUDA_DIRAC_CLOVER OR QUDA_DIRAC_TWISTED_MASS OR QUDA_DIRAC_TWISTED_CLOVER OR QUDA_DIRAC_DOMAIN_WALL OR QUDA_DIRAC_STAGGERED) - cuda_add_executable(deflated_invert_test deflated_invert_test.cpp wilson_dslash_reference.cpp domain_wall_dslash_reference.cpp blas_reference.cpp) - target_link_libraries(deflated_invert_test ${TEST_LIBS}) - QUDA_CHECKBUILDTEST(deflated_invert_test QUDA_BUILD_ALL_TESTS) + cuda_add_executable(deflated_invert_test deflated_invert_test.cpp wilson_dslash_reference.cpp domain_wall_dslash_reference.cpp blas_reference.cpp) + target_link_libraries(deflated_invert_test ${TEST_LIBS}) + QUDA_CHECKBUILDTEST(deflated_invert_test QUDA_BUILD_ALL_TESTS) endif() if(QUDA_DIRAC_STAGGERED) @@ -79,7 +79,7 @@ if(QUDA_MULTIGRID) cuda_add_executable(multigrid_evolve_test multigrid_evolve_test.cpp wilson_dslash_reference.cpp clover_reference.cpp domain_wall_dslash_reference.cpp blas_reference.cpp) target_link_libraries(multigrid_evolve_test ${TEST_LIBS}) QUDA_CHECKBUILDTEST(multigrid_evolve_test QUDA_BUILD_ALL_TESTS) -endif() + endif() endif() @@ -148,20 +148,26 @@ add_test(NAME blas_test COMMAND blas_test --sdim 16 --tdim 16 --gtest_output=xml # loop over Dslash policies if(QUDA_CTEST_SEP_DSLASH_POLICIES) - set(DSLASH_POLICIES 0 1 6 7 8 9 10 11 -1) + if(DEFINED ENV{QUDA_ENABLE_GDR}) + if($ENV{QUDA_ENABLE_GDR} EQUAL 1) + set(DSLASH_POLICIES 0 1 2 3 4 5 6 7 8 9 10 11 -1) + else() + set(DSLASH_POLICIES 0 1 6 7 8 9 10 11 -1) + endif() + endif() else() set(DSLASH_POLICIES -1) endif() foreach(pol IN LISTS DSLASH_POLICIES) -if(${pol} LESS 0) - set(pol2 "tune") - set(polenv OFF) -else() - set(pol2 ${pol}) - set(polenv ON) -endif() + if(${pol} LESS 0) + set(pol2 "tune") + set(polenv OFF) + else() + set(pol2 ${pol}) + set(polenv ON) + endif() if(QUDA_DIRAC_WILSON) add_test(NAME dslash_wilson-policy${pol2} COMMAND dslash_ctest --dslash-type wilson --test 3 --xdim 6 --ydim 8 --zdim 12 --tdim 16 --gtest_output=xml:dslash_wilson_test_pol${pol2}.xml) From 84584c827e0ec383883085713037f42607e531b4 Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Fri, 6 Jul 2018 10:05:13 +0200 Subject: [PATCH 3/4] fix Dslash policies if GDR is not enabled --- tests/CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 83ad6c4900..9337e94ada 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -148,11 +148,10 @@ add_test(NAME blas_test COMMAND blas_test --sdim 16 --tdim 16 --gtest_output=xml # loop over Dslash policies if(QUDA_CTEST_SEP_DSLASH_POLICIES) + set(DSLASH_POLICIES 0 1 6 7 8 9 10 11 -1) if(DEFINED ENV{QUDA_ENABLE_GDR}) if($ENV{QUDA_ENABLE_GDR} EQUAL 1) set(DSLASH_POLICIES 0 1 2 3 4 5 6 7 8 9 10 11 -1) - else() - set(DSLASH_POLICIES 0 1 6 7 8 9 10 11 -1) endif() endif() else() From 377a0132edc5d41ea21821645a1cbead5414a5f8 Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Mon, 9 Jul 2018 22:36:05 +0200 Subject: [PATCH 4/4] Update CMakeLists.txt build dslash_test also if only QUDA_DIRAC_NDEG_TWISTED_MASS is set --- tests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 9337e94ada..564f55424e 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -22,7 +22,7 @@ endif() #define tests -if(QUDA_DIRAC_WILSON OR QUDA_DIRAC_CLOVER OR QUDA_DIRAC_TWISTED_MASS OR QUDA_DIRAC_TWISTED_CLOVER OR QUDA_DIRAC_DOMAIN_WALL) +if(QUDA_DIRAC_WILSON OR QUDA_DIRAC_CLOVER OR QUDA_DIRAC_TWISTED_MASS OR QUDA_DIRAC_TWISTED_CLOVER OR QUDA_DIRAC_NDEG_TWISTED_MASS OR QUDA_DIRAC_DOMAIN_WALL) cuda_add_executable(dslash_test dslash_test.cpp wilson_dslash_reference.cpp domain_wall_dslash_reference.cpp clover_reference.cpp blas_reference.cpp) cuda_add_executable(dslash_ctest dslash_ctest.cpp wilson_dslash_reference.cpp domain_wall_dslash_reference.cpp clover_reference.cpp blas_reference.cpp) target_link_libraries(dslash_test ${TEST_LIBS} )