Skip to content
Snippets Groups Projects
Commit 2f6885f3 authored by Lars Bilke's avatar Lars Bilke
Browse files

Moved MPI groundwater flow tests to CLI tests.

parent 60d4d2e9
No related branches found
No related tags found
No related merge requests found
...@@ -14,9 +14,7 @@ if(OGS_USE_PETSC) ...@@ -14,9 +14,7 @@ if(OGS_USE_PETSC)
target_link_libraries(ogs ${PETSC_LIBRARIES}) target_link_libraries(ogs ${PETSC_LIBRARIES})
endif() endif()
if(NOT OGS_USE_MPI) include(Tests.cmake)
include(Tests.cmake)
endif()
#################### ####################
### Installation ### ### Installation ###
......
...@@ -2,125 +2,167 @@ ...@@ -2,125 +2,167 @@
add_test(NAME ogs_no_args COMMAND ogs) add_test(NAME ogs_no_args COMMAND ogs)
set_tests_properties(ogs_no_args PROPERTIES WILL_FAIL TRUE) set_tests_properties(ogs_no_args PROPERTIES WILL_FAIL TRUE)
# CUBE 1x1x1 GROUNDWATER FLOW TESTS if(NOT OGS_USE_MPI)
foreach(mesh_size 1e0 1e1 1e2 1e3) # CUBE 1x1x1 GROUNDWATER FLOW TESTS
AddTest( foreach(mesh_size 1e0 1e1 1e2 1e3)
NAME GroundWaterFlowProcess_cube_1x1x1_${mesh_size} AddTest(
PATH Elliptic/cube_1x1x1_GroundWaterFlow NAME GroundWaterFlowProcess_cube_1x1x1_${mesh_size}
EXECUTABLE ogs PATH Elliptic/cube_1x1x1_GroundWaterFlow
EXECUTABLE_ARGS cube_${mesh_size}.prj EXECUTABLE ogs
WRAPPER time EXECUTABLE_ARGS cube_${mesh_size}.prj
TESTER vtkdiff WRAPPER time
DIFF_DATA cube_${mesh_size}_pcs_0_ts_1.vtu Linear_1_to_minus1 Result TESTER vtkdiff
DATA cube_${mesh_size}.prj cube_1x1x1_hex_${mesh_size}.vtu cube_1x1x1.gml DIFF_DATA cube_${mesh_size}_pcs_0_ts_1.vtu Linear_1_to_minus1 Result
) DATA cube_${mesh_size}.prj cube_1x1x1_hex_${mesh_size}.vtu cube_1x1x1.gml
)
AddTest( AddTest(
NAME GroundWaterFlowProcess_cube_1x1x1_Neumann_${mesh_size} NAME GroundWaterFlowProcess_cube_1x1x1_Neumann_${mesh_size}
PATH Elliptic/cube_1x1x1_GroundWaterFlow PATH Elliptic/cube_1x1x1_GroundWaterFlow
EXECUTABLE ogs EXECUTABLE ogs
EXECUTABLE_ARGS cube_${mesh_size}_neumann.prj EXECUTABLE_ARGS cube_${mesh_size}_neumann.prj
WRAPPER time WRAPPER time
TESTER vtkdiff TESTER vtkdiff
DIFF_DATA cube_${mesh_size}_neumann_pcs_0_ts_1.vtu D1_left_front_N1_right Result DIFF_DATA cube_${mesh_size}_neumann_pcs_0_ts_1.vtu D1_left_front_N1_right Result
DATA cube_${mesh_size}_neumann.prj cube_1x1x1_hex_${mesh_size}.vtu cube_1x1x1.gml DATA cube_${mesh_size}_neumann.prj cube_1x1x1_hex_${mesh_size}.vtu cube_1x1x1.gml
) )
endforeach() endforeach()
foreach(mesh_size 1e4 2e4 3e4 4e4 5e4 1e5 1e6) foreach(mesh_size 1e4 2e4 3e4 4e4 5e4 1e5 1e6)
AddTest( AddTest(
NAME LARGE_GroundWaterFlowProcess_cube_1x1x1_${mesh_size} NAME LARGE_GroundWaterFlowProcess_cube_1x1x1_${mesh_size}
PATH Elliptic/cube_1x1x1_GroundWaterFlow PATH Elliptic/cube_1x1x1_GroundWaterFlow
EXECUTABLE ogs EXECUTABLE ogs
EXECUTABLE_ARGS cube_${mesh_size}.prj EXECUTABLE_ARGS cube_${mesh_size}.prj
WRAPPER time WRAPPER time
TESTER vtkdiff TESTER vtkdiff
DIFF_DATA cube_${mesh_size}_pcs_0_ts_1.vtu Linear_1_to_minus1 Result DIFF_DATA cube_${mesh_size}_pcs_0_ts_1.vtu Linear_1_to_minus1 Result
DATA cube_${mesh_size}.prj cube_1x1x1_hex_${mesh_size}.vtu cube_1x1x1.gml DATA cube_${mesh_size}.prj cube_1x1x1_hex_${mesh_size}.vtu cube_1x1x1.gml
) )
AddTest( AddTest(
NAME LARGE_GroundWaterFlowProcess_cube_1x1x1_Neumann_${mesh_size} NAME LARGE_GroundWaterFlowProcess_cube_1x1x1_Neumann_${mesh_size}
PATH Elliptic/cube_1x1x1_GroundWaterFlow PATH Elliptic/cube_1x1x1_GroundWaterFlow
EXECUTABLE ogs EXECUTABLE ogs
EXECUTABLE_ARGS cube_${mesh_size}_neumann.prj EXECUTABLE_ARGS cube_${mesh_size}_neumann.prj
WRAPPER time WRAPPER time
TESTER vtkdiff TESTER vtkdiff
DIFF_DATA cube_${mesh_size}_neumann_pcs_0_ts_1.vtu D1_left_front_N1_right Result DIFF_DATA cube_${mesh_size}_neumann_pcs_0_ts_1.vtu D1_left_front_N1_right Result
DATA cube_${mesh_size}_neumann.prj cube_1x1x1_hex_${mesh_size}.vtu cube_1x1x1.gml DATA cube_${mesh_size}_neumann.prj cube_1x1x1_hex_${mesh_size}.vtu cube_1x1x1.gml
) )
endforeach() endforeach()
# SQUARE 1x1 GROUNDWATER FLOW TESTS # SQUARE 1x1 GROUNDWATER FLOW TESTS
foreach(mesh_size 1e0 1e1 1e2 1e3 1e4) foreach(mesh_size 1e0 1e1 1e2 1e3 1e4)
AddTest( AddTest(
NAME GroundWaterFlowProcess_square_1x1_${mesh_size} NAME GroundWaterFlowProcess_square_1x1_${mesh_size}
PATH Elliptic/square_1x1_GroundWaterFlow PATH Elliptic/square_1x1_GroundWaterFlow
EXECUTABLE ogs EXECUTABLE ogs
EXECUTABLE_ARGS square_${mesh_size}.prj EXECUTABLE_ARGS square_${mesh_size}.prj
WRAPPER time WRAPPER time
TESTER vtkdiff TESTER vtkdiff
DIFF_DATA square_${mesh_size}_pcs_0_ts_1.vtu Linear_1_to_minus1 Result DIFF_DATA square_${mesh_size}_pcs_0_ts_1.vtu Linear_1_to_minus1 Result
DATA square_${mesh_size}.prj square_1x1_quad_${mesh_size}.vtu square_1x1.gml DATA square_${mesh_size}.prj square_1x1_quad_${mesh_size}.vtu square_1x1.gml
) )
AddTest( AddTest(
NAME GroundWaterFlowProcess_square_1x1_Neumann_${mesh_size} NAME GroundWaterFlowProcess_square_1x1_Neumann_${mesh_size}
PATH Elliptic/square_1x1_GroundWaterFlow PATH Elliptic/square_1x1_GroundWaterFlow
EXECUTABLE ogs EXECUTABLE ogs
EXECUTABLE_ARGS square_${mesh_size}_neumann.prj EXECUTABLE_ARGS square_${mesh_size}_neumann.prj
WRAPPER time WRAPPER time
TESTER vtkdiff TESTER vtkdiff
DIFF_DATA square_${mesh_size}_neumann_pcs_0_ts_1.vtu D1_left_bottom_N1_right Result DIFF_DATA square_${mesh_size}_neumann_pcs_0_ts_1.vtu D1_left_bottom_N1_right Result
DATA square_${mesh_size}_neumann.prj square_1x1_quad_${mesh_size}.vtu square_1x1.gml DATA square_${mesh_size}_neumann.prj square_1x1_quad_${mesh_size}.vtu square_1x1.gml
) )
endforeach() endforeach()
foreach(mesh_size 1e5 1e6) foreach(mesh_size 1e5 1e6)
AddTest( AddTest(
NAME LARGE_GroundWaterFlowProcess_square_1x1_${mesh_size} NAME LARGE_GroundWaterFlowProcess_square_1x1_${mesh_size}
PATH Elliptic/square_1x1_GroundWaterFlow PATH Elliptic/square_1x1_GroundWaterFlow
EXECUTABLE ogs EXECUTABLE ogs
EXECUTABLE_ARGS square_${mesh_size}.prj EXECUTABLE_ARGS square_${mesh_size}.prj
WRAPPER time WRAPPER time
TESTER vtkdiff TESTER vtkdiff
DIFF_DATA square_${mesh_size}_pcs_0_ts_1.vtu Linear_1_to_minus1 Result DIFF_DATA square_${mesh_size}_pcs_0_ts_1.vtu Linear_1_to_minus1 Result
DATA square_${mesh_size}.prj square_1x1_quad_${mesh_size}.vtu square_1x1.gml DATA square_${mesh_size}.prj square_1x1_quad_${mesh_size}.vtu square_1x1.gml
) )
AddTest(
NAME LARGE_GroundWaterFlowProcess_square_1x1_Neumann_${mesh_size}
PATH Elliptic/square_1x1_GroundWaterFlow
EXECUTABLE ogs
EXECUTABLE_ARGS square_${mesh_size}_neumann.prj
WRAPPER time
TESTER vtkdiff
DIFF_DATA square_${mesh_size}_neumann_pcs_0_ts_1.vtu D1_left_bottom_N1_right Result
DATA square_${mesh_size}_neumann.prj square_1x1_quad_${mesh_size}.vtu square_1x1.gml
)
endforeach()
# LINE 1 GROUNDWATER FLOW TESTS
foreach(mesh_size 1e1)
AddTest(
NAME GroundWaterFlowProcess_line_1_${mesh_size}
PATH Elliptic/line_1_GroundWaterFlow
EXECUTABLE ogs
EXECUTABLE_ARGS line_${mesh_size}.prj
WRAPPER time
TESTER vtkdiff
DIFF_DATA line_${mesh_size}_pcs_0_ts_1.vtu Linear_1_to_minus1 Result
DATA line_${mesh_size}.prj line_1_line_${mesh_size}.vtu line_1.gml
)
AddTest(
NAME GroundWaterFlowProcess_line_1_Neumann_${mesh_size}
PATH Elliptic/line_1_GroundWaterFlow
EXECUTABLE ogs
EXECUTABLE_ARGS line_${mesh_size}_neumann.prj
WRAPPER time
TESTER vtkdiff
DIFF_DATA line_${mesh_size}_neumann_pcs_0_ts_1.vtu D1_left_N1_right Result
DATA line_${mesh_size}_neumann.prj line_1_line_${mesh_size}.vtu line_1.gml
)
endforeach()
else()
# MPI groundwater flow tests
AddTest( AddTest(
NAME LARGE_GroundWaterFlowProcess_square_1x1_Neumann_${mesh_size} NAME ParallelFEM_GroundWaterFlow2D
PATH Elliptic/square_1x1_GroundWaterFlow PATH EllipticPETSc/
EXECUTABLE ogs EXECUTABLE_ARGS quad_20x10_GroundWaterFlow.prj -gw_ksp_type bcgs -gw_pc_type bjacobi -gw_ksp_atol 1.e-10
EXECUTABLE_ARGS square_${mesh_size}_neumann.prj WRAPPER mpirun
WRAPPER time WRAPPER_ARGS "-np 3"
TESTER vtkdiff TESTER diff
DIFF_DATA square_${mesh_size}_neumann_pcs_0_ts_1.vtu D1_left_bottom_N1_right Result DIFF_DATA
DATA square_${mesh_size}_neumann.prj square_1x1_quad_${mesh_size}.vtu square_1x1.gml quad_20x10_GroundWaterFlow_result_pcs_0_ts_1_0.vtu
quad_20x10_GroundWaterFlow_result_pcs_0_ts_1_1.vtu
quad_20x10_GroundWaterFlow_result_pcs_0_ts_1_2.vtu
) )
endforeach()
# LINE 1 GROUNDWATER FLOW TESTS
foreach(mesh_size 1e1)
AddTest( AddTest(
NAME GroundWaterFlowProcess_line_1_${mesh_size} NAME ParallelFEM_GroundWaterFlow3D_DirichletBC
PATH Elliptic/line_1_GroundWaterFlow PATH EllipticPETSc/
EXECUTABLE ogs EXECUTABLE_ARGS cube_1e3.prj -gw_ksp_type bcgs -gw_pc_type bjacobi -gw_ksp_atol 1.e-10
EXECUTABLE_ARGS line_${mesh_size}.prj WRAPPER mpirun
WRAPPER time WRAPPER_ARGS "-np 3"
TESTER vtkdiff TESTER diff
DIFF_DATA line_${mesh_size}_pcs_0_ts_1.vtu Linear_1_to_minus1 Result DIFF_DATA
DATA line_${mesh_size}.prj line_1_line_${mesh_size}.vtu line_1.gml cube_1e3_result_pcs_0_ts_1_0.vtu
cube_1e3_result_pcs_0_ts_1_1.vtu
cube_1e3_result_pcs_0_ts_1_2.vtu
) )
AddTest( AddTest(
NAME GroundWaterFlowProcess_line_1_Neumann_${mesh_size} NAME ParallelFEM_GroundWaterFlow3D_NeumannBC
PATH Elliptic/line_1_GroundWaterFlow PATH EllipticPETSc/
EXECUTABLE ogs EXECUTABLE_ARGS cube_1e3_neumann.prj -gw_ksp_type bcgs -gw_pc_type bjacobi -gw_ksp_atol 1.e-10
EXECUTABLE_ARGS line_${mesh_size}_neumann.prj WRAPPER mpirun
WRAPPER time WRAPPER_ARGS "-np 3"
TESTER vtkdiff TESTER diff
DIFF_DATA line_${mesh_size}_neumann_pcs_0_ts_1.vtu D1_left_N1_right Result DIFF_DATA
DATA line_${mesh_size}_neumann.prj line_1_line_${mesh_size}.vtu line_1.gml cube_1e3_neumann_result_pcs_0_ts_1_0.vtu
cube_1e3_neumann_result_pcs_0_ts_1_1.vtu
cube_1e3_neumann_result_pcs_0_ts_1_2.vtu
) )
endforeach() endif()
...@@ -40,43 +40,3 @@ AddTest( ...@@ -40,43 +40,3 @@ AddTest(
TESTER diff TESTER diff
DIFF_DATA mesh_3d_partition_0.msh mesh_3d_partition_1.msh mesh_3d_partition_2.msh DIFF_DATA mesh_3d_partition_0.msh mesh_3d_partition_1.msh mesh_3d_partition_2.msh
) )
## FEM#PETSc solver tests
AddTest(
NAME ParallelFEM_GroundWaterFlow2D
PATH EllipticPETSc/
EXECUTABLE_ARGS quad_20x10_GroundWaterFlow.prj -gw_ksp_type bcgs -gw_pc_type bjacobi -gw_ksp_atol 1.e-10
WRAPPER mpirun
WRAPPER_ARGS "-np 3"
TESTER diff
DIFF_DATA
quad_20x10_GroundWaterFlow_result_pcs_0_ts_1_0.vtu
quad_20x10_GroundWaterFlow_result_pcs_0_ts_1_1.vtu
quad_20x10_GroundWaterFlow_result_pcs_0_ts_1_2.vtu
)
AddTest(
NAME ParallelFEM_GroundWaterFlow3D_DirichletBC
PATH EllipticPETSc/
EXECUTABLE_ARGS cube_1e3.prj -gw_ksp_type bcgs -gw_pc_type bjacobi -gw_ksp_atol 1.e-10
WRAPPER mpirun
WRAPPER_ARGS "-np 3"
TESTER diff
DIFF_DATA
cube_1e3_result_pcs_0_ts_1_0.vtu
cube_1e3_result_pcs_0_ts_1_1.vtu
cube_1e3_result_pcs_0_ts_1_2.vtu
)
AddTest(
NAME ParallelFEM_GroundWaterFlow3D_NeumannBC
PATH EllipticPETSc/
EXECUTABLE_ARGS cube_1e3_neumann.prj -gw_ksp_type bcgs -gw_pc_type bjacobi -gw_ksp_atol 1.e-10
WRAPPER mpirun
WRAPPER_ARGS "-np 3"
TESTER diff
DIFF_DATA
cube_1e3_neumann_result_pcs_0_ts_1_0.vtu
cube_1e3_neumann_result_pcs_0_ts_1_1.vtu
cube_1e3_neumann_result_pcs_0_ts_1_2.vtu
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment