diff --git a/tests/analyze_ecl_failure.sh b/tests/analyze_ecl_failure.sh deleted file mode 100755 index 499590d10..000000000 --- a/tests/analyze_ecl_failure.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/bash -# This will perform some analysis on a failed restart/init -# comparisons in a regression tests. - -# Analyze restart/init test failure. -# - Print failed keywords -# - Print maximum deviations for each keyword -analyzeEclFailure() { -kwds=`cat $KWTMPFILE | tr '\n' ' ' | sed -e 's/.*Common keywords for the two cases:\(.*\)Uncommon.*/\1/'` -TMPFILE=$(mktemp) -allok=1 -for kwd in $kwds -do - ${COMPARE_ECL_COMMAND} -n -l -k ${kwd} ${FILE1} ${FILE2} ${ABS_TOL} ${REL_TOL} &> ${TMPFILE} - nfailure=`cat ${TMPFILE} | grep "Deviations exceed tolerances" | wc -l` - if [ ${nfailure} -ne 0 ] - then - allok=0 - echo "Failure for keyword ${kwd}" - echo -e "\t Fails for ${nfailure} entries" - alines=`cat $TMPFILE | grep "The absolute deviation is"` - IFS=$'\n' - abs=0 - for line in $alines - do - abs_new=`echo $line| awk -F ' ' '{print $5}'` - abs_new=`echo ${abs_new} | sed -e 's/\.$//g' | awk '{printf sprintf("%.16f", $1); }'` - if [ `bc <<< "$abs_new>$abs"` -eq 1 ] - then - abs=$abs_new - fi - done - rlines=`cat $TMPFILE | grep "The relative deviation is"` - rel=0 - for line in $rlines - do - rel_new=`echo $line| awk -F ' ' '{print $5}'` - rel_new=`echo ${rel_new} | sed -e 's/\.$//g' | awk '{printf sprintf("%.16f", $1); }'` - if [ `bc <<< "$rel_new>$rel"` -eq 1 ] - then - rel=$rel_new - fi - done - echo -e "\t Largest absolute deviation: `echo $abs | awk '{printf sprintf("%e", $1); }'`" - echo -e "\t Largest relative deviation: `echo $rel | awk '{printf sprintf("%e", $1); }'`" - fi -done -if [ $allok -eq 1 ] -then - echo "Comparisons pass for all common keywords." -fi -} - -COMPARE_ECL_COMMAND=$1 -TYPE=$2 -FILE1=$3 -FILE2=$4 -ABS_TOL=$5 -REL_TOL=$6 - -KWTMPFILE=$(mktemp) -${COMPARE_ECL_COMMAND} -t ${TYPE} -l -P ${FILE1} ${FILE2} ${ABS_TOL} ${REL_TOL} &> $KWTMPFILE - -cat $KWTMPFILE -echo "" - -analyzeEclFailure - -rm -f $KWTMPFILE diff --git a/tests/analyze_summary_failure.sh b/tests/analyze_summary_failure.sh deleted file mode 100755 index 4be60ea90..000000000 --- a/tests/analyze_summary_failure.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash -# This will perform some analysis on a failed summary -# comparisons in a regression tests. - -# Analyze summary test failure. -# - Print number of failed keywords -# - Print number of levels each keyword failed at -# - Print maximum deviations for each keyword -analyzeSummaryFailure() { - lines=`cat $TMPFILE | grep "For keyword"` - IFS=$'\n' - kwds="" - for line in $lines - do - kwds+="`echo $line | awk -F ' ' '{print $3}'`\n" - done - unique_kwds=`echo -e $kwds | uniq` - kws_failed=`echo -e "$unique_kwds" | wc -l` - echo "$kws_failed summary keyword(s) exhibit failures" - numsteps=`cat $TMPFILE | grep "Comparing " | grep steps | awk -F ' ' '{print $2}'` - - for kwd in $unique_kwds - do - lines=`cat $TMPFILE | grep -n "For keyword $kwd$"` - echo -e "\t $kwd" - echo -e "\t \t Fails for: `cat $TMPFILE | grep -n "$kwd$" | wc -l` / $numsteps steps." - abs=0 - rel=0 - for line in $lines - do - ln=`echo $line | awk -F ':' '{print $1'}` - abs_line=$(($ln+2)) - rel_line=$(($ln+3)) - abs_new=`sed "${abs_line}q;d" $TMPFILE | awk -F ' ' '{print $5}'` - rel_new=`sed "${rel_line}q;d" $TMPFILE | awk -F ' ' '{print $5}'` - abs_new=`echo ${abs_new} | sed -e 's/\.$//g' | awk '{printf sprintf("%.16f", $1); }'` - rel_new=`echo ${rel_new} | sed -e 's/\.$//g' | awk '{printf sprintf("%.16f", $1); }'` - if [ `bc <<< "$abs_new>$abs"` -eq 1 ] - then - abs=$abs_new - fi - if [ `bc <<< "$rel_new>$rel"` -eq 1 ] - then - rel=$rel_new - fi - done - echo -e "\t\t Largest absolute error: `echo $abs | awk '{printf sprintf("%e", $1); }'`" - echo -e "\t\t Largest relative error: `echo $rel | awk '{printf sprintf("%e", $1); }'`" - done -} - -COMPARE_SUMMARY_COMMAND=$1 -PARAM=$2 -FILE1=$3 -FILE2=$4 -ABS_TOL=$5 -REL_TOL=$6 - -TMPFILE=$(mktemp) -${COMPARE_SUMMARY_COMMAND} -p -n ${PARAM} ${FILE1} ${FILE2} ${ABS_TOL} ${REL_TOL} &> $TMPFILE - -analyzeSummaryFailure -rm -f $TMPFILE diff --git a/tests/run-init-regressionTest.sh b/tests/run-init-regressionTest.sh index e9b5a1ce8..0e6ca5e1b 100755 --- a/tests/run-init-regressionTest.sh +++ b/tests/run-init-regressionTest.sh @@ -29,7 +29,7 @@ ${COMPARE_ECL_COMMAND} -t INIT ${RESULT_PATH}/${FILENAME} ${INPUT_DATA_PATH}/opm if [ $? -ne 0 ] then ecode=1 - `dirname $0`/analyze_ecl_failure.sh ${COMPARE_ECL_COMMAND} INIT ${RESULT_PATH}/${FILENAME} ${INPUT_DATA_PATH}/opm-simulation-reference/${EXE_NAME}/${FILENAME} ${ABS_TOL} ${REL_TOL} + ${COMPARE_ECL_COMMAND} -a -t INIT ${RESULT_PATH}/${FILENAME} ${INPUT_DATA_PATH}/opm-simulation-reference/${EXE_NAME}/${FILENAME} ${ABS_TOL} ${REL_TOL} fi exit $ecode diff --git a/tests/run-parallel-regressionTest.sh b/tests/run-parallel-regressionTest.sh index 051ced320..7c1ac176c 100755 --- a/tests/run-parallel-regressionTest.sh +++ b/tests/run-parallel-regressionTest.sh @@ -33,7 +33,7 @@ ${COMPARE_SUMMARY_COMMAND} -R ${RESULT_PATH}/${FILENAME} ${RESULT_PATH}/mpi/${FI if [ $? -ne 0 ] then ecode=1 - `dirname $0`/analyze_summary_failure.sh ${COMPARE_SUMMARY_COMMAND} -R ${RESULT_PATH}/${FILENAME} ${RESULT_PATH}/mpi/${FILENAME} ${ABS_TOL} ${REL_TOL} + ${COMPARE_SUMMARY_COMMAND} -a -R ${RESULT_PATH}/${FILENAME} ${RESULT_PATH}/mpi/${FILENAME} ${ABS_TOL} ${REL_TOL} fi echo "=== Executing comparison for restart file ===" @@ -41,7 +41,7 @@ ${COMPARE_ECL_COMMAND} -l ${RESULT_PATH}/${FILENAME} ${RESULT_PATH}/mpi/${FILENA if [ $? -ne 0 ] then ecode=1 - `dirname $0`/analyze_ecl_failure.sh ${COMPARE_ECL_COMMAND} UNRST ${RESULT_PATH}/${FILENAME} ${RESULT_PATH}/mpi/${FILENAME} ${ABS_TOL} ${REL_TOL} + ${COMPARE_ECL_COMMAND} -a -l ${RESULT_PATH}/${FILENAME} ${RESULT_PATH}/mpi/${FILENAME} ${ABS_TOL} ${REL_TOL} fi exit $ecode diff --git a/tests/run-porv-acceptanceTest.sh b/tests/run-porv-acceptanceTest.sh index 535e28434..6588ea317 100755 --- a/tests/run-porv-acceptanceTest.sh +++ b/tests/run-porv-acceptanceTest.sh @@ -29,7 +29,7 @@ ${COMPARE_ECL_COMMAND} -t INIT -k PORV ${RESULT_PATH}/${FILENAME} ${INPUT_DATA_P if [ $? -ne 0 ] then ecode=1 - `dirname $0`/analyze_ecl_failure.sh ${COMPARE_ECL_COMMAND} INIT ${RESULT_PATH}/${FILENAME} ${INPUT_DATA_PATH}/opm-porevolume-reference/${EXE_NAME}/${FILENAME} ${ABS_TOL} ${REL_TOL} + ${COMPARE_ECL_COMMAND} -a -t INIT -k PORV ${RESULT_PATH}/${FILENAME} ${INPUT_DATA_PATH}/opm-porevolume-reference/${EXE_NAME}/${FILENAME} ${ABS_TOL} ${REL_TOL} fi exit $ecode diff --git a/tests/run-regressionTest.sh b/tests/run-regressionTest.sh index 9c2fcc447..57127bbbb 100755 --- a/tests/run-regressionTest.sh +++ b/tests/run-regressionTest.sh @@ -27,7 +27,7 @@ ${COMPARE_SUMMARY_COMMAND} -r ${RESULT_PATH}/${FILENAME} ${INPUT_DATA_PATH}/opm- if [ $? -ne 0 ] then ecode=1 - `dirname $0`/analyze_summary_failure.sh ${COMPARE_SUMMARY_COMMAND} -r ${RESULT_PATH}/${FILENAME} ${INPUT_DATA_PATH}/opm-simulation-reference/${EXE_NAME}/${FILENAME} ${ABS_TOL} ${REL_TOL} + ${COMPARE_SUMMARY_COMMAND} -a -r ${RESULT_PATH}/${FILENAME} ${INPUT_DATA_PATH}/opm-simulation-reference/${EXE_NAME}/${FILENAME} ${ABS_TOL} ${REL_TOL} fi echo "=== Executing comparison for restart file ===" @@ -35,7 +35,7 @@ ${COMPARE_ECL_COMMAND} ${RESULT_PATH}/${FILENAME} ${INPUT_DATA_PATH}/opm-simula if [ $? -ne 0 ] then ecode=1 - `dirname $0`/analyze_ecl_failure.sh ${COMPARE_ECL_COMMAND} UNRST ${RESULT_PATH}/${FILENAME} ${INPUT_DATA_PATH}/opm-simulation-reference/${EXE_NAME}/${FILENAME} ${ABS_TOL} ${REL_TOL} + ${COMPARE_ECL_COMMAND} -a ${RESULT_PATH}/${FILENAME} ${INPUT_DATA_PATH}/opm-simulation-reference/${EXE_NAME}/${FILENAME} ${ABS_TOL} ${REL_TOL} fi echo "=== Executing comparison for init file ===" @@ -43,7 +43,7 @@ ${COMPARE_ECL_COMMAND} -t INIT ${RESULT_PATH}/${FILENAME} ${INPUT_DATA_PATH}/opm if [ $? -ne 0 ] then ecode=1 - `dirname $0`/analyze_ecl_failure.sh ${COMPARE_ECL_COMMAND} INIT ${RESULT_PATH}/${FILENAME} ${INPUT_DATA_PATH}/opm-simulation-reference/${EXE_NAME}/${FILENAME} ${ABS_TOL} ${REL_TOL} + ${COMPARE_ECL_COMMAND} -a -t INIT ${RESULT_PATH}/${FILENAME} ${INPUT_DATA_PATH}/opm-simulation-reference/${EXE_NAME}/${FILENAME} ${ABS_TOL} ${REL_TOL} fi exit $ecode diff --git a/tests/run-restart-regressionTest.sh b/tests/run-restart-regressionTest.sh index 78d60148a..390973eb1 100755 --- a/tests/run-restart-regressionTest.sh +++ b/tests/run-restart-regressionTest.sh @@ -42,7 +42,7 @@ ${COMPARE_SUMMARY_COMMAND} -R ${RESULT_PATH}/${FILENAME} ${RESULT_PATH}/${FILENA if [ $? -ne 0 ] then ecode=1 - `dirname $0`/analyze_summary_failure.sh ${COMPARE_SUMMARY_COMMAND} -R ${RESULT_PATH}/${FILENAME} ${RESULT_PATH}/${FILENAME}_RESTART ${ABS_TOL} ${REL_TOL} + ${COMPARE_SUMMARY_COMMAND} -a -R ${RESULT_PATH}/${FILENAME} ${RESULT_PATH}/${FILENAME}_RESTART ${ABS_TOL} ${REL_TOL} fi echo "=== Executing comparison for restart file ===" @@ -50,7 +50,7 @@ ${COMPARE_ECL_COMMAND} -l ${RESULT_PATH}/${FILENAME} ${RESULT_PATH}/${FILENAME}_ if [ $? -ne 0 ] then ecode=1 - `dirname $0`/analyze_ecl_failure.sh ${COMPARE_ECL_COMMAND} UNRST ${RESULT_PATH}/${FILENAME} ${RESULT_PATH}/${FILENAME}_RESTART ${ABS_TOL} ${REL_TOL} + ${COMPARE_ECL_COMMAND} -a -l ${RESULT_PATH}/${FILENAME} ${RESULT_PATH}/${FILENAME}_RESTART ${ABS_TOL} ${REL_TOL} fi exit $ecode