From 00f8e32c2ff85d988be2cb12702b6afba7c02a29 Mon Sep 17 00:00:00 2001 From: Mark Berrill Date: Tue, 28 Jan 2014 14:57:05 -0500 Subject: [PATCH] Moving some files for CMake --- CMakeLists.txt | 5 ---- cpu/{ => exe}/lb2_Color_wia_mpi_bubble.cpp | 0 tests/CMakeLists.txt | 24 +++++++++++++------- tests/cpu/CMakeLists.txt | 10 ++++++++ {cpu => tests/cpu}/lb2_Color_wia_mpi.cpp | 0 tests/gpu/CMakeLists.txt | 8 +++++++ {gpu/exe => tests/gpu}/lb2_Color_wia_mpi.cpp | 0 7 files changed, 34 insertions(+), 13 deletions(-) rename cpu/{ => exe}/lb2_Color_wia_mpi_bubble.cpp (100%) create mode 100755 tests/cpu/CMakeLists.txt rename {cpu => tests/cpu}/lb2_Color_wia_mpi.cpp (100%) create mode 100755 tests/gpu/CMakeLists.txt rename {gpu/exe => tests/gpu}/lb2_Color_wia_mpi.cpp (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index b662e0d4..ea5c039b 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -108,11 +108,6 @@ IF ( NOT ONLY_BUILD_DOCS ) ENDIF() INSTALL_LBPM_TARGET( lbpm-wia ) ADD_SUBDIRECTORY( tests ) - #IF ( USE_CUDA ) - # ADD_SUBDIRECTORY( gpu/exe ) - #ELSE() - # ADD_SUBDIRECTORY( cpu/exe ) - #ENDIF() INSTALL( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/example DESTINATION ${LBPM_INSTALL_DIR} ) ENDIF() diff --git a/cpu/lb2_Color_wia_mpi_bubble.cpp b/cpu/exe/lb2_Color_wia_mpi_bubble.cpp similarity index 100% rename from cpu/lb2_Color_wia_mpi_bubble.cpp rename to cpu/exe/lb2_Color_wia_mpi_bubble.cpp diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index cbe253ce..46ea6152 100755 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -5,12 +5,20 @@ CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/cylindertest ${CMAKE_CURRENT_BINARY_ # Add the tests ADD_LBPM_TEST( pmmc_cylinder ) ADD_LBPM_TEST( TestCylinderAreas ) -ADD_LBPM_TEST( TestSphereCurvature ) - -# Sample test that will run with 1, 2, and 4 processors, failing with 4 or more procs +ADD_LBPM_TEST( TestSphereCurvature ) + +# Sample test that will run with 1, 2, and 4 processors, failing with 4 or more procs ADD_LBPM_TEST_1_2_4( hello_world ) -SET_TESTS_PROPERTIES( hello_world PROPERTIES ENVIRONMENT "MPICH_RDMA_ENABLED_CUDA=0") -SET_TESTS_PROPERTIES( hello_world_2procs PROPERTIES ENVIRONMENT "MPICH_RDMA_ENABLED_CUDA=0") -SET_TESTS_PROPERTIES( hello_world_4procs PROPERTIES ENVIRONMENT "MPICH_RDMA_ENABLED_CUDA=0") - - +SET_TESTS_PROPERTIES( hello_world PROPERTIES ENVIRONMENT "MPICH_RDMA_ENABLED_CUDA=0") +SET_TESTS_PROPERTIES( hello_world_2procs PROPERTIES ENVIRONMENT "MPICH_RDMA_ENABLED_CUDA=0") +SET_TESTS_PROPERTIES( hello_world_4procs PROPERTIES ENVIRONMENT "MPICH_RDMA_ENABLED_CUDA=0") + + +# Add CPU/GPU specific test +IF ( USE_CUDA ) + ADD_SUBDIRECTORY( gpu ) +ELSE() + ADD_SUBDIRECTORY( cpu ) +ENDIF() + + diff --git a/tests/cpu/CMakeLists.txt b/tests/cpu/CMakeLists.txt new file mode 100755 index 00000000..8fe54140 --- /dev/null +++ b/tests/cpu/CMakeLists.txt @@ -0,0 +1,10 @@ +# Add tests/executables that need to be compiled but not run +INSTALL_LBPM_EXE( lb2_Color_wia_mpi ) + + +# Run the serial ConstrainedBubble inputs as a weekly test +CONFIGURE_FILE( ${LBPM_SOURCE_DIR}/example/ConstrainedBubble/Color.in ${CMAKE_CURRENT_BINARY_DIR}/Color.in COPYONLY ) +CONFIGURE_FILE( ${LBPM_SOURCE_DIR}/example/ConstrainedBubble/Domain.in ${CMAKE_CURRENT_BINARY_DIR}/Domain.in COPYONLY ) +ADD_LBPM_WEEKLY_TEST( lb2_Color_wia_mpi 1 ) + + diff --git a/cpu/lb2_Color_wia_mpi.cpp b/tests/cpu/lb2_Color_wia_mpi.cpp similarity index 100% rename from cpu/lb2_Color_wia_mpi.cpp rename to tests/cpu/lb2_Color_wia_mpi.cpp diff --git a/tests/gpu/CMakeLists.txt b/tests/gpu/CMakeLists.txt new file mode 100755 index 00000000..bc34ff68 --- /dev/null +++ b/tests/gpu/CMakeLists.txt @@ -0,0 +1,8 @@ +# Add tests/executables that need to be compiled but not run +INSTALL_LBPM_EXE( lb2_Color_wia_mpi ) + + +# Run the serial ConstrainedBubble inputs as a weekly test +CONFIGURE_FILE( ${LBPM_SOURCE_DIR}/example/ConstrainedBubble/Color.in ${CMAKE_CURRENT_BINARY_DIR}/Color.in COPYONLY ) +CONFIGURE_FILE( ${LBPM_SOURCE_DIR}/example/ConstrainedBubble/Domain.in ${CMAKE_CURRENT_BINARY_DIR}/Domain.in COPYONLY ) +ADD_LBPM_WEEKLY_TEST( lb2_Color_wia_mpi 1 ) diff --git a/gpu/exe/lb2_Color_wia_mpi.cpp b/tests/gpu/lb2_Color_wia_mpi.cpp similarity index 100% rename from gpu/exe/lb2_Color_wia_mpi.cpp rename to tests/gpu/lb2_Color_wia_mpi.cpp