189 |
done |
done |
190 |
} |
} |
191 |
|
|
|
testoutput_ad() |
|
|
{ |
|
|
grep $3 $1/results_ad/output_adm.txt | awk '{print NR " " $5}' > t05.txt |
|
|
grep $3 $1/$2/$OUTPUTFILE | awk '{print NR " " $5}' > t15.txt |
|
|
grep $3 $1/results_ad/output_adm.txt | awk '{print NR " " $6}' > t06.txt |
|
|
grep $3 $1/$2/$OUTPUTFILE | awk '{print NR " " $6}' > t16.txt |
|
|
join t05.txt t15.txt > t5.txt |
|
|
join t06.txt t16.txt > t6.txt |
|
|
echo "-1" >> t5.txt |
|
|
echo "-1" >> t6.txt |
|
|
digits_5=`./tr_cmpnum < t5.txt` |
|
|
digits_6=`./tr_cmpnum < t6.txt` |
|
|
dashnum $digits_5 $digits_6 |
|
|
rm -f t[01][56].txt t[56].txt |
|
|
} |
|
|
|
|
192 |
check_for_add_mon_output() |
check_for_add_mon_output() |
193 |
{ |
{ |
194 |
# Check for additional types of monitor output |
# Check for additional types of monitor output |
219 |
# testoutput_run directory subdir reference_output |
# testoutput_run directory subdir reference_output |
220 |
# |
# |
221 |
# test output from 1 run in "directory" |
# test output from 1 run in "directory" |
222 |
# if test "x$ADM" = x ; then |
# --> same processing for adjoint & forward test |
223 |
# default list of output variables to be checked: |
# default list of output variables to be checked: |
224 |
# 1rst : main variable used to decide if it pass or FAIL |
# 1rst : main variable used to decide if it pass or FAIL |
225 |
# others : number of matching digits to be printed in summary.txt |
# others : number of matching digits to be printed in summary.txt |
314 |
else |
else |
315 |
echo $allargs |
echo $allargs |
316 |
fi |
fi |
317 |
|
# <-- same processing for adjoint & forward test |
|
# else |
|
|
# testoutput_ad $1 $2 "precision_grdchk_result" |
|
|
# fi |
|
318 |
} |
} |
319 |
|
|
320 |
genmakemodel() |
genmakemodel() |
910 |
fi |
fi |
911 |
|
|
912 |
if test "x$TESTDIRS" = x ; then |
if test "x$TESTDIRS" = x ; then |
913 |
# if test "x$ADM" = xt ; then |
LIST=`scandirs results/$ref_outp` |
|
# LIST=`scandirs results_ad/$ref_outp` |
|
|
# else |
|
|
LIST=`scandirs results/$ref_outp` |
|
|
# fi |
|
914 |
else |
else |
915 |
#- expand group of experiments: |
#- expand group of experiments: |
916 |
LIST=" " |
LIST=" " |
962 |
OUTPUTFILE="STDOUT.0000" |
OUTPUTFILE="STDOUT.0000" |
963 |
fi |
fi |
964 |
|
|
|
#echo "OK" |
|
965 |
echo "OK (COMMAND= $COMMAND )" |
echo "OK (COMMAND= $COMMAND )" |
966 |
|
|
967 |
# set the Default List of output variables to be checked: |
# set the Default List of output variables to be checked: |
975 |
ii=`echo $EMPTY_RESULTS | awk '{print NF}'` |
ii=`echo $EMPTY_RESULTS | awk '{print NF}'` |
976 |
EMPTY_RESULTS=$EMPTY_RESULTS`expr $LEN_CHECK_LIST - $ii | awk 'BEGIN{FS=":"}{for(i=1;i<=$1;i++){printf " ."}}'` |
EMPTY_RESULTS=$EMPTY_RESULTS`expr $LEN_CHECK_LIST - $ii | awk 'BEGIN{FS=":"}{for(i=1;i<=$1;i++){printf " ."}}'` |
977 |
else |
else |
978 |
DEF_CHECK_LIST='Cost Cost Grad' |
DEF_CHECK_LIST='Grad Cost Grad' |
979 |
EMPTY_RESULTS='.. ..' |
EMPTY_RESULTS='.. ..' |
980 |
LEN_CHECK_LIST=`echo $DEF_CHECK_LIST | sed 's/ [a-zA-Z0-9]*+/&mn &mx &av &sd/g' | awk '{print NF-1}'` |
LEN_CHECK_LIST=`echo $DEF_CHECK_LIST | sed 's/ [a-zA-Z0-9]*+/&mn &mx &av &sd/g' | awk '{print NF-1}'` |
981 |
fi |
fi |
1072 |
echo "ADJOINT=true" >> $SUMMARY |
echo "ADJOINT=true" >> $SUMMARY |
1073 |
echo >> $SUMMARY |
echo >> $SUMMARY |
1074 |
if [ $MATCH_CRIT -lt 10 ] ; |
if [ $MATCH_CRIT -lt 10 ] ; |
1075 |
then line_0="default "$MATCH_CRIT ; |
then line_0="default "$MATCH_CRIT ; |
1076 |
else line_0="default "$MATCH_CRIT ; fi |
else line_0="default "$MATCH_CRIT ; fi |
1077 |
echo "$line_0" | tee -a $SUMMARY |
echo "$line_0" | tee -a $SUMMARY |
1078 |
cat << EOF | tee -a $SUMMARY |
cat << EOF | tee -a $SUMMARY |
1079 |
G D M C G |
G D M C G |
1194 |
fi |
fi |
1195 |
|
|
1196 |
echo |
echo |
1197 |
# if test "x$ADM" = x ; then |
# --> same processing for adjoint & forward test |
1198 |
fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results` |
fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results` |
1199 |
echo |
echo |
1200 |
echo "$fres" | sed 's/ 99/ --/g' | sed 's/ > />/' | sed 's/ < /</' >> $SUMMARY |
echo "$fres" | sed 's/ 99/ --/g' | sed 's/ > />/' | sed 's/ < /</' >> $SUMMARY |
1231 |
run_clean $dir/tr_run.$ex |
run_clean $dir/tr_run.$ex |
1232 |
fi |
fi |
1233 |
done |
done |
1234 |
# else |
# <-- same processing for adjoint & forward test |
|
# fres=`printf '%s %s %s %s' ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N}` |
|
|
# fres=$fres"$results $dir" |
|
|
# echo |
|
|
# echo "$fres" >> $SUMMARY |
|
|
# touch $CDIR"/summary.txt" |
|
|
# echo "fresults='$fres'" >> $CDIR"/summary.txt" |
|
|
# echo "MACH='$MACH'" >> $CDIR"/summary.txt" |
|
|
# echo "UNAMEA='$UNAMEA'" >> $CDIR"/summary.txt" |
|
|
# echo "DATE='$DATE'" >> $CDIR"/summary.txt" |
|
|
# echo "tdir='$dir'" >> $CDIR"/summary.txt" |
|
|
# fi |
|
1235 |
if test "x$ADM" = xt ; then |
if test "x$ADM" = xt ; then |
1236 |
grep -A3 'Seconds in section "ALL' $dir/$rundir/$OUTPUTFILE \ |
grep -A3 'Seconds in section "ALL' $dir/$rundir/$OUTPUTFILE \ |
1237 |
>> $CDIR"/summary.txt" |
>> $CDIR"/summary.txt" |
1286 |
if test -e tr_out.txt ; then |
if test -e tr_out.txt ; then |
1287 |
mv tr_out.txt tr_out.txt.old |
mv tr_out.txt tr_out.txt.old |
1288 |
fi |
fi |
1289 |
cat $SUMMARY | sed '/^[YN] [YN] [YN] [YN]/ s/ \.//g' > tr_out.txt |
cat $SUMMARY | sed '/^[YN] [YN] [YN] [YN]/ s/ \. //g' > tr_out.txt |
1290 |
fi |
fi |
1291 |
|
|
1292 |
if test "x$DELDIR" = xt ; then |
if test "x$DELDIR" = xt ; then |