mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-30 11:06:55 -06:00
Merge pull request #2660 from joakim-hove/restart-testing-enable-adaptive-timestepping
Changes in running of restart regression tests
This commit is contained in:
commit
c977a28cfa
@ -96,7 +96,6 @@ function(add_test_compare_restarted_simulation)
|
||||
${PARAM_ABS_TOL} ${PARAM_REL_TOL}
|
||||
${COMPARE_ECL_COMMAND}
|
||||
${OPM_PACK_COMMAND}
|
||||
0
|
||||
TEST_ARGS ${PARAM_TEST_ARGS})
|
||||
endfunction()
|
||||
|
||||
@ -161,7 +160,6 @@ function(add_test_compare_parallel_restarted_simulation)
|
||||
${PARAM_ABS_TOL} ${PARAM_REL_TOL}
|
||||
${COMPARE_ECL_COMMAND}
|
||||
${OPM_PACK_COMMAND}
|
||||
1
|
||||
TEST_ARGS ${PARAM_TEST_ARGS})
|
||||
set_tests_properties(compareParallelRestartedSim_${PARAM_SIMULATOR}+${PARAM_FILENAME}
|
||||
PROPERTIES RUN_SERIAL 1)
|
||||
@ -749,7 +747,7 @@ add_test_compare_restarted_simulation(CASENAME msw_3d_hfa
|
||||
SIMULATOR flow
|
||||
ABS_TOL ${abs_tol_restart}
|
||||
REL_TOL ${rel_tol_restart}
|
||||
TEST_ARGS --sched-restart=false)
|
||||
TEST_ARGS --enable-adaptive-time-stepping=false --sched-restart=false)
|
||||
|
||||
# PORV test
|
||||
opm_set_test_driver(${PROJECT_SOURCE_DIR}/tests/run-porv-acceptanceTest.sh "")
|
||||
@ -774,7 +772,7 @@ add_test_compareECLFiles(CASENAME norne
|
||||
|
||||
# Parallel tests
|
||||
if(MPI_FOUND)
|
||||
opm_set_test_driver(${PROJECT_SOURCE_DIR}/tests/run-restart-regressionTest.sh "")
|
||||
opm_set_test_driver(${PROJECT_SOURCE_DIR}/tests/run-parallel-restart-regressionTest.sh "")
|
||||
add_test_compare_parallel_restarted_simulation(CASENAME spe1
|
||||
FILENAME SPE1CASE2_ACTNUM
|
||||
SIMULATOR flow
|
||||
|
50
tests/run-parallel-restart-regressionTest.sh
Executable file
50
tests/run-parallel-restart-regressionTest.sh
Executable file
@ -0,0 +1,50 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This runs a simulator from start to end, then a restarted
|
||||
# run of the simulator, before comparing the output from the two runs.
|
||||
# This is meant to track regressions in the restart support.
|
||||
|
||||
INPUT_DATA_PATH="$1"
|
||||
RESULT_PATH="$2"
|
||||
BINPATH="$3"
|
||||
FILENAME="$4"
|
||||
ABS_TOL="$5"
|
||||
REL_TOL="$6"
|
||||
COMPARE_ECL_COMMAND="$7"
|
||||
OPM_PACK_COMMAND="$8"
|
||||
EXE_NAME="${9}"
|
||||
shift 9
|
||||
TEST_ARGS="$@"
|
||||
|
||||
BASE_NAME=${FILENAME}_RESTART.DATA
|
||||
|
||||
rm -Rf ${RESULT_PATH}
|
||||
mkdir -p ${RESULT_PATH}
|
||||
cd ${RESULT_PATH}
|
||||
mpirun -np 4 ${BINPATH}/${EXE_NAME} ${INPUT_DATA_PATH}/${FILENAME} --enable-adaptive-time-stepping=false --output-dir=${RESULT_PATH} ${TEST_ARGS}
|
||||
|
||||
test $? -eq 0 || exit 1
|
||||
|
||||
${OPM_PACK_COMMAND} -o ${BASE_NAME} ${INPUT_DATA_PATH}/${FILENAME}_RESTART.DATA
|
||||
|
||||
mpirun -np 4 ${BINPATH}/${EXE_NAME} ${BASE_NAME} --enable-adaptive-time-stepping=false --output-dir=${RESULT_PATH} ${TEST_ARGS}
|
||||
test $? -eq 0 || exit 1
|
||||
|
||||
ecode=0
|
||||
echo "=== Executing comparison for summary file ==="
|
||||
${COMPARE_ECL_COMMAND} -R -t SMRY ${RESULT_PATH}/${FILENAME} ${RESULT_PATH}/${FILENAME}_RESTART ${ABS_TOL} ${REL_TOL}
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
ecode=1
|
||||
${COMPARE_ECL_COMMAND} -a -R -t SMRY ${RESULT_PATH}/${FILENAME} ${RESULT_PATH}/${FILENAME}_RESTART ${ABS_TOL} ${REL_TOL}
|
||||
fi
|
||||
|
||||
echo "=== Executing comparison for restart file ==="
|
||||
${COMPARE_ECL_COMMAND} -l -t UNRST ${RESULT_PATH}/${FILENAME} ${RESULT_PATH}/${FILENAME}_RESTART ${ABS_TOL} ${REL_TOL}
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
ecode=1
|
||||
${COMPARE_ECL_COMMAND} -a -l -t UNRST ${RESULT_PATH}/${FILENAME} ${RESULT_PATH}/${FILENAME}_RESTART ${ABS_TOL} ${REL_TOL}
|
||||
fi
|
||||
|
||||
exit $ecode
|
@ -12,9 +12,8 @@ ABS_TOL="$5"
|
||||
REL_TOL="$6"
|
||||
COMPARE_ECL_COMMAND="$7"
|
||||
OPM_PACK_COMMAND="$8"
|
||||
PARALLEL="${9}"
|
||||
EXE_NAME="${10}"
|
||||
shift 10
|
||||
EXE_NAME="${9}"
|
||||
shift 9
|
||||
TEST_ARGS="$@"
|
||||
|
||||
BASE_NAME=${FILENAME}_RESTART.DATA
|
||||
@ -22,19 +21,13 @@ BASE_NAME=${FILENAME}_RESTART.DATA
|
||||
rm -Rf ${RESULT_PATH}
|
||||
mkdir -p ${RESULT_PATH}
|
||||
cd ${RESULT_PATH}
|
||||
if test $PARALLEL -eq 1
|
||||
then
|
||||
CMD_PREFIX="mpirun -np 4 "
|
||||
else
|
||||
CMD_PREFIX=""
|
||||
fi
|
||||
${CMD_PREFIX} ${BINPATH}/${EXE_NAME} ${INPUT_DATA_PATH}/${FILENAME} --enable-adaptive-time-stepping=false --output-dir=${RESULT_PATH} ${TEST_ARGS}
|
||||
${BINPATH}/${EXE_NAME} ${INPUT_DATA_PATH}/${FILENAME} --output-dir=${RESULT_PATH} ${TEST_ARGS}
|
||||
|
||||
test $? -eq 0 || exit 1
|
||||
|
||||
${OPM_PACK_COMMAND} -o ${BASE_NAME} ${INPUT_DATA_PATH}/${FILENAME}_RESTART.DATA
|
||||
|
||||
${CMD_PREFIX} ${BINPATH}/${EXE_NAME} ${BASE_NAME} --enable-adaptive-time-stepping=false --output-dir=${RESULT_PATH} ${TEST_ARGS}
|
||||
${BINPATH}/${EXE_NAME} ${BASE_NAME} --output-dir=${RESULT_PATH} ${TEST_ARGS}
|
||||
test $? -eq 0 || exit 1
|
||||
|
||||
ecode=0
|
||||
|
Loading…
Reference in New Issue
Block a user