Make sure the restart files used when testing are OPM style

This commit is contained in:
Joakim Hove 2018-09-12 19:55:59 +02:00
parent 0d86d670b5
commit e6be0f5ca6
6 changed files with 17 additions and 14 deletions

View File

@ -372,6 +372,9 @@ namespace Opm
// Override output directory if user specified.
ioConfig.setOutputDir(output_dir_);
bool opm_rst_file = param_.getDefault("enable-opm-rst-file", false);
ioConfig.setEclCompatibleRST(!opm_rst_file);
// Write parameters used for later reference. (only if rank is zero)
if (output_to_files_) {
// Create output directory if needed.

View File

@ -21,9 +21,9 @@ rm -Rf ${RESULT_PATH}
mkdir -p ${RESULT_PATH}
cd ${RESULT_PATH}
if test "${EXE_NAME}" = "flow"; then
${BINPATH}/${EXE_NAME} ${TEST_ARGS} --enable-dry-run=true --output-dir=${RESULT_PATH}
${BINPATH}/${EXE_NAME} ${TEST_ARGS} --enable-opm-rst-file=true --enable-dry-run=true --output-dir=${RESULT_PATH}
else
${BINPATH}/${EXE_NAME} ${TEST_ARGS} nosim=true output_dir=${RESULT_PATH}
${BINPATH}/${EXE_NAME} ${TEST_ARGS} enable-opm-rst-file=true nosim=true output_dir=${RESULT_PATH}
fi
cd ..

View File

@ -19,18 +19,18 @@ rm -Rf ${RESULT_PATH}
mkdir -p ${RESULT_PATH}
cd ${RESULT_PATH}
if test "${EXE_NAME}" = "flow"; then
${BINPATH}/${EXE_NAME} ${TEST_ARGS}.DATA --linear-solver-reduction=1e-7 --tolerance-cnv=5e-6 --tolerance-mb=1e-8 --output-dir=${RESULT_PATH}
${BINPATH}/${EXE_NAME} ${TEST_ARGS}.DATA --enable-opm-rst-file=true --linear-solver-reduction=1e-7 --tolerance-cnv=5e-6 --tolerance-mb=1e-8 --output-dir=${RESULT_PATH}
else
${BINPATH}/${EXE_NAME} ${TEST_ARGS}.DATA linear_solver_reduction=1e-7 tolerance_cnv=5e-6 tolerance_mb=1e-8 output_dir=${RESULT_PATH}
${BINPATH}/${EXE_NAME} ${TEST_ARGS}.DATA enable-opm-rst-file=true linear_solver_reduction=1e-7 tolerance_cnv=5e-6 tolerance_mb=1e-8 output_dir=${RESULT_PATH}
fi
test $? -eq 0 || exit 1
mkdir mpi
cd mpi
if test "${EXE_NAME}" = "flow"; then
mpirun -np 4 ${BINPATH}/${EXE_NAME} ${TEST_ARGS}.DATA --linear-solver-reduction=1e-7 --tolerance-cnv=5e-6 --tolerance-mb=1e-8 --output-dir=${RESULT_PATH}/mpi
mpirun -np 4 ${BINPATH}/${EXE_NAME} ${TEST_ARGS}.DATA --enable-opm-rst-file=true --linear-solver-reduction=1e-7 --tolerance-cnv=5e-6 --tolerance-mb=1e-8 --output-dir=${RESULT_PATH}/mpi
else
mpirun -np 4 ${BINPATH}/${EXE_NAME} ${TEST_ARGS}.DATA linear_solver_reduction=1e-7 tolerance_cnv=5e-6 tolerance_mb=1e-8 output_dir=${RESULT_PATH}/mpi
mpirun -np 4 ${BINPATH}/${EXE_NAME} ${TEST_ARGS}.DATA enable-opm-rst-file=true linear_solver_reduction=1e-7 tolerance_cnv=5e-6 tolerance_mb=1e-8 output_dir=${RESULT_PATH}/mpi
fi
test $? -eq 0 || exit 1
cd ..

View File

@ -21,9 +21,9 @@ rm -Rf ${RESULT_PATH}
mkdir -p ${RESULT_PATH}
cd ${RESULT_PATH}
if test "${EXE_NAME}" = "flow"; then
${BINPATH}/${EXE_NAME} ${TEST_ARGS} --enable-dry-run=true --output-dir=${RESULT_PATH}
${BINPATH}/${EXE_NAME} ${TEST_ARGS} --enable-opm-rst-file=true --enable-dry-run=true --output-dir=${RESULT_PATH}
else
${BINPATH}/${EXE_NAME} ${TEST_ARGS} nosim=true output_dir=${RESULT_PATH}
${BINPATH}/${EXE_NAME} ${TEST_ARGS} enable-opm-rst-file=true nosim=true output_dir=${RESULT_PATH}
fi
cd ..

View File

@ -17,9 +17,9 @@ TEST_ARGS="$@"
mkdir -p ${RESULT_PATH}
cd ${RESULT_PATH}
if test "${EXE_NAME}" = "flow"; then
${BINPATH}/${EXE_NAME} ${TEST_ARGS} --output-dir=${RESULT_PATH}
${BINPATH}/${EXE_NAME} ${TEST_ARGS} --enable-opm-rst-file=true --output-dir=${RESULT_PATH}
else
${BINPATH}/${EXE_NAME} ${TEST_ARGS} output_dir=${RESULT_PATH}
${BINPATH}/${EXE_NAME} ${TEST_ARGS} enable-opm-rst-file=true output_dir=${RESULT_PATH}
fi
test $? -eq 0 || exit 1
cd ..

View File

@ -29,9 +29,9 @@ else
CMD_PREFIX=""
fi
if test "${EXE_NAME}" = "flow"; then
${CMD_PREFIX} ${BINPATH}/${EXE_NAME} ${TEST_ARGS}.DATA --enable-adaptive-time-stepping=false --output-dir=${RESULT_PATH}
${CMD_PREFIX} ${BINPATH}/${EXE_NAME} ${TEST_ARGS}.DATA --enable-adaptive-time-stepping=false --enable-opm-rst-file=true --output-dir=${RESULT_PATH}
else
${CMD_PREFIX} ${BINPATH}/${EXE_NAME} ${TEST_ARGS}.DATA timestep.adaptive=false output_dir=${RESULT_PATH}
${CMD_PREFIX} ${BINPATH}/${EXE_NAME} ${TEST_ARGS}.DATA enable-opm-rst-file=true timestep.adaptive=false output_dir=${RESULT_PATH}
fi
test $? -eq 0 || exit 1
@ -39,9 +39,9 @@ test $? -eq 0 || exit 1
${OPM_PACK_COMMAND} -o ${BASE_NAME} ${TEST_ARGS}_RESTART.DATA
if test "${EXE_NAME}" = "flow"; then
${CMD_PREFIX} ${BINPATH}/${EXE_NAME} ${BASE_NAME} --enable-adaptive-time-stepping=false --output-dir=${RESULT_PATH}
${CMD_PREFIX} ${BINPATH}/${EXE_NAME} ${BASE_NAME} --enable-adaptive-time-stepping=false --enable-opm-rst-file=true --output-dir=${RESULT_PATH}
else
${CMD_PREFIX} ${BINPATH}/${EXE_NAME} ${BASE_NAME} timestep.adaptive=false output_dir=${RESULT_PATH}
${CMD_PREFIX} ${BINPATH}/${EXE_NAME} ${BASE_NAME} enable-opm-rst-file=true timestep.adaptive=false output_dir=${RESULT_PATH}
fi
test $? -eq 0 || exit 1