mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Remove option of comparing only the SMRY file to run-parallel-regressionTest.sh via the flag -s, i.e. revert commit debb7cb036
This commit is contained in:
parent
b748bb8c8a
commit
1b094fd65b
@ -194,7 +194,7 @@ endfunction()
|
||||
# - This test class compares the output from a parallel simulation
|
||||
# to the output from the serial instance of the same model.
|
||||
function(add_test_compare_parallel_simulation)
|
||||
set(oneValueArgs CASENAME FILENAME SIMULATOR ABS_TOL REL_TOL DIR MPI_PROCS ONLY_SMRY)
|
||||
set(oneValueArgs CASENAME FILENAME SIMULATOR ABS_TOL REL_TOL DIR MPI_PROCS)
|
||||
set(multiValueArgs TEST_ARGS)
|
||||
cmake_parse_arguments(PARAM "$" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
|
||||
|
||||
@ -211,21 +211,7 @@ function(add_test_compare_parallel_simulation)
|
||||
set(RESULT_PATH ${BASE_RESULT_PATH}/parallel/${PARAM_SIMULATOR}+${PARAM_CASENAME})
|
||||
set(TEST_ARGS ${OPM_TESTS_ROOT}/${PARAM_DIR}/${PARAM_FILENAME} ${PARAM_TEST_ARGS})
|
||||
|
||||
# Handle ONLY_SMRY flag (defaults to 0 if not provided)
|
||||
if(PARAM_ONLY_SMRY)
|
||||
if(${PARAM_ONLY_SMRY} EQUAL 1)
|
||||
set(DRIVER_ARGS -s)
|
||||
elseif(${PARAM_ONLY_SMRY} EQUAL 0)
|
||||
set(DRIVER_ARGS "")
|
||||
else()
|
||||
message(FATAL_ERROR "ONLY_SMRY must be either 0 or 1.")
|
||||
endif()
|
||||
else()
|
||||
set(DRIVER_ARGS "")
|
||||
endif()
|
||||
|
||||
set(DRIVER_ARGS ${DRIVER_ARGS}
|
||||
-i ${OPM_TESTS_ROOT}/${PARAM_DIR}
|
||||
set(DRIVER_ARGS -i ${OPM_TESTS_ROOT}/${PARAM_DIR}
|
||||
-r ${RESULT_PATH}
|
||||
-b ${PROJECT_BINARY_DIR}/bin
|
||||
-f ${PARAM_FILENAME}
|
||||
|
@ -18,15 +18,13 @@ then
|
||||
echo -e "\t\t -e <filename> Simulator binary to use"
|
||||
echo -e "\tOptional options:"
|
||||
echo -e "\t\t -n <procs> Number of MPI processes to use"
|
||||
echo -e "\t\t -s If given, compare only the SMRY file and skip comparison of the UNRST file."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
MPI_PROCS=4
|
||||
OPTIND=1
|
||||
ONLY_SUMMARY=false
|
||||
|
||||
while getopts "i:r:b:f:a:t:c:e:n:s" OPT
|
||||
while getopts "i:r:b:f:a:t:c:e:n:" OPT
|
||||
do
|
||||
case "${OPT}" in
|
||||
i) INPUT_DATA_PATH=${OPTARG} ;;
|
||||
@ -38,7 +36,6 @@ do
|
||||
c) COMPARE_ECL_COMMAND=${OPTARG} ;;
|
||||
e) EXE_NAME=${OPTARG} ;;
|
||||
n) MPI_PROCS=${OPTARG} ;;
|
||||
s) ONLY_SUMMARY=true ;;
|
||||
esac
|
||||
done
|
||||
shift $(($OPTIND-1))
|
||||
@ -65,16 +62,12 @@ then
|
||||
${COMPARE_ECL_COMMAND} -t SMRY -a -R ${RESULT_PATH}/${FILENAME} ${RESULT_PATH}/mpi/${FILENAME} ${ABS_TOL} ${REL_TOL}
|
||||
fi
|
||||
|
||||
if [ "$ONLY_SUMMARY" = false ]; then
|
||||
echo "=== Executing comparison for restart file ==="
|
||||
${COMPARE_ECL_COMMAND} -l -t UNRST ${RESULT_PATH}/${FILENAME} ${RESULT_PATH}/mpi/${FILENAME} ${ABS_TOL} ${REL_TOL}
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
ecode=1
|
||||
${COMPARE_ECL_COMMAND} -a -l -t UNRST ${RESULT_PATH}/${FILENAME} ${RESULT_PATH}/mpi/${FILENAME} ${ABS_TOL} ${REL_TOL}
|
||||
fi
|
||||
else
|
||||
echo "=== Skipping comparison for restart file due to -s flag ==="
|
||||
echo "=== Executing comparison for restart file ==="
|
||||
${COMPARE_ECL_COMMAND} -l -t UNRST ${RESULT_PATH}/${FILENAME} ${RESULT_PATH}/mpi/${FILENAME} ${ABS_TOL} ${REL_TOL}
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
ecode=1
|
||||
${COMPARE_ECL_COMMAND} -a -l -t UNRST ${RESULT_PATH}/${FILENAME} ${RESULT_PATH}/mpi/${FILENAME} ${ABS_TOL} ${REL_TOL}
|
||||
fi
|
||||
|
||||
exit $ecode
|
||||
|
Loading…
Reference in New Issue
Block a user