mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-07-07 04:53:03 -05:00
multiple restart tests
This commit is contained in:
parent
51d9b7ee11
commit
3274281c2d
|
@ -1024,6 +1024,14 @@ add_test_compareECLFiles(CASENAME 0b_rocktab_model6
|
|||
REL_TOL ${rel_tol}
|
||||
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
|
||||
opm_set_test_driver(${PROJECT_SOURCE_DIR}/tests/run-restart-regressionTest.sh "")
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
RESTART_STEP=0
|
||||
RESTART_STEP=""
|
||||
OPTIND=1
|
||||
while getopts "i:r:b:f:a:t:c:d:s:e:h:" OPT
|
||||
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}
|
||||
fi
|
||||
|
||||
if test $RESTART_STEP -ne 0
|
||||
then
|
||||
echo "=== Executing restart run ==="
|
||||
RSTEPS=(${RESTART_STEP//,/ })
|
||||
|
||||
for STEP in "${RSTEPS[@]}"
|
||||
do
|
||||
echo "=== Executing restart run from step: ${STEP} ==="
|
||||
mkdir -p ${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
|
||||
if test -n "$RESTART_SCHED"
|
||||
then
|
||||
sched_rst="--sched-restart=${RESTART_SCHED}"
|
||||
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
|
||||
|
||||
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 ]
|
||||
then
|
||||
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
|
||||
done
|
||||
|
||||
exit $ecode
|
||||
|
|
|
@ -58,6 +58,7 @@ declare -A tests
|
|||
# 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
|
||||
# be the basename of the .DATA file used for the simulation.
|
||||
|
||||
tests[spe1]="flow spe1 SPE1CASE1"
|
||||
tests[spe12]="flow spe1 SPE1CASE2"
|
||||
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[0a_aquct_model6]="flow model6 0A_AQUCT_MODEL6"
|
||||
tests[0b_rocktab_model6]="flow model6 0B_ROCKTAB_MODEL6"
|
||||
tests[base_wt_tracer]="flow tracer BASE_WT_TRACER"
|
||||
|
||||
changed_tests=""
|
||||
|
||||
|
@ -198,12 +200,20 @@ do
|
|||
|
||||
if [ -d $configuration/build-opm-simulators/tests/results/$binary+$test_name/restart ]
|
||||
then
|
||||
copyToReferenceDir \
|
||||
$BUILD_DIR/tests/results/$binary+$test_name/restart/ \
|
||||
$OPM_TESTS_ROOT/$dirname/opm-simulation-reference/$binary/restart \
|
||||
${casename}_RESTART \
|
||||
EGRID INIT RFT SMSPEC UNRST UNSMRY
|
||||
test $? -eq 0 && changed_tests="$changed_tests $test_name(restart)"
|
||||
|
||||
RSTEPS=`ls -1 $BUILD_DIR/tests/results/$binary+$test_name/restart/*.UNRST | sed -e 's/.*RESTART_*//' | sed 's/[.].*//' `
|
||||
result=0
|
||||
for RSTEP in $RSTEPS
|
||||
do
|
||||
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
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue
Block a user