322 |
'AthSiG') testoutput_var $1 "thSI_Ice_Area_G" "thSIc Area Global" $2 $refoutp ; yy=$? ;; |
'AthSiG') testoutput_var $1 "thSI_Ice_Area_G" "thSIc Area Global" $2 $refoutp ; yy=$? ;; |
323 |
'AthSiS') testoutput_var $1 "thSI_Ice_Area_S" "thSIc Area South" $2 $refoutp ; yy=$? ;; |
'AthSiS') testoutput_var $1 "thSI_Ice_Area_S" "thSIc Area South" $2 $refoutp ; yy=$? ;; |
324 |
'AthSiN') testoutput_var $1 "thSI_Ice_Area_N" "thSIc Area North" $2 $refoutp ; yy=$? ;; |
'AthSiN') testoutput_var $1 "thSI_Ice_Area_N" "thSIc Area North" $2 $refoutp ; yy=$? ;; |
325 |
'HthSiG') testoutput_var $1 "thSI_IceH_ave_G" "thSIc H Global" $2 $refoutp ; yy=$? ;; |
'HthSiG') testoutput_var $1 "thSI_IceH_ave_G" "thSIc H Glob-ave" $2 $refoutp ; yy=$? ;; |
326 |
'HthSiS') testoutput_var $1 "thSI_IceH_ave_S" "thSIc H South" $2 $refoutp ; yy=$? ;; |
'HthSiS') testoutput_var $1 "thSI_IceH_ave_S" "thSIc H South-av" $2 $refoutp ; yy=$? ;; |
327 |
'HthSiN') testoutput_var $1 "thSI_IceH_ave_N" "thSIc H North" $2 $refoutp ; yy=$? ;; |
'HthSiN') testoutput_var $1 "thSI_IceH_ave_N" "thSIc H North-av" $2 $refoutp ; yy=$? ;; |
328 |
|
'HthMxS') testoutput_var $1 "thSI_IceH_max_S" "thSIc H South-max" $2 $refoutp ; yy=$? ;; |
329 |
|
'HthMxN') testoutput_var $1 "thSI_IceH_max_N" "thSIc H North-max" $2 $refoutp ; yy=$? ;; |
330 |
|
'StrmIc') testoutput_var $1 "STREAMICE_FP_ERR" "StreamIce Solver" $2 $refoutp ; yy=$? ;; |
331 |
*) yy=99; echo "WARNING: asking for var=$xx : not recognized !" 1>&2 ;; |
*) yy=99; echo "WARNING: asking for var=$xx : not recognized !" 1>&2 ;; |
332 |
esac |
esac |
333 |
if test $xx = $sVar |
if test $xx = $sVar |
470 |
rm -f $RUNLOG *.txt STD* w2_tile_topology.????.log *diagnostics.log datetime |
rm -f $RUNLOG *.txt STD* w2_tile_topology.????.log *diagnostics.log datetime |
471 |
rm -rf mnc_test_* |
rm -rf mnc_test_* |
472 |
rm -f *_MIT_CE_000.opt0000 costfunction*0000 |
rm -f *_MIT_CE_000.opt0000 costfunction*0000 |
473 |
|
rm -f oad_cp.000.[0-9][0-9][0-9][0-9][0-9] |
474 |
echo successful |
echo successful |
475 |
exit 0 |
exit 0 |
476 |
) |
) |
539 |
fi |
fi |
540 |
fi |
fi |
541 |
if test $KIND = 1 -a -f taf_ftl.log ; then |
if test $KIND = 1 -a -f taf_ftl.log ; then |
542 |
head -1 taf_ftl.log >> $CDIR"/summary.txt" |
head -1 taf_ftl.log >> $CDIR"/summary.txt" |
543 |
fi |
fi |
544 |
if test $KIND = 2 -a -f taf_ad.log ; then |
if test $KIND = 2 -a -f taf_ad.log ; then |
545 |
head -1 taf_ad.log >> $CDIR"/summary.txt" |
head -1 taf_ad.log >> $CDIR"/summary.txt" |
546 |
nerr=`grep -c 'TAF *.* ERROR ' taf_ad.log` |
nerr=`grep -c 'TAF *.* ERROR ' taf_ad.log` |
547 |
nwar=`grep -c 'TAF RECOMPUTATION *.* WARNING ' taf_ad.log` |
nwar=`grep -c 'TAF RECOMPUTATION *.* WARNING ' taf_ad.log` |
548 |
echo " TAF reports $nerr Errors and $nwar Recomputation Warnings" \ |
if test -f taf_output ; then |
549 |
|
n2er=`grep -c 'TAF *.* ERROR ' taf_output` |
550 |
|
nerr=`expr $nerr + $n2er` |
551 |
|
fi |
552 |
|
echo " TAF reports $nerr Errors and $nwar Recomputation Warnings" \ |
553 |
>> $CDIR"/summary.txt" |
>> $CDIR"/summary.txt" |
554 |
fi |
fi |
555 |
if test $mk_fail != 0 ; then return $mk_fail ; fi |
if test $mk_fail != 0 ; then return $mk_fail ; fi |
796 |
# output do not exist or is older than executable: |
# output do not exist or is older than executable: |
797 |
rm -f $OUTPUTFILE $RUNLOG ; touch $RUNLOG |
rm -f $OUTPUTFILE $RUNLOG ; touch $RUNLOG |
798 |
if test -f run.log_tmp ; then cat run.log_tmp >> $RUNLOG ; fi |
if test -f run.log_tmp ; then cat run.log_tmp >> $RUNLOG ; fi |
799 |
|
#--a quick and dirty trick to run with Divided Adjoint (DIVA): |
800 |
|
if test $KIND = 2 -a -x dorun.sh ; then |
801 |
|
./dorun.sh >> $RUNLOG 2>&1 |
802 |
|
else |
803 |
( eval $COMMAND ) >> $RUNLOG 2>&1 |
( eval $COMMAND ) >> $RUNLOG 2>&1 |
804 |
|
fi |
805 |
|
#---------- |
806 |
RETVAL=$? |
RETVAL=$? |
807 |
ENDVAL=`tail $OUTPUTFILE | grep -c 'PROGRAM MAIN: Execution ended Normally'` |
ENDVAL=`tail $OUTPUTFILE | grep -c 'PROGRAM MAIN: Execution ended Normally'` |
808 |
if [ $POSTCLEAN -eq 1 -a $ENDVAL -gt 0 ] ; then |
if [ $POSTCLEAN -eq 1 -a $ENDVAL -gt 0 ] ; then |
926 |
fi |
fi |
927 |
fi |
fi |
928 |
printf ' %s' $nm |
printf ' %s' $nm |
929 |
|
if test $KIND = 2 ; then |
930 |
|
#-- apppend taf repport summary: |
931 |
|
tafrep=`grep -c '^ TAF reports ' $CDIR/summary.txt` |
932 |
|
if test $tafrep = 1 ; then |
933 |
|
grep '^ TAF reports ' $CDIR/summary.txt | awk '{printf " (e=%i, w=%i)",$3,$6}' |
934 |
|
fi |
935 |
|
fi |
936 |
printf '\n' |
printf '\n' |
937 |
|
|
938 |
} |
} |
1301 |
fi |
fi |
1302 |
|
|
1303 |
# create the FORTRAN comparison code |
# create the FORTRAN comparison code |
1304 |
if test -x tr_cmpnum ; then |
if test "x$CLEANUP" = xt -o -x tr_cmpnum ; then |
1305 |
echo "skipping comparison code build" |
echo "skipping comparison code build" |
1306 |
else |
else |
1307 |
createcodelet |
createcodelet |
1317 |
# Create a uniquely named directory to store results |
# Create a uniquely named directory to store results |
1318 |
CMDLINE=$0 |
CMDLINE=$0 |
1319 |
for xx in "$@" ; do nw=`echo $xx | wc -w` |
for xx in "$@" ; do nw=`echo $xx | wc -w` |
1320 |
if test $nw = '1' ; then CMDLINE="$CMDLINE $xx" |
if test $nw = '1' ; then CMDLINE="$CMDLINE $xx" ; else |
1321 |
else CMDLINE="$CMDLINE '$xx'" ; fi |
nb=`echo $xx | grep -c '='` |
1322 |
|
if test $nb = 0 ; then CMDLINE="$CMDLINE '$xx'" |
1323 |
|
else yy=`echo "$xx'" | sed "s/=/='/"` ; |
1324 |
|
CMDLINE="$CMDLINE $yy" ; fi |
1325 |
|
fi |
1326 |
done |
done |
1327 |
#for xx in "$@" ; do CMDLINE="$CMDLINE '$xx'" ; done |
#for xx in "$@" ; do CMDLINE="$CMDLINE '$xx'" ; done |
1328 |
MACH=`hostname` |
MACH=`hostname` |
1369 |
echo >> $SUMMARY |
echo >> $SUMMARY |
1370 |
echo " OPTFILE=$OPTFILE" >> $SUMMARY |
echo " OPTFILE=$OPTFILE" >> $SUMMARY |
1371 |
else |
else |
1372 |
echo | tee $SUMMARY |
echo | tee -a $SUMMARY |
1373 |
echo "ERROR: can't read OPTFILE=\"$OPTFILE\"" | tee $SUMMARY |
echo "ERROR: can't read OPTFILE=\"$OPTFILE\"" | tee -a $SUMMARY |
1374 |
exit 1 |
exit 1 |
1375 |
fi |
fi |
1376 |
else |
else |
1397 |
else |
else |
1398 |
line_0=`printf '%s %2i' 'default ' $MATCH_CRIT` |
line_0=`printf '%s %2i' 'default ' $MATCH_CRIT` |
1399 |
if test $KIND = 1 ; then |
if test $KIND = 1 ; then |
1400 |
echo "TANGLIN=true" >> $SUMMARY |
#echo "TANGLIN=true" >> $SUMMARY |
1401 |
|
echo "TangLin generated by TAF" >> $SUMMARY |
1402 |
|
elif test $KIND = 3 ; then |
1403 |
|
echo "TangLin generated by OpenAD" >> $SUMMARY |
1404 |
|
elif test $KIND = 2 ; then |
1405 |
|
#echo "ADJOINT=true" >> $SUMMARY |
1406 |
|
echo "Adjoint generated by TAF" >> $SUMMARY |
1407 |
|
else |
1408 |
|
echo "Adjoint generated by OpenAD" >> $SUMMARY |
1409 |
|
fi |
1410 |
|
if test $KIND = 1 -o $KIND = 3 ; then |
1411 |
line_1="G D M C T F" |
line_1="G D M C T F" |
1412 |
line_2="e p a R o L D" |
line_2="e p a R o L D" |
1413 |
else |
else |
|
echo "ADJOINT=true" >> $SUMMARY |
|
1414 |
line_1="G D M C A F" |
line_1="G D M C A F" |
1415 |
line_2="e p a R o d D" |
line_2="e p a R o d D" |
1416 |
fi |
fi |
1418 |
line_4="2 d e n t r r" |
line_4="2 d e n t r r" |
1419 |
echo >> $SUMMARY |
echo >> $SUMMARY |
1420 |
fi |
fi |
1421 |
|
if test "x$CLEANUP" != xt ; then |
1422 |
echo "$line_0" | tee -a $SUMMARY |
echo "$line_0" | tee -a $SUMMARY |
1423 |
echo "$line_1" | tee -a $SUMMARY |
echo "$line_1" | tee -a $SUMMARY |
1424 |
echo "$line_2" | tee -a $SUMMARY |
echo "$line_2" | tee -a $SUMMARY |
1425 |
echo "$line_3" | tee -a $SUMMARY |
echo "$line_3" | tee -a $SUMMARY |
1426 |
echo "$line_4" | tee -a $SUMMARY |
echo "$line_4" | tee -a $SUMMARY |
1427 |
echo "" | tee -a $SUMMARY |
echo "" | tee -a $SUMMARY |
1428 |
|
fi |
1429 |
echo "-------------------------------------------------------------------------------" |
echo "-------------------------------------------------------------------------------" |
1430 |
|
|
1431 |
# ...and each test directory... |
# ...and each test directory... |
1534 |
# Check whether there are "extra runs" for this testdir |
# Check whether there are "extra runs" for this testdir |
1535 |
extra_runs= |
extra_runs= |
1536 |
if test "x$NORUN" = xf ; then |
if test "x$NORUN" = xf ; then |
1537 |
ex_run_dirs=`( cd $dir ; echo $inputdir.* )` |
ex_run_dirs=`( cd $dir ; ls -d $inputdir.* 2> /dev/null )` |
1538 |
fi |
fi |
1539 |
#echo "ex_run_dirs='$ex_run_dirs'" |
#echo "ex_run_dirs='$ex_run_dirs'" |
1540 |
for exd in $ex_run_dirs ; do |
for exd in $ex_run_dirs ; do |
1541 |
name=`echo $exd | sed -e "s/$inputdir\.//"` |
name=`echo $exd | sed -e "s/$inputdir\.//"` |
1542 |
refExOut=`echo $ref_outp | sed "s/\./.${name}./"` |
refExOut=`echo $ref_outp | sed "s/\./.${name}./"` |
1543 |
outf="$dir/results/$refExOut" |
outf="$dir/results/$refExOut" |
|
#if test -f $outf -a -r $outf ; then |
|
1544 |
if test -r $outf -o -r ${outf}.gz ; then |
if test -r $outf -o -r ${outf}.gz ; then |
1545 |
if test "x$MULTI_THREAD" = "xt" ; then |
if test "x$MULTI_THREAD" = "xt" ; then |
1546 |
if test -r $dir"/"$exd"/eedata.mth" ; then |
if test -r $dir"/"$exd"/eedata.mth" ; then |
1624 |
linkdata $dir/$pfxdir.$ex $inputdir.$ex $inputdir |
linkdata $dir/$pfxdir.$ex $inputdir.$ex $inputdir |
1625 |
runmodel $dir/$pfxdir.$ex && run=Y \ |
runmodel $dir/$pfxdir.$ex && run=Y \ |
1626 |
&& results=`testoutput_run $dir $pfxdir.$ex $refExOut` |
&& results=`testoutput_run $dir $pfxdir.$ex $refExOut` |
1627 |
fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results` |
fres=`formatresults $dir.$ex ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results` |
|
fres="$fres.$ex" |
|
1628 |
echo 1>&2 |
echo 1>&2 |
1629 |
echo "$fres" | sed 's/ 99/ --/g' | sed 's/ > />/' | sed 's/ < /</' >> $SUMMARY |
echo "$fres" | sed 's/ 99/ --/g' | sed 's/ > />/' | sed 's/ < /</' >> $SUMMARY |
1630 |
echo "fresults='$fres'" | sed 's/ 99/ --/g' >> $locDIR"/summary.txt" |
echo "fresults='$fres'" | sed 's/ 99/ --/g' >> $locDIR"/summary.txt" |
1728 |
if test "x$DELDIR" = xt ; then |
if test "x$DELDIR" = xt ; then |
1729 |
rm -rf $DRESULTS |
rm -rf $DRESULTS |
1730 |
fi |
fi |
1731 |
|
echo "======== End of testreport execution ========" |