2017-01-23 03:42:09 -06:00
|
|
|
# This script manages the addition of tests.
|
|
|
|
# The tests are orchestrated by a shell script,
|
|
|
|
# configured using opm_set_test_driver()
|
|
|
|
# and then the appropriate helper macro is called to
|
|
|
|
# register the ctest entry through the opm_add_test macro.
|
|
|
|
# Information such as the binary to call and test tolerances
|
|
|
|
# are passed from the build system to the driver script through
|
|
|
|
# command line parameters. See the opm_add_test() documentation for
|
|
|
|
# details on the parameters passed to the macro.
|
|
|
|
|
2016-07-06 04:30:10 -05:00
|
|
|
# Define some paths
|
2016-08-04 06:54:37 -05:00
|
|
|
set(BASE_RESULT_PATH ${PROJECT_BINARY_DIR}/tests/results)
|
2016-07-06 04:30:10 -05:00
|
|
|
|
2020-04-03 03:15:49 -05:00
|
|
|
###########################################################################
|
|
|
|
# TEST: runSim
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
# Input:
|
|
|
|
# - casename: basename (no extension)
|
|
|
|
#
|
|
|
|
# Details:
|
|
|
|
# - This test class simply runs a simulation.
|
|
|
|
function(add_test_runSimulator)
|
2023-07-03 02:05:45 -05:00
|
|
|
set(oneValueArgs CASENAME FILENAME SIMULATOR DIR DIR_PREFIX PROCS CONFIGURATION POST_COMMAND)
|
2020-04-03 03:15:49 -05:00
|
|
|
set(multiValueArgs TEST_ARGS)
|
|
|
|
cmake_parse_arguments(PARAM "$" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
|
|
|
|
if(NOT PARAM_DIR)
|
|
|
|
set(PARAM_DIR ${PARAM_CASENAME})
|
|
|
|
endif()
|
|
|
|
set(RESULT_PATH ${BASE_RESULT_PATH}${PARAM_DIR_PREFIX}/${PARAM_SIMULATOR}+${PARAM_CASENAME})
|
2021-08-17 06:14:49 -05:00
|
|
|
set(TEST_ARGS ${PARAM_TEST_ARGS})
|
2023-07-03 02:05:45 -05:00
|
|
|
set(DRIVER_ARGS -i ${OPM_TESTS_ROOT}/${PARAM_DIR}
|
|
|
|
-r ${RESULT_PATH}
|
|
|
|
-b ${PROJECT_BINARY_DIR}/bin
|
|
|
|
-f ${PARAM_FILENAME})
|
|
|
|
if(PARAM_PROCS)
|
|
|
|
list(APPEND DRIVER_ARGS -n ${PARAM_PROCS})
|
|
|
|
endif()
|
|
|
|
if(PARAM_POST_COMMAND)
|
|
|
|
list(APPEND DRIVER_ARGS -p "${PARAM_POST_COMMAND}")
|
|
|
|
endif()
|
2020-04-03 03:15:49 -05:00
|
|
|
opm_add_test(runSimulator/${PARAM_CASENAME} NO_COMPILE
|
|
|
|
EXE_NAME ${PARAM_SIMULATOR}
|
2023-07-03 02:05:45 -05:00
|
|
|
DRIVER_ARGS ${DRIVER_ARGS}
|
2020-04-03 03:15:49 -05:00
|
|
|
TEST_ARGS ${TEST_ARGS}
|
2023-06-29 08:20:38 -05:00
|
|
|
CONFIGURATION ${PARAM_CONFIGURATION})
|
2023-07-03 02:05:45 -05:00
|
|
|
if(PARAM_PROCS)
|
|
|
|
set_tests_properties(runSimulator/${PARAM_CASENAME} PROPERTIES PROCESSORS ${PARAM_PROCS})
|
|
|
|
endif()
|
2023-06-29 08:20:38 -05:00
|
|
|
endfunction()
|
|
|
|
|
2016-07-06 04:30:10 -05:00
|
|
|
###########################################################################
|
2016-08-04 06:54:37 -05:00
|
|
|
# TEST: compareECLFiles
|
2016-07-06 04:30:10 -05:00
|
|
|
###########################################################################
|
|
|
|
|
2016-08-04 06:54:37 -05:00
|
|
|
# Input:
|
|
|
|
# - casename: basename (no extension)
|
2016-07-06 04:30:10 -05:00
|
|
|
#
|
2017-01-23 03:42:09 -06:00
|
|
|
# Details:
|
|
|
|
# - This test class compares output from a simulation to reference files.
|
2017-10-05 03:51:20 -05:00
|
|
|
function(add_test_compareECLFiles)
|
2021-10-12 09:57:41 -05:00
|
|
|
set(oneValueArgs CASENAME FILENAME SIMULATOR ABS_TOL REL_TOL DIR DIR_PREFIX PREFIX RESTART_STEP RESTART_SCHED)
|
2017-10-05 03:51:20 -05:00
|
|
|
set(multiValueArgs TEST_ARGS)
|
|
|
|
cmake_parse_arguments(PARAM "$" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
|
|
|
|
if(NOT PARAM_DIR)
|
|
|
|
set(PARAM_DIR ${PARAM_CASENAME})
|
2017-05-04 12:00:42 -05:00
|
|
|
endif()
|
2017-10-05 03:51:20 -05:00
|
|
|
if(NOT PARAM_PREFIX)
|
|
|
|
set(PARAM_PREFIX compareECLFiles)
|
2017-05-16 04:49:40 -05:00
|
|
|
endif()
|
2017-10-05 03:51:20 -05:00
|
|
|
set(RESULT_PATH ${BASE_RESULT_PATH}${PARAM_DIR_PREFIX}/${PARAM_SIMULATOR}+${PARAM_CASENAME})
|
2021-08-17 06:14:49 -05:00
|
|
|
set(TEST_ARGS ${PARAM_TEST_ARGS})
|
2021-10-13 03:47:23 -05:00
|
|
|
set(DRIVER_ARGS -i ${OPM_TESTS_ROOT}/${PARAM_DIR}
|
|
|
|
-r ${RESULT_PATH}
|
|
|
|
-b ${PROJECT_BINARY_DIR}/bin
|
|
|
|
-f ${PARAM_FILENAME}
|
|
|
|
-a ${PARAM_ABS_TOL}
|
|
|
|
-t ${PARAM_REL_TOL}
|
|
|
|
-c ${COMPARE_ECL_COMMAND}
|
|
|
|
-d ${RST_DECK_COMMAND})
|
|
|
|
if(PARAM_RESTART_STEP)
|
|
|
|
list(APPEND DRIVER_ARGS -s ${PARAM_RESTART_STEP})
|
|
|
|
endif()
|
|
|
|
if(PARAM_RESTART_SCHED)
|
|
|
|
list(APPEND DRIVER_ARGS -h ${PARAM_RESTART_SCHED})
|
|
|
|
endif()
|
2017-10-05 03:51:20 -05:00
|
|
|
opm_add_test(${PARAM_PREFIX}_${PARAM_SIMULATOR}+${PARAM_FILENAME} NO_COMPILE
|
|
|
|
EXE_NAME ${PARAM_SIMULATOR}
|
2021-10-13 03:47:23 -05:00
|
|
|
DRIVER_ARGS ${DRIVER_ARGS}
|
2017-05-16 04:49:40 -05:00
|
|
|
TEST_ARGS ${TEST_ARGS})
|
2023-05-31 05:06:37 -05:00
|
|
|
set_tests_properties(${PARAM_PREFIX}_${PARAM_SIMULATOR}+${PARAM_FILENAME} PROPERTIES
|
|
|
|
DIRNAME ${PARAM_DIR}
|
|
|
|
FILENAME ${PARAM_FILENAME}
|
|
|
|
SIMULATOR ${PARAM_SIMULATOR}
|
|
|
|
TESTNAME ${PARAM_CASENAME})
|
2017-10-05 03:51:20 -05:00
|
|
|
endfunction()
|
2016-07-06 04:30:10 -05:00
|
|
|
|
2016-11-04 08:47:59 -05:00
|
|
|
###########################################################################
|
2017-01-23 04:15:49 -06:00
|
|
|
# TEST: add_test_compare_restarted_simulation
|
2016-11-04 08:47:59 -05:00
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
# Input:
|
|
|
|
# - casename: basename (no extension)
|
|
|
|
#
|
2017-01-23 03:42:09 -06:00
|
|
|
# Details:
|
|
|
|
# - This test class compares the output from a restarted simulation
|
|
|
|
# to that of a non-restarted simulation.
|
2017-10-05 03:51:20 -05:00
|
|
|
function(add_test_compare_restarted_simulation)
|
2021-11-27 05:47:17 -06:00
|
|
|
set(oneValueArgs CASENAME FILENAME SIMULATOR TEST_NAME ABS_TOL REL_TOL DIR RESTART_STEP)
|
2017-10-05 03:51:20 -05:00
|
|
|
set(multiValueArgs TEST_ARGS)
|
|
|
|
cmake_parse_arguments(PARAM "$" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
|
2021-06-18 14:14:19 -05:00
|
|
|
if(NOT PARAM_DIR)
|
|
|
|
set(PARAM_DIR ${PARAM_CASENAME})
|
|
|
|
endif()
|
2021-06-26 02:33:46 -05:00
|
|
|
if (PARAM_TEST_NAME)
|
|
|
|
set(TEST_NAME ${PARAM_TEST_NAME})
|
|
|
|
else()
|
|
|
|
set(TEST_NAME compareRestartedSim_${PARAM_SIMULATOR}+${PARAM_FILENAME})
|
|
|
|
endif()
|
|
|
|
|
2017-10-05 03:51:20 -05:00
|
|
|
set(RESULT_PATH ${BASE_RESULT_PATH}/restart/${PARAM_SIMULATOR}+${PARAM_CASENAME})
|
2021-06-26 02:33:46 -05:00
|
|
|
opm_add_test(${TEST_NAME} NO_COMPILE
|
2017-10-05 03:51:20 -05:00
|
|
|
EXE_NAME ${PARAM_SIMULATOR}
|
2021-10-13 03:47:23 -05:00
|
|
|
DRIVER_ARGS -i ${OPM_TESTS_ROOT}/${PARAM_DIR}
|
|
|
|
-r ${RESULT_PATH}
|
|
|
|
-b ${PROJECT_BINARY_DIR}/bin
|
|
|
|
-f ${PARAM_FILENAME}
|
|
|
|
-a ${PARAM_ABS_TOL}
|
|
|
|
-t ${PARAM_REL_TOL}
|
|
|
|
-c ${COMPARE_ECL_COMMAND}
|
2021-11-27 05:47:17 -06:00
|
|
|
-d ${RST_DECK_COMMAND}
|
|
|
|
-s ${PARAM_RESTART_STEP}
|
2020-03-09 05:19:50 -05:00
|
|
|
TEST_ARGS ${PARAM_TEST_ARGS})
|
2017-10-05 03:51:20 -05:00
|
|
|
endfunction()
|
2016-11-04 08:47:59 -05:00
|
|
|
|
2016-11-23 03:59:48 -06:00
|
|
|
###########################################################################
|
2017-01-23 04:15:49 -06:00
|
|
|
# TEST: add_test_compare_parallel_simulation
|
2016-11-23 03:59:48 -06:00
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
# Input:
|
|
|
|
# - casename: basename (no extension)
|
|
|
|
#
|
2017-01-23 03:42:09 -06:00
|
|
|
# Details:
|
|
|
|
# - This test class compares the output from a parallel simulation
|
|
|
|
# to the output from the serial instance of the same model.
|
2017-10-05 03:51:20 -05:00
|
|
|
function(add_test_compare_parallel_simulation)
|
2023-05-09 06:29:14 -05:00
|
|
|
set(oneValueArgs CASENAME FILENAME SIMULATOR ABS_TOL REL_TOL DIR MPI_PROCS)
|
2017-10-05 03:51:20 -05:00
|
|
|
set(multiValueArgs TEST_ARGS)
|
|
|
|
cmake_parse_arguments(PARAM "$" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
|
|
|
|
|
2019-12-04 05:52:00 -06:00
|
|
|
if(NOT PARAM_DIR)
|
|
|
|
set(PARAM_DIR ${PARAM_CASENAME})
|
|
|
|
endif()
|
|
|
|
|
2023-05-09 06:29:14 -05:00
|
|
|
if(PARAM_MPI_PROCS)
|
|
|
|
set(MPI_PROCS ${PARAM_MPI_PROCS})
|
|
|
|
else()
|
|
|
|
set(MPI_PROCS 4)
|
|
|
|
endif()
|
|
|
|
|
2017-10-05 03:51:20 -05:00
|
|
|
set(RESULT_PATH ${BASE_RESULT_PATH}/parallel/${PARAM_SIMULATOR}+${PARAM_CASENAME})
|
2019-12-04 05:52:00 -06:00
|
|
|
set(TEST_ARGS ${OPM_TESTS_ROOT}/${PARAM_DIR}/${PARAM_FILENAME} ${PARAM_TEST_ARGS})
|
2023-05-09 06:29:14 -05:00
|
|
|
set(DRIVER_ARGS -i ${OPM_TESTS_ROOT}/${PARAM_DIR}
|
|
|
|
-r ${RESULT_PATH}
|
|
|
|
-b ${PROJECT_BINARY_DIR}/bin
|
|
|
|
-f ${PARAM_FILENAME}
|
|
|
|
-a ${PARAM_ABS_TOL}
|
|
|
|
-t ${PARAM_REL_TOL}
|
|
|
|
-c ${COMPARE_ECL_COMMAND}
|
|
|
|
-n ${MPI_PROCS})
|
2016-11-23 03:59:48 -06:00
|
|
|
|
|
|
|
# Add test that runs flow_mpi and outputs the results to file
|
2017-10-05 03:51:20 -05:00
|
|
|
opm_add_test(compareParallelSim_${PARAM_SIMULATOR}+${PARAM_FILENAME} NO_COMPILE
|
|
|
|
EXE_NAME ${PARAM_SIMULATOR}
|
2023-05-09 06:29:14 -05:00
|
|
|
DRIVER_ARGS ${DRIVER_ARGS}
|
2017-10-05 03:51:20 -05:00
|
|
|
TEST_ARGS ${TEST_ARGS})
|
2019-08-13 04:54:19 -05:00
|
|
|
set_tests_properties(compareParallelSim_${PARAM_SIMULATOR}+${PARAM_FILENAME}
|
2023-05-09 06:29:14 -05:00
|
|
|
PROPERTIES PROCESSORS ${MPI_PROCS})
|
2017-10-05 03:51:20 -05:00
|
|
|
endfunction()
|
2016-07-06 04:30:10 -05:00
|
|
|
|
2018-01-04 06:48:43 -06:00
|
|
|
|
|
|
|
###########################################################################
|
|
|
|
# TEST: add_test_compare_parallel_restarted_simulation
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
# Input:
|
|
|
|
# - casename: basename (no extension)
|
|
|
|
#
|
|
|
|
# Details:
|
|
|
|
# - This test class compares the output from a restarted parallel simulation
|
|
|
|
# to that of a non-restarted parallel simulation.
|
|
|
|
function(add_test_compare_parallel_restarted_simulation)
|
2023-02-09 07:46:03 -06:00
|
|
|
set(oneValueArgs CASENAME FILENAME SIMULATOR ABS_TOL REL_TOL DIR MPI_PROCS RESTART_STEP TEST_NAME)
|
2018-01-04 06:48:43 -06:00
|
|
|
set(multiValueArgs TEST_ARGS)
|
|
|
|
cmake_parse_arguments(PARAM "$" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
|
2023-05-09 06:29:14 -05:00
|
|
|
|
2021-06-18 14:14:19 -05:00
|
|
|
if(NOT PARAM_DIR)
|
|
|
|
set(PARAM_DIR ${PARAM_CASENAME})
|
|
|
|
endif()
|
2023-05-09 06:29:14 -05:00
|
|
|
|
2023-02-09 07:46:03 -06:00
|
|
|
if (PARAM_TEST_NAME)
|
|
|
|
set(TEST_NAME ${PARAM_TEST_NAME})
|
|
|
|
else()
|
|
|
|
set(TEST_NAME compareParallelRestartedSim_${PARAM_SIMULATOR}+${PARAM_FILENAME})
|
|
|
|
endif()
|
2023-05-09 06:29:14 -05:00
|
|
|
|
|
|
|
if(PARAM_MPI_PROCS)
|
|
|
|
set(MPI_PROCS ${PARAM_MPI_PROCS})
|
|
|
|
else()
|
|
|
|
set(MPI_PROCS 4)
|
|
|
|
endif()
|
|
|
|
|
2018-01-16 08:50:21 -06:00
|
|
|
set(RESULT_PATH ${BASE_RESULT_PATH}/parallelRestart/${PARAM_SIMULATOR}+${PARAM_CASENAME})
|
2021-10-13 03:47:23 -05:00
|
|
|
set(DRIVER_ARGS -i ${OPM_TESTS_ROOT}/${PARAM_DIR}
|
|
|
|
-r ${RESULT_PATH}
|
|
|
|
-b ${PROJECT_BINARY_DIR}/bin
|
|
|
|
-f ${PARAM_FILENAME}
|
|
|
|
-a ${PARAM_ABS_TOL}
|
|
|
|
-t ${PARAM_REL_TOL}
|
|
|
|
-c ${COMPARE_ECL_COMMAND}
|
2021-11-27 05:47:17 -06:00
|
|
|
-s ${PARAM_RESTART_STEP}
|
2023-05-09 06:29:14 -05:00
|
|
|
-d ${RST_DECK_COMMAND}
|
|
|
|
-n ${MPI_PROCS})
|
2018-01-04 06:48:43 -06:00
|
|
|
|
2023-02-09 07:46:03 -06:00
|
|
|
opm_add_test(${TEST_NAME} NO_COMPILE
|
2018-01-04 06:48:43 -06:00
|
|
|
EXE_NAME ${PARAM_SIMULATOR}
|
2021-10-13 03:47:23 -05:00
|
|
|
DRIVER_ARGS ${DRIVER_ARGS}
|
2020-03-09 05:19:50 -05:00
|
|
|
TEST_ARGS ${PARAM_TEST_ARGS})
|
2023-05-09 06:29:14 -05:00
|
|
|
set_tests_properties(${TEST_NAME} PROPERTIES PROCESSORS ${MPI_PROCS})
|
2018-01-04 06:48:43 -06:00
|
|
|
endfunction()
|
|
|
|
|
2021-12-17 10:27:22 -06:00
|
|
|
|
|
|
|
###########################################################################
|
|
|
|
# TEST: add_test_split_comm
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
# Input:
|
|
|
|
# - casename: basename (no extension)
|
|
|
|
#
|
|
|
|
# Details:
|
|
|
|
# - This test class compares the output from a parallel simulation
|
|
|
|
# to that of a parallel simulation running with a custom communicator.
|
|
|
|
function(add_test_split_comm)
|
2023-05-09 06:29:14 -05:00
|
|
|
set(oneValueArgs CASENAME FILENAME SIMULATOR ABS_TOL REL_TOL DIR MPI_PROCS)
|
2021-12-17 10:27:22 -06:00
|
|
|
set(multiValueArgs TEST_ARGS)
|
|
|
|
cmake_parse_arguments(PARAM "$" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
|
2023-05-09 06:29:14 -05:00
|
|
|
|
2021-12-17 10:27:22 -06:00
|
|
|
if(NOT PARAM_DIR)
|
|
|
|
set(PARAM_DIR ${PARAM_CASENAME})
|
|
|
|
endif()
|
2023-05-09 06:29:14 -05:00
|
|
|
|
|
|
|
if(PARAM_MPI_PROCS)
|
|
|
|
set(MPI_PROCS ${PARAM_MPI_PROCS})
|
|
|
|
else()
|
|
|
|
set(MPI_PROCS 4)
|
|
|
|
endif()
|
|
|
|
|
2021-12-17 10:27:22 -06:00
|
|
|
set(RESULT_PATH ${BASE_RESULT_PATH}/parallelSplitComm/${PARAM_SIMULATOR}+${PARAM_CASENAME})
|
|
|
|
set(DRIVER_ARGS -i ${OPM_TESTS_ROOT}/${PARAM_DIR}
|
|
|
|
-r ${RESULT_PATH}
|
|
|
|
-b ${PROJECT_BINARY_DIR}/bin
|
|
|
|
-f ${PARAM_FILENAME}
|
|
|
|
-a ${PARAM_ABS_TOL}
|
|
|
|
-t ${PARAM_REL_TOL}
|
2023-05-09 06:29:14 -05:00
|
|
|
-c ${COMPARE_ECL_COMMAND}
|
|
|
|
-n ${MPI_PROCS})
|
2021-12-17 10:27:22 -06:00
|
|
|
|
|
|
|
opm_add_test(compareParallelSplitComm_${PARAM_SIMULATOR}+${PARAM_FILENAME} NO_COMPILE
|
|
|
|
EXE_NAME ${PARAM_SIMULATOR}
|
|
|
|
DRIVER_ARGS ${DRIVER_ARGS}
|
|
|
|
TEST_ARGS ${PARAM_TEST_ARGS})
|
|
|
|
set_tests_properties(compareParallelSplitComm_${PARAM_SIMULATOR}+${PARAM_FILENAME}
|
2023-05-09 06:29:14 -05:00
|
|
|
PROPERTIES PROCESSORS ${MPI_PROCS})
|
2021-12-17 10:27:22 -06:00
|
|
|
endfunction()
|
|
|
|
|
|
|
|
|
|
|
|
###########################################################################
|
|
|
|
|
|
|
|
|
2016-07-06 04:30:10 -05:00
|
|
|
if(NOT TARGET test-suite)
|
|
|
|
add_custom_target(test-suite)
|
|
|
|
endif()
|
|
|
|
|
2020-04-03 03:15:49 -05:00
|
|
|
# Simple execution tests
|
|
|
|
opm_set_test_driver(${PROJECT_SOURCE_DIR}/tests/run-test.sh "")
|
|
|
|
add_test_runSimulator(CASENAME norne
|
|
|
|
FILENAME NORNE_ATW2013
|
|
|
|
SIMULATOR flow
|
2023-06-30 05:21:25 -05:00
|
|
|
CONFIGURATION extra)
|
2020-04-03 03:15:49 -05:00
|
|
|
|
|
|
|
add_test_runSimulator(CASENAME norne_parallel
|
|
|
|
FILENAME NORNE_ATW2013
|
|
|
|
SIMULATOR flow
|
|
|
|
DIR norne
|
2023-06-29 08:20:38 -05:00
|
|
|
PROCS 4
|
2023-06-30 05:21:25 -05:00
|
|
|
CONFIGURATION extra)
|
2023-06-29 08:20:38 -05:00
|
|
|
|
|
|
|
# Tests that are run based on simulator results, but not necessarily direct comparison to reference results
|
2023-07-03 02:05:45 -05:00
|
|
|
add_test_runSimulator(CASENAME tuning_xxxmbe
|
2023-06-29 08:20:38 -05:00
|
|
|
FILENAME 01_TUNING_XXXMBE
|
|
|
|
SIMULATOR flow
|
|
|
|
DIR tuning
|
2023-07-03 02:05:45 -05:00
|
|
|
TEST_ARGS --output-extra-convergence-info=iterations --enable-tuning=true
|
|
|
|
POST_COMMAND $<TARGET_FILE:test_tuning_xxxMBE>)
|
2023-06-29 08:20:38 -05:00
|
|
|
|
2023-07-03 02:05:45 -05:00
|
|
|
add_test_runSimulator(CASENAME notuning_xxxmbe
|
2023-06-29 08:20:38 -05:00
|
|
|
FILENAME 01_TUNING_XXXMBE
|
|
|
|
SIMULATOR flow
|
|
|
|
DIR tuning
|
2023-07-03 02:05:45 -05:00
|
|
|
TEST_ARGS --output-extra-convergence-info=iterations --enable-tuning=false
|
|
|
|
POST_COMMAND $<TARGET_FILE:test_tuning_xxxMBE>)
|
2023-06-29 08:20:38 -05:00
|
|
|
|
2023-07-03 02:05:45 -05:00
|
|
|
set_tests_properties(runSimulator/notuning_xxxmbe PROPERTIES WILL_FAIL TRUE)
|
2020-04-03 03:15:49 -05:00
|
|
|
|
2022-10-19 06:21:06 -05:00
|
|
|
include (${CMAKE_CURRENT_SOURCE_DIR}/regressionTests.cmake)
|
|
|
|
include (${CMAKE_CURRENT_SOURCE_DIR}/restartTests.cmake)
|
2021-06-26 02:34:12 -05:00
|
|
|
|
2018-06-26 07:24:08 -05:00
|
|
|
# PORV test
|
|
|
|
opm_set_test_driver(${PROJECT_SOURCE_DIR}/tests/run-porv-acceptanceTest.sh "")
|
|
|
|
add_test_compareECLFiles(CASENAME norne
|
|
|
|
FILENAME NORNE_ATW2013
|
|
|
|
SIMULATOR flow
|
|
|
|
ABS_TOL 1e-5
|
|
|
|
REL_TOL 1e-8
|
|
|
|
PREFIX comparePORV
|
|
|
|
DIR_PREFIX /porv)
|
|
|
|
|
2016-11-22 06:26:46 -06:00
|
|
|
# Init tests
|
|
|
|
opm_set_test_driver(${PROJECT_SOURCE_DIR}/tests/run-init-regressionTest.sh "")
|
|
|
|
|
2018-11-14 07:51:39 -06:00
|
|
|
add_test_compareECLFiles(CASENAME norne
|
|
|
|
FILENAME NORNE_ATW2013
|
|
|
|
SIMULATOR flow
|
|
|
|
ABS_TOL ${abs_tol}
|
|
|
|
REL_TOL ${rel_tol}
|
|
|
|
PREFIX compareECLInitFiles
|
|
|
|
DIR_PREFIX /init)
|
2016-11-22 06:26:46 -06:00
|
|
|
|
2021-04-13 15:10:40 -05:00
|
|
|
# This is not a proper regression test; the test will load a norne case prepared
|
|
|
|
# for restart and run one single timestep - of length one day. The results are not
|
|
|
|
# verified in any way.
|
|
|
|
add_test(NAME NORNE_RESTART
|
|
|
|
COMMAND flow --output-dir=${BASE_RESULT_PATH}/norne-restart ${OPM_TESTS_ROOT}/norne/NORNE_ATW2013_RESTART.DATA)
|
|
|
|
|
2018-01-17 09:19:04 -06:00
|
|
|
|
2022-10-19 06:55:57 -05:00
|
|
|
if(MPI_FOUND)
|
2022-10-20 06:50:39 -05:00
|
|
|
include (${CMAKE_CURRENT_SOURCE_DIR}/parallelRestartTests.cmake)
|
|
|
|
|
|
|
|
# Single test to verify that we treat custom communicators correctly.
|
2021-12-17 10:27:22 -06:00
|
|
|
opm_set_test_driver(${PROJECT_SOURCE_DIR}/tests/run-split-comm-test.sh "")
|
|
|
|
add_test_split_comm(CASENAME spe1
|
|
|
|
FILENAME SPE1CASE2
|
|
|
|
SIMULATOR flow
|
|
|
|
ABS_TOL 0.0
|
|
|
|
REL_TOL 0.0)
|
|
|
|
|
2022-10-20 06:50:39 -05:00
|
|
|
include (${CMAKE_CURRENT_SOURCE_DIR}/parallelTests.cmake)
|
|
|
|
endif()
|
2022-10-19 06:55:57 -05:00
|
|
|
|
2021-08-18 06:46:17 -05:00
|
|
|
|
|
|
|
if(OPM_TESTS_ROOT)
|
|
|
|
add_custom_target(update_data
|
|
|
|
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR} --target check --parallel || exit 0
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E env "REASON=Local\ data\ update" ${PROJECT_SOURCE_DIR}/tests/update_reference_data.sh ${OPM_TESTS_ROOT} ${PROJECT_BINARY_DIR}
|
|
|
|
COMMENT "Updating reference data")
|
|
|
|
endif()
|