Permalink
Browse files

Merge pull request #2310 from bilke/test-runtime

Optimize ctest runtime
  • Loading branch information...
bilke committed Jan 9, 2019
2 parents 8bd8e62 + 34638e4 commit aea65092e15ecc6d6da6e5b91debe310a4b139ad
@@ -39,6 +39,7 @@ AddTest(
WRAPPER time
TESTER vtkdiff
REQUIREMENTS NOT OGS_USE_MPI
RUNTIME 23
DIFF_DATA
DiffusionAndStorageAndAdvection_pcs_0_ts_100_t_5.700000_expected.vtu DiffusionAndStorageAndAdvection_pcs_0_ts_100_t_5.700000.vtu concentration concentration 1e-7 1e-10
DiffusionAndStorageAndAdvection_pcs_0_ts_200_t_35.700000_expected.vtu DiffusionAndStorageAndAdvection_pcs_0_ts_200_t_35.700000.vtu concentration concentration 1e-7 1e-10
@@ -72,6 +73,7 @@ AddTest(
WRAPPER time
TESTER vtkdiff
REQUIREMENTS NOT OGS_USE_MPI
RUNTIME 46
DIFF_DATA
DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_1000_t_2500.000000_expected.vtu DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_1000_t_2500.000000.vtu concentration concentration 1e-5 1e-10
DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_1100_t_5000.000000_expected.vtu DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_1100_t_5000.000000.vtu concentration concentration 1e-5 1e-10
@@ -102,6 +104,7 @@ AddTest(
WRAPPER time
TESTER vtkdiff
REQUIREMENTS NOT OGS_USE_MPI
RUNTIME 26
DIFF_DATA
DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_100_t_5.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_100_t_5.700000.vtu concentration concentration 1e-7 1e-10
DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_200_t_35.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_200_t_35.700000.vtu concentration concentration 1e-7 1e-10
@@ -135,6 +138,7 @@ AddTest(
WRAPPER time
TESTER vtkdiff
REQUIREMENTS NOT OGS_USE_MPI
RUNTIME 23
DIFF_DATA
DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_100_t_5.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_100_t_5.700000.vtu concentration concentration 1e-7 1e-10
DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_200_t_35.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_200_t_35.700000.vtu concentration concentration 1e-7 1e-10
@@ -168,6 +172,7 @@ AddTest(
WRAPPER time
TESTER vtkdiff
REQUIREMENTS NOT OGS_USE_MPI
RUNTIME 25
DIFF_DATA
DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_100_t_5.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_100_t_5.700000.vtu concentration concentration 1e-7 1e-10
DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_200_t_35.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_200_t_35.700000.vtu concentration concentration 1e-7 1e-10
@@ -410,6 +415,7 @@ AddTest(
WRAPPER time
TESTER vtkdiff
REQUIREMENTS NOT OGS_USE_MPI
RUNTIME 15
DIFF_DATA
3D1P-GWFlow_1_reference.vtu out_ogs5_H_pcs_0_ts_1_t_10000000.000000.vtu pressure_ogs5 pressure 2.4e1 1.4e-2
3D1P-GWFlow_1_reference.vtu out_ogs5_H_pcs_0_ts_1_t_10000000.000000.vtu NODAL_VELOCITY1 darcy_velocity 1e-10 1.4e-2
@@ -6,13 +6,14 @@ AddTest(
WRAPPER time
TESTER vtkdiff
REQUIREMENTS NOT OGS_USE_MPI
RUNTIME 20
DIFF_DATA
beier_sandbox_pcs_0_ts_10_t_600.000000.vtu beier_sandbox_pcs_0_ts_10_t_600.000000.vtu temperature_BHE1 temperature_BHE1 0 5e-15
beier_sandbox_pcs_0_ts_10_t_600.000000.vtu beier_sandbox_pcs_0_ts_10_t_600.000000.vtu temperature_soil temperature_soil 0 1e-13
)

AddTest(
NAME HeatTransportBHE_1U_beier_sandbox_fixed_power_constant_flow
NAME LARGE_HeatTransportBHE_1U_beier_sandbox_fixed_power_constant_flow
PATH Parabolic/T/3D_Beier_sandbox
EXECUTABLE ogs
EXECUTABLE_ARGS fixed_power_constant_flow.prj
@@ -7,6 +7,7 @@ AddTest(
WRAPPER time
TESTER vtkdiff
REQUIREMENTS NOT (OGS_USE_LIS OR OGS_USE_MPI)
RUNTIME 20
DIFF_DATA
expected_single_fracture_pcs_0_ts_10_t_100.000000.vtu single_fracture_pcs_0_ts_10_t_100.000000.vtu pressure pressure 1e-12 1e-12
expected_single_fracture_pcs_0_ts_10_t_100.000000.vtu single_fracture_pcs_0_ts_10_t_100.000000.vtu pressure_interpolated pressure_interpolated 1e-12 1e-12
@@ -32,6 +32,7 @@ AddTest(
WRAPPER time
TESTER vtkdiff
REQUIREMENTS NOT (OGS_USE_LIS OR OGS_USE_MPI)
RUNTIME 18
DIFF_DATA
expected_beam3_stag1pcsAT2_pcs_1_ts_10_t_1.000000.vtu beam3_stag1pcsAT2_pcs_1_ts_10_t_1.000000.vtu displacement displacement 1e-5 0
expected_beam3_stag1pcsAT2_pcs_1_ts_10_t_1.000000.vtu beam3_stag1pcsAT2_pcs_1_ts_10_t_1.000000.vtu phasefield phasefield 1e-6 0
@@ -32,6 +32,7 @@ AddTest(
WRAPPER time
TESTER vtkdiff
REQUIREMENTS NOT OGS_USE_MPI
RUNTIME 13
DIFF_DATA
GLOB Padilla_NaCl6_pcs_0_ts_*.vtu concentration concentration 1e-13 0
GLOB Padilla_NaCl6_pcs_0_ts_*.vtu pressure pressure 1e-10 0
@@ -100,6 +100,7 @@ AddTest(
WRAPPER time
TESTER vtkdiff
REQUIREMENTS NOT OGS_USE_MPI
RUNTIME 49
DIFF_DATA
GLOB RichardsFlow_2d_quasinewton_pcs_0_ts_*.vtu displacement displacement 2e-14 0
GLOB RichardsFlow_2d_quasinewton_pcs_0_ts_*.vtu sigma sigma 1e-8 0
@@ -8,13 +8,13 @@ if (NOT OGS_USE_MPI)
OgsTest(PROJECTFILE "Mechanics/EhlersDamageNonLocal/bar/p1/bar.prj")
OgsTest(PROJECTFILE "Mechanics/EhlersDamageNonLocal/bar/p2/bar.prj")
OgsTest(PROJECTFILE "Mechanics/EhlersDamageNonLocal/bar/p3/bar.prj")
OgsTest(PROJECTFILE "Mechanics/EhlersDamageNonLocal/bar/t1/bar.prj")
OgsTest(PROJECTFILE "Mechanics/EhlersDamageNonLocal/bar/t1/bar.prj" RUNTIME 14)
OgsTest(PROJECTFILE "Mechanics/EhlersDamageNonLocal/bar/t2/bar.prj")
OgsTest(PROJECTFILE "Mechanics/EhlersDamageNonLocal/beam/coarse/beam.prj")
OgsTest(PROJECTFILE "Mechanics/EhlersDamageNonLocal/beam/medium/beam.prj")
OgsTest(PROJECTFILE "Mechanics/EhlersDamageNonLocal/beam/medium/beam.prj" RUNTIME 38)
OgsTest(PROJECTFILE "Mechanics/EhlersDamageNonLocal/beam/fine/beam.prj" LARGE)
OgsTest(PROJECTFILE "Mechanics/EhlersDamageNonLocal/beam/coarse_quad/beam.prj")
OgsTest(PROJECTFILE "Mechanics/EhlersDamageNonLocal/beam/coarse_tria/beam.prj")
OgsTest(PROJECTFILE "Mechanics/EhlersDamageNonLocal/beam/coarse_quad/beam.prj" RUNTIME 27)
OgsTest(PROJECTFILE "Mechanics/EhlersDamageNonLocal/beam/coarse_tria/beam.prj" RUNTIME 12)
OgsTest(PROJECTFILE "Mechanics/EhlersDamageNonLocal/beam/3D_hexa/beam.prj" LARGE)
OgsTest(PROJECTFILE "Mechanics/EhlersDamageNonLocal/beam/3D_tetr/beam.prj" LARGE)
OgsTest(PROJECTFILE "Mechanics/EhlersDamageNonLocal/holed_beam/holed_beam.prj" LARGE)
@@ -50,6 +50,7 @@ AddTest(
EXECUTABLE ogs
EXECUTABLE_ARGS tes-inert-axi.prj
TESTER vtkdiff
RUNTIME 23
REQUIREMENTS NOT OGS_USE_MPI
# Note: Since the temperature and pressure only vary by a factor of ~ 1.e-6 in x-direction
# the relative tolerance has to be much smaller than 1.e-6
@@ -2,14 +2,14 @@ if (NOT OGS_USE_MPI)
OgsTest(PROJECTFILE ThermoMechanics/CreepBGRa/Verification/m2_1D1bt/m2_1D1bt.prj)
OgsTest(PROJECTFILE ThermoMechanics/CreepBGRa/Verification/m2_1D2bt/m2_1D2bt.prj)
OgsTest(PROJECTFILE ThermoMechanics/CreepBGRa/Verification/m2_1Dcreep/m2_1Dcreep.prj)
OgsTest(PROJECTFILE ThermoMechanics/CreepBGRa/Verification/m2_1Dlozenge/m2_1Dlozenge.prj)
OgsTest(PROJECTFILE ThermoMechanics/CreepBGRa/Verification/m2_1Dlozengebt/m2_1Dlozengebt.prj)
OgsTest(PROJECTFILE ThermoMechanics/CreepBGRa/Verification/m2_1Dlozenge/m2_1Dlozenge.prj RUNTIME 23)
OgsTest(PROJECTFILE ThermoMechanics/CreepBGRa/Verification/m2_1Dlozengebt/m2_1Dlozengebt.prj RUNTIME 82)
OgsTest(PROJECTFILE ThermoMechanics/CreepBGRa/Verification/m2_1Drelax/m2_1Drelax.prj)
OgsTest(PROJECTFILE ThermoMechanics/CreepBGRa/Verification/m2_2Dload/m2_2Dload.prj)
OgsTest(PROJECTFILE ThermoMechanics/CreepBGRa/Verification/m2_2Dload/m2_2Dload_ym45.prj)
OgsTest(PROJECTFILE ThermoMechanics/CreepBGRa/Verification/m2_2Dloadbt/m2_2Dloadbt.prj)
OgsTest(PROJECTFILE ThermoMechanics/CreepBGRa/Verification/m2_3Dload/m2_3Dload.prj)
OgsTest(PROJECTFILE ThermoMechanics/CreepBGRa/Verification/m2_3Dloadbt/m2_3Dloadbt.prj)
OgsTest(PROJECTFILE ThermoMechanics/CreepBGRa/Verification/m2_2Dload/m2_2Dload_ym45.prj RUNTIME 43)
OgsTest(PROJECTFILE ThermoMechanics/CreepBGRa/Verification/m2_2Dloadbt/m2_2Dloadbt.prj RUNTIME 64)
OgsTest(PROJECTFILE ThermoMechanics/CreepBGRa/Verification/m2_3Dload/m2_3Dload.prj RUNTIME 24)
OgsTest(PROJECTFILE ThermoMechanics/CreepBGRa/Verification/m2_3Dloadbt/m2_3Dloadbt.prj RUNTIME 67)
endif()

AddTest(
@@ -20,6 +20,7 @@ AddTest(
WRAPPER time
TESTER vtkdiff
REQUIREMENTS NOT (OGS_USE_LIS OR OGS_USE_MPI)
RUNTIME 17
DIFF_DATA
stress_analytical.vtu cube_1e3_tm_pcs_0_ts_17_t_72000.000000.vtu sigma sigma 1e-5 1e-12
expected_cube_1e3_tm_pcs_0_ts_17_t_72000.000000.vtu cube_1e3_tm_pcs_0_ts_17_t_72000.000000.vtu displacement displacement 1e-10 1e-12
@@ -36,6 +37,7 @@ AddTest(
WRAPPER time
TESTER vtkdiff
REQUIREMENTS NOT (OGS_USE_LIS OR OGS_USE_MPI)
RUNTIME 39
DIFF_DATA
expected_tm_q_pcs_0_ts_20_t_20000.000000.vtu tm_q_pcs_0_ts_20_t_20000.000000.vtu displacement displacement 1e-9 1e-15
expected_tm_q_pcs_0_ts_20_t_20000.000000.vtu tm_q_pcs_0_ts_20_t_20000.000000.vtu temperature temperature 2e-6 1e-15
@@ -110,6 +112,7 @@ AddTest(
WRAPPER time
TESTER vtkdiff
REQUIREMENTS NOT (OGS_USE_LIS OR OGS_USE_MPI)
RUNTIME 22
DIFF_DATA
SimpleAxisymmetricCreepWithAnalyticSolution.vtu SimpleAxisymmetricCreepWithAnalyticalSolution_pcs_0_ts_1000_t_100.000000.vtu analytic_strain epsilon 1e-7 0
)
@@ -122,6 +125,7 @@ AddTest(
WRAPPER time
TESTER vtkdiff
REQUIREMENTS NOT (OGS_USE_LIS OR OGS_USE_MPI)
RUNTIME 24
DIFF_DATA
ExpectedCreepAfterExcavation_pcs_0_ts_61_t_4320000.000000.vtu CreepAfterExcavation_pcs_0_ts_61_t_4320000.000000.vtu sigma sigma 5e-6 0
ExpectedCreepAfterExcavation_pcs_0_ts_61_t_4320000.000000.vtu CreepAfterExcavation_pcs_0_ts_61_t_4320000.000000.vtu epsilon epsilon 1e-15 0
@@ -15,6 +15,7 @@ AddTest(
EXECUTABLE_ARGS TwoPhase_Lia_quad_short.prj
TESTER vtkdiff
REQUIREMENTS NOT OGS_USE_MPI
RUNTIME 11
DIFF_DATA
h2_Liako_20.vtu twophaseflow_pcs_0_ts_218_t_20.000000.vtu capillary_pressure capillary_pressure 20 1e-3
h2_Liako_20.vtu twophaseflow_pcs_0_ts_218_t_20.000000.vtu gas_pressure gas_pressure 20 1e-3
@@ -10,7 +10,7 @@
node_modules/.bin/hugo-algolia --toml -s"""

[build.environment] # global variables
HUGO_VERSION = "0.47.1"
HUGO_VERSION = "0.53"
GIT_LFS_ENABLED = "true"

[context.production.environment]
@@ -16,6 +16,8 @@
# enable the test, e.g.
# OGS_USE_PETSC AND (OGS_USE_EIGEN OR OGS_USE_LIS)
# VIS <vtu output file(s)> # optional for documentation
# RUNTIME <in seconds> # optional for optimizing ctest duration
# values should be taken from envinf1 serial job
# )
#
# Conditional arguments:
@@ -42,7 +44,7 @@ function (AddTest)
endif()
# parse arguments
set(options NONE)
set(oneValueArgs EXECUTABLE PATH NAME WRAPPER TESTER ABSTOL RELTOL)
set(oneValueArgs EXECUTABLE PATH NAME WRAPPER TESTER ABSTOL RELTOL RUNTIME)
set(multiValueArgs EXECUTABLE_ARGS DATA DIFF_DATA WRAPPER_ARGS REQUIREMENTS VIS)
cmake_parse_arguments(AddTest "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})

@@ -54,11 +56,14 @@ function (AddTest)
set(AddTest_STDOUT_FILE_PATH "${AddTest_BINARY_PATH}/${AddTest_NAME}_stdout.log")

# set defaults
if(NOT AddTest_EXECUTABLE)
if(NOT DEFINED AddTest_EXECUTABLE)
set(AddTest_EXECUTABLE ogs)
endif()
if (NOT AddTest_REQUIREMENTS)
set (AddTest_REQUIREMENTS TRUE)
if (NOT DEFINED AddTest_REQUIREMENTS)
set(AddTest_REQUIREMENTS TRUE)
endif()
if (NOT DEFINED AddTest_RUNTIME)
set(AddTest_RUNTIME 1)
endif()

if("${AddTest_EXECUTABLE}" STREQUAL "ogs")
@@ -243,6 +248,7 @@ Use six arguments version of AddTest with absolute and relative tolerances")
-DSTDOUT_FILE_PATH=${AddTest_STDOUT_FILE_PATH}
-P ${PROJECT_SOURCE_DIR}/scripts/cmake/test/AddTestWrapper.cmake
)
set_tests_properties(${TEST_NAME} PROPERTIES COST ${AddTest_RUNTIME})

if(TARGET ${AddTest_EXECUTABLE})
add_dependencies(ctest ${AddTest_EXECUTABLE})
@@ -3,7 +3,7 @@ function (OgsTest)
return()
endif()
set(options LARGE)
set(oneValueArgs PROJECTFILE)
set(oneValueArgs PROJECTFILE RUNTIME)
set(multiValueArgs WRAPPER)
cmake_parse_arguments(OgsTest "${options}" "${oneValueArgs}"
"${multiValueArgs}" ${ARGN})
@@ -16,6 +16,10 @@ function (OgsTest)
message(FATAL_ERROR "Unparsed argument(s) '${OgsTest_UNPARSED_ARGUMENTS}' to OgsTest call.")
endif()

if (NOT DEFINED OgsTest_RUNTIME)
set(OgsTest_RUNTIME 1)
endif()

set(OgsTest_SOURCE_DIR "${Data_SOURCE_DIR}/${OgsTest_DIR}")
set(OgsTest_BINARY_DIR "${Data_BINARY_DIR}/${OgsTest_DIR}")
file(MAKE_DIRECTORY ${OgsTest_BINARY_DIR})
@@ -44,8 +48,9 @@ function (OgsTest)
# WORKING_DIRECTORY ${OgsTest_BINARY_DIR}
# COMMAND ${OgsTest_WRAPPER} $<TARGET_FILE:ogs> -r ${OgsTest_SOURCE_DIR} ${OgsTest_SOURCE_DIR}/${OgsTest_NAME})

set_tests_properties(${TEST_NAME} PROPERTIES ENVIRONMENT
VTKDIFF_EXE=$<TARGET_FILE:vtkdiff>)
set_tests_properties(${TEST_NAME} PROPERTIES
ENVIRONMENT VTKDIFF_EXE=$<TARGET_FILE:vtkdiff>
COST ${OgsTest_RUNTIME})

if(TARGET ${OgsTest_EXECUTABLE})
add_dependencies(ctest ${OgsTest_EXECUTABLE})
@@ -1 +1 @@
{"Target":"main.min.43c5744a6baebcf97e0a3ee202c196793f5703125fd26e790908a942e9c8dd5e.css","MediaType":"text/css","Data":{"Integrity":"sha256-Q8V0SmuuvPl+Cj7iAsGWeT9XAxJf0m55CQipQunI3V4="}}
{"Target":"main.min.93b4253c1a53bde830275549bec6a3159fd4fdff10a82a4c3d035f26915f058f.css","MediaType":"text/css","Data":{"Integrity":"sha256-k7QlPBpTvegwJ1VJvsajFZ/U/f8QqCpMPQNfJpFfBY8="}}

0 comments on commit aea6509

Please sign in to comment.