mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
multiple restart tests
This commit is contained in:
@@ -1024,6 +1024,14 @@ add_test_compareECLFiles(CASENAME 0b_rocktab_model6
|
|||||||
REL_TOL ${rel_tol}
|
REL_TOL ${rel_tol}
|
||||||
DIR model6)
|
DIR model6)
|
||||||
|
|
||||||
|
add_test_compareECLFiles(CASENAME base_wt_tracer
|
||||||
|
FILENAME BASE_WT_TRACER
|
||||||
|
SIMULATOR flow
|
||||||
|
ABS_TOL ${abs_tol}
|
||||||
|
REL_TOL ${rel_tol}
|
||||||
|
DIR tracer
|
||||||
|
RESTART_STEP 1,3,7)
|
||||||
|
|
||||||
# Restart tests
|
# Restart tests
|
||||||
opm_set_test_driver(${PROJECT_SOURCE_DIR}/tests/run-restart-regressionTest.sh "")
|
opm_set_test_driver(${PROJECT_SOURCE_DIR}/tests/run-restart-regressionTest.sh "")
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
RESTART_STEP=0
|
RESTART_STEP=""
|
||||||
OPTIND=1
|
OPTIND=1
|
||||||
while getopts "i:r:b:f:a:t:c:d:s:e:h:" OPT
|
while getopts "i:r:b:f:a:t:c:d:s:e:h:" OPT
|
||||||
do
|
do
|
||||||
@@ -66,27 +66,29 @@ then
|
|||||||
${COMPARE_ECL_COMMAND} ${ignore_extra_kw} -a ${INPUT_DATA_PATH}/opm-simulation-reference/${EXE_NAME}/${FILENAME} ${RESULT_PATH}/${FILENAME} ${ABS_TOL} ${REL_TOL}
|
${COMPARE_ECL_COMMAND} ${ignore_extra_kw} -a ${INPUT_DATA_PATH}/opm-simulation-reference/${EXE_NAME}/${FILENAME} ${RESULT_PATH}/${FILENAME} ${ABS_TOL} ${REL_TOL}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test $RESTART_STEP -ne 0
|
RSTEPS=(${RESTART_STEP//,/ })
|
||||||
then
|
|
||||||
echo "=== Executing restart run ==="
|
for STEP in "${RSTEPS[@]}"
|
||||||
|
do
|
||||||
|
echo "=== Executing restart run from step: ${STEP} ==="
|
||||||
mkdir -p ${RESULT_PATH}/restart
|
mkdir -p ${RESULT_PATH}/restart
|
||||||
cp -f ${RESULT_PATH}/${FILENAME}.UNRST ${RESULT_PATH}/restart
|
cp -f ${RESULT_PATH}/${FILENAME}.UNRST ${RESULT_PATH}/restart
|
||||||
${RST_DECK_COMMAND} ${INPUT_DATA_PATH}/${FILENAME}.DATA ${FILENAME}:${RESTART_STEP} -m inline -s > ${RESULT_PATH}/restart/${FILENAME}_RESTART.DATA
|
${RST_DECK_COMMAND} ${INPUT_DATA_PATH}/${FILENAME}.DATA ${FILENAME}:${STEP} -m inline -s > ${RESULT_PATH}/restart/${FILENAME}_RESTART_${STEP}.DATA
|
||||||
cd ${RESULT_PATH}/restart
|
cd ${RESULT_PATH}/restart
|
||||||
if test -n "$RESTART_SCHED"
|
if test -n "$RESTART_SCHED"
|
||||||
then
|
then
|
||||||
sched_rst="--sched-restart=${RESTART_SCHED}"
|
sched_rst="--sched-restart=${RESTART_SCHED}"
|
||||||
fi
|
fi
|
||||||
${BINPATH}/${EXE_NAME} ${TEST_ARGS} ${sched_rst} --output-dir=${RESULT_PATH}/restart ${FILENAME}_RESTART
|
${BINPATH}/${EXE_NAME} ${TEST_ARGS} ${sched_rst} --output-dir=${RESULT_PATH}/restart ${FILENAME}_RESTART_${STEP}
|
||||||
test $? -eq 0 || exit 1
|
test $? -eq 0 || exit 1
|
||||||
|
|
||||||
echo "=== Executing comparison for EGRID, INIT, UNRST and RFT files for restarted run ==="
|
echo "=== Executing comparison for EGRID, INIT, UNRST and RFT files for restarted run ==="
|
||||||
${COMPARE_ECL_COMMAND} ${ignore_extra_kw} ${INPUT_DATA_PATH}/opm-simulation-reference/${EXE_NAME}/restart/${FILENAME}_RESTART ${RESULT_PATH}/restart/${FILENAME}_RESTART ${ABS_TOL} ${REL_TOL}
|
${COMPARE_ECL_COMMAND} ${ignore_extra_kw} ${INPUT_DATA_PATH}/opm-simulation-reference/${EXE_NAME}/restart/${FILENAME}_RESTART_${STEP} ${RESULT_PATH}/restart/${FILENAME}_RESTART_${STEP} ${ABS_TOL} ${REL_TOL}
|
||||||
if [ $? -ne 0 ]
|
if [ $? -ne 0 ]
|
||||||
then
|
then
|
||||||
ecode=1
|
ecode=1
|
||||||
${COMPARE_ECL_COMMAND} ${ignore_extra_kw} -a ${INPUT_DATA_PATH}/opm-simulation-reference/${EXE_NAME}/restart/${FILENAME}_RESTART ${RESULT_PATH}/restart/${FILENAME}_RESTART ${ABS_TOL} ${REL_TOL}
|
${COMPARE_ECL_COMMAND} ${ignore_extra_kw} -a ${INPUT_DATA_PATH}/opm-simulation-reference/${EXE_NAME}/restart/${FILENAME}_RESTART_${STEP} ${RESULT_PATH}/restart/${FILENAME}_RESTART_${STEP} ${ABS_TOL} ${REL_TOL}
|
||||||
fi
|
fi
|
||||||
fi
|
done
|
||||||
|
|
||||||
exit $ecode
|
exit $ecode
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ declare -A tests
|
|||||||
# The key in the dictionary must agree with the name given to the test when
|
# The key in the dictionary must agree with the name given to the test when
|
||||||
# registering it with cmake in compareEclFiles.cmake. The SIMULATION_CASE should
|
# registering it with cmake in compareEclFiles.cmake. The SIMULATION_CASE should
|
||||||
# be the basename of the .DATA file used for the simulation.
|
# be the basename of the .DATA file used for the simulation.
|
||||||
|
|
||||||
tests[spe1]="flow spe1 SPE1CASE1"
|
tests[spe1]="flow spe1 SPE1CASE1"
|
||||||
tests[spe12]="flow spe1 SPE1CASE2"
|
tests[spe12]="flow spe1 SPE1CASE2"
|
||||||
tests[spe1_2p]="flow spe1 SPE1CASE2_2P"
|
tests[spe1_2p]="flow spe1 SPE1CASE2_2P"
|
||||||
@@ -171,6 +172,7 @@ tests[micp]="flow micp MICP"
|
|||||||
tests[0_base_model6]="flow model6 0_BASE_MODEL6"
|
tests[0_base_model6]="flow model6 0_BASE_MODEL6"
|
||||||
tests[0a_aquct_model6]="flow model6 0A_AQUCT_MODEL6"
|
tests[0a_aquct_model6]="flow model6 0A_AQUCT_MODEL6"
|
||||||
tests[0b_rocktab_model6]="flow model6 0B_ROCKTAB_MODEL6"
|
tests[0b_rocktab_model6]="flow model6 0B_ROCKTAB_MODEL6"
|
||||||
|
tests[base_wt_tracer]="flow tracer BASE_WT_TRACER"
|
||||||
|
|
||||||
changed_tests=""
|
changed_tests=""
|
||||||
|
|
||||||
@@ -198,12 +200,20 @@ do
|
|||||||
|
|
||||||
if [ -d $configuration/build-opm-simulators/tests/results/$binary+$test_name/restart ]
|
if [ -d $configuration/build-opm-simulators/tests/results/$binary+$test_name/restart ]
|
||||||
then
|
then
|
||||||
copyToReferenceDir \
|
|
||||||
$BUILD_DIR/tests/results/$binary+$test_name/restart/ \
|
RSTEPS=`ls -1 $BUILD_DIR/tests/results/$binary+$test_name/restart/*.UNRST | sed -e 's/.*RESTART_*//' | sed 's/[.].*//' `
|
||||||
$OPM_TESTS_ROOT/$dirname/opm-simulation-reference/$binary/restart \
|
result=0
|
||||||
${casename}_RESTART \
|
for RSTEP in $RSTEPS
|
||||||
EGRID INIT RFT SMSPEC UNRST UNSMRY
|
do
|
||||||
test $? -eq 0 && changed_tests="$changed_tests $test_name(restart)"
|
copyToReferenceDir \
|
||||||
|
$BUILD_DIR/tests/results/$binary+$test_name/restart/ \
|
||||||
|
$OPM_TESTS_ROOT/$dirname/opm-simulation-reference/$binary/restart \
|
||||||
|
${casename}_RESTART_${RSTEP} \
|
||||||
|
EGRID INIT RFT SMSPEC UNRST UNSMRY
|
||||||
|
res=$?
|
||||||
|
test $result -eq 0 || result=$res
|
||||||
|
done
|
||||||
|
test $result -eq 0 && changed_tests="$changed_tests $test_name(restart)"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user