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 |
458 |
if test "x$NOCLEAN" = xt ; then |
if test "x$NOCLEAN" = xt ; then |
459 |
echo "run_clean skipped!" |
echo "run_clean skipped!" |
460 |
else |
else |
461 |
( |
( |
462 |
cd $1; |
cd $1; |
463 |
printf 'clean run-dir ... ' |
printf 'clean run-dir ... ' |
464 |
# part of what is done after "make clean" when doing "make CLEAN" |
# part of what is done after "make clean" when doing "make CLEAN" |
465 |
find . -name "*.meta" -exec rm {} \; |
find . -name "*.meta" -exec rm {} \; |
466 |
find . -name "*.data" -exec rm {} \; |
find . -name "*.data" -exec rm {} \; |
467 |
find . -name "fort.*" -exec rm {} \; |
find . -name "fort.*" -exec rm {} \; |
468 |
find . -type l -exec rm {} \; |
find . -type l -exec rm {} \; |
469 |
#- should remove executable only if sym-link (alredy done above) |
#- should remove executable only if sym-link (already done above) |
470 |
rm -f $RUNLOG *.txt STD* w2_tile_topology.????.log *diagnostics.log datetime |
rm -f $RUNLOG *.txt STDOUT.* STDERR.* *diagnostics.log *.[0-9][0-9][0-9][0-9].log |
471 |
rm -rf mnc_test_* |
rm -f datetime costfinal divided.ctrl snapshot* output_adm.*.diva_* |
472 |
rm -f *_MIT_CE_000.opt0000 costfunction*0000 |
rm -f *_MIT_CE_000.opt0000 costfunction*0000 |
473 |
echo successful |
rm -f oad_cp.[0-9][0-9][0-9].????? |
474 |
exit 0 |
rm -rf mnc_test_* |
475 |
) |
echo successful |
476 |
|
exit 0 |
477 |
|
) |
478 |
fi |
fi |
479 |
} |
} |
480 |
|
|
540 |
fi |
fi |
541 |
fi |
fi |
542 |
if test $KIND = 1 -a -f taf_ftl.log ; then |
if test $KIND = 1 -a -f taf_ftl.log ; then |
543 |
head -1 taf_ftl.log >> $CDIR"/summary.txt" |
head -1 taf_ftl.log >> $CDIR"/summary.txt" |
544 |
fi |
fi |
545 |
if test $KIND = 2 -a -f taf_ad.log ; then |
if test $KIND = 2 -a -f taf_ad.log ; then |
546 |
head -1 taf_ad.log >> $CDIR"/summary.txt" |
head -1 taf_ad.log >> $CDIR"/summary.txt" |
547 |
nerr=`grep -c 'TAF *.* ERROR ' taf_ad.log` |
nerr=`grep -c 'TAF *.* ERROR ' taf_ad.log` |
548 |
nwar=`grep -c 'TAF RECOMPUTATION *.* WARNING ' taf_ad.log` |
nwar=`grep -c 'TAF RECOMPUTATION *.* WARNING ' taf_ad.log` |
549 |
echo " TAF reports $nerr Errors and $nwar Recomputation Warnings" \ |
if test -f taf_output ; then |
550 |
|
n2er=`grep -c 'TAF *.* ERROR ' taf_output` |
551 |
|
n3er=`grep -c '\*ERROR\* ' taf_output` |
552 |
|
nerr=`expr $nerr + $n2er + $n3er` |
553 |
|
fi |
554 |
|
echo " TAF reports $nerr Errors and $nwar Recomputation Warnings" \ |
555 |
>> $CDIR"/summary.txt" |
>> $CDIR"/summary.txt" |
556 |
fi |
fi |
557 |
if test $mk_fail != 0 ; then return $mk_fail ; fi |
if test $mk_fail != 0 ; then return $mk_fail ; fi |
798 |
# output do not exist or is older than executable: |
# output do not exist or is older than executable: |
799 |
rm -f $OUTPUTFILE $RUNLOG ; touch $RUNLOG |
rm -f $OUTPUTFILE $RUNLOG ; touch $RUNLOG |
800 |
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 |
801 |
|
#- Divided Adjoint Run: |
802 |
|
# get the number of additional runs (add_DIVA_runs) from file "run_ADM_DIVA" |
803 |
|
if test $KIND = 2 -a -f run_ADM_DIVA ; then |
804 |
|
adm_diva_nb=`sed -n '/^ *add_DIVA_runs\>.*=/p' run_ADM_DIVA | sed 's/ //g'` |
805 |
|
echo " Divided Adjoint Run: $adm_diva_nb" >> $RUNLOG |
806 |
|
eval "let $adm_diva_nb" |
807 |
|
if [ $add_DIVA_runs -ge 1 ] ; then |
808 |
|
rm -f costf* divided.ctrl snapshot* |
809 |
|
echo -n "(add_DIVA_runs=$add_DIVA_runs) ... " |
810 |
|
for ii in `seq 1 $add_DIVA_runs` ; do |
811 |
|
( eval $COMMAND ) >> $RUNLOG 2>&1 |
812 |
|
echo " additional DIVA run # $ii : done" >> $RUNLOG |
813 |
|
mv -f $OUTPUTFILE ${OUTPUTFILE}.diva_${ii} |
814 |
|
done |
815 |
|
fi |
816 |
|
fi |
817 |
|
#- special DIVA processing ends here |
818 |
( eval $COMMAND ) >> $RUNLOG 2>&1 |
( eval $COMMAND ) >> $RUNLOG 2>&1 |
819 |
RETVAL=$? |
RETVAL=$? |
820 |
ENDVAL=`tail $OUTPUTFILE | grep -c 'PROGRAM MAIN: Execution ended Normally'` |
ENDVAL=`tail $OUTPUTFILE | grep -c 'PROGRAM MAIN: Execution ended Normally'` |
939 |
fi |
fi |
940 |
fi |
fi |
941 |
printf ' %s' $nm |
printf ' %s' $nm |
942 |
|
if test $KIND = 2 ; then |
943 |
|
#-- apppend taf repport summary: |
944 |
|
tafrep=`grep -c '^ TAF reports ' $CDIR/summary.txt` |
945 |
|
if test $tafrep = 1 ; then |
946 |
|
grep '^ TAF reports ' $CDIR/summary.txt | awk '{printf " (e=%i, w=%i)",$3,$6}' |
947 |
|
fi |
948 |
|
fi |
949 |
printf '\n' |
printf '\n' |
950 |
|
|
951 |
} |
} |
1314 |
fi |
fi |
1315 |
|
|
1316 |
# create the FORTRAN comparison code |
# create the FORTRAN comparison code |
1317 |
if test -x tr_cmpnum ; then |
if test "x$CLEANUP" = xt -o -x tr_cmpnum ; then |
1318 |
echo "skipping comparison code build" |
echo "skipping comparison code build" |
1319 |
else |
else |
1320 |
createcodelet |
createcodelet |
1330 |
# Create a uniquely named directory to store results |
# Create a uniquely named directory to store results |
1331 |
CMDLINE=$0 |
CMDLINE=$0 |
1332 |
for xx in "$@" ; do nw=`echo $xx | wc -w` |
for xx in "$@" ; do nw=`echo $xx | wc -w` |
1333 |
if test $nw = '1' ; then CMDLINE="$CMDLINE $xx" |
if test $nw = '1' ; then CMDLINE="$CMDLINE $xx" ; else |
1334 |
else CMDLINE="$CMDLINE '$xx'" ; fi |
nb=`echo $xx | grep -c '='` |
1335 |
|
if test $nb = 0 ; then CMDLINE="$CMDLINE '$xx'" |
1336 |
|
else yy=`echo "$xx'" | sed "s/=/='/"` ; |
1337 |
|
CMDLINE="$CMDLINE $yy" ; fi |
1338 |
|
fi |
1339 |
done |
done |
1340 |
#for xx in "$@" ; do CMDLINE="$CMDLINE '$xx'" ; done |
#for xx in "$@" ; do CMDLINE="$CMDLINE '$xx'" ; done |
1341 |
MACH=`hostname` |
MACH=`hostname` |
1382 |
echo >> $SUMMARY |
echo >> $SUMMARY |
1383 |
echo " OPTFILE=$OPTFILE" >> $SUMMARY |
echo " OPTFILE=$OPTFILE" >> $SUMMARY |
1384 |
else |
else |
1385 |
echo | tee $SUMMARY |
echo | tee -a $SUMMARY |
1386 |
echo "ERROR: can't read OPTFILE=\"$OPTFILE\"" | tee $SUMMARY |
echo "ERROR: can't read OPTFILE=\"$OPTFILE\"" | tee -a $SUMMARY |
1387 |
exit 1 |
exit 1 |
1388 |
fi |
fi |
1389 |
else |
else |
1410 |
else |
else |
1411 |
line_0=`printf '%s %2i' 'default ' $MATCH_CRIT` |
line_0=`printf '%s %2i' 'default ' $MATCH_CRIT` |
1412 |
if test $KIND = 1 ; then |
if test $KIND = 1 ; then |
1413 |
echo "TANGLIN=true" >> $SUMMARY |
#echo "TANGLIN=true" >> $SUMMARY |
1414 |
|
echo "TangLin generated by TAF" >> $SUMMARY |
1415 |
|
elif test $KIND = 3 ; then |
1416 |
|
echo "TangLin generated by OpenAD" >> $SUMMARY |
1417 |
|
elif test $KIND = 2 ; then |
1418 |
|
#echo "ADJOINT=true" >> $SUMMARY |
1419 |
|
echo "Adjoint generated by TAF" >> $SUMMARY |
1420 |
|
else |
1421 |
|
echo "Adjoint generated by OpenAD" >> $SUMMARY |
1422 |
|
fi |
1423 |
|
if test $KIND = 1 -o $KIND = 3 ; then |
1424 |
line_1="G D M C T F" |
line_1="G D M C T F" |
1425 |
line_2="e p a R o L D" |
line_2="e p a R o L D" |
1426 |
else |
else |
|
echo "ADJOINT=true" >> $SUMMARY |
|
1427 |
line_1="G D M C A F" |
line_1="G D M C A F" |
1428 |
line_2="e p a R o d D" |
line_2="e p a R o d D" |
1429 |
fi |
fi |
1431 |
line_4="2 d e n t r r" |
line_4="2 d e n t r r" |
1432 |
echo >> $SUMMARY |
echo >> $SUMMARY |
1433 |
fi |
fi |
1434 |
|
if test "x$CLEANUP" != xt ; then |
1435 |
echo "$line_0" | tee -a $SUMMARY |
echo "$line_0" | tee -a $SUMMARY |
1436 |
echo "$line_1" | tee -a $SUMMARY |
echo "$line_1" | tee -a $SUMMARY |
1437 |
echo "$line_2" | tee -a $SUMMARY |
echo "$line_2" | tee -a $SUMMARY |
1438 |
echo "$line_3" | tee -a $SUMMARY |
echo "$line_3" | tee -a $SUMMARY |
1439 |
echo "$line_4" | tee -a $SUMMARY |
echo "$line_4" | tee -a $SUMMARY |
1440 |
echo "" | tee -a $SUMMARY |
echo "" | tee -a $SUMMARY |
1441 |
|
fi |
1442 |
echo "-------------------------------------------------------------------------------" |
echo "-------------------------------------------------------------------------------" |
1443 |
|
|
1444 |
# ...and each test directory... |
# ...and each test directory... |
1463 |
rm -f $EXECUTABLE *.bak |
rm -f $EXECUTABLE *.bak |
1464 |
rm -f genmake_state genmake_*optfile genmake.log |
rm -f genmake_state genmake_*optfile genmake.log |
1465 |
rm -f SIZE.h.mpi genmake.tr_log make.tr_log |
rm -f SIZE.h.mpi genmake.tr_log make.tr_log |
1466 |
|
rm -rf mpi_headers |
1467 |
) |
) |
1468 |
if test -d $dir/$rundir/CVS ; then |
if test -d $dir/$rundir/CVS ; then |
1469 |
echo -n ' --- dir:' $dir/$rundir ': ' |
echo -n ' --- dir:' $dir/$rundir ': ' |
1548 |
# Check whether there are "extra runs" for this testdir |
# Check whether there are "extra runs" for this testdir |
1549 |
extra_runs= |
extra_runs= |
1550 |
if test "x$NORUN" = xf ; then |
if test "x$NORUN" = xf ; then |
1551 |
ex_run_dirs=`( cd $dir ; echo $inputdir.* )` |
ex_run_dirs=`( cd $dir ; ls -d $inputdir.* 2> /dev/null )` |
1552 |
fi |
fi |
1553 |
#echo "ex_run_dirs='$ex_run_dirs'" |
#echo "ex_run_dirs='$ex_run_dirs'" |
1554 |
for exd in $ex_run_dirs ; do |
for exd in $ex_run_dirs ; do |
1555 |
name=`echo $exd | sed -e "s/$inputdir\.//"` |
name=`echo $exd | sed -e "s/$inputdir\.//"` |
1556 |
refExOut=`echo $ref_outp | sed "s/\./.${name}./"` |
refExOut=`echo $ref_outp | sed "s/\./.${name}./"` |
1557 |
outf="$dir/results/$refExOut" |
outf="$dir/results/$refExOut" |
|
#if test -f $outf -a -r $outf ; then |
|
1558 |
if test -r $outf -o -r ${outf}.gz ; then |
if test -r $outf -o -r ${outf}.gz ; then |
1559 |
if test "x$MULTI_THREAD" = "xt" ; then |
if test "x$MULTI_THREAD" = "xt" ; then |
1560 |
if test -r $dir"/"$exd"/eedata.mth" ; then |
if test -r $dir"/"$exd"/eedata.mth" ; then |
1638 |
linkdata $dir/$pfxdir.$ex $inputdir.$ex $inputdir |
linkdata $dir/$pfxdir.$ex $inputdir.$ex $inputdir |
1639 |
runmodel $dir/$pfxdir.$ex && run=Y \ |
runmodel $dir/$pfxdir.$ex && run=Y \ |
1640 |
&& results=`testoutput_run $dir $pfxdir.$ex $refExOut` |
&& results=`testoutput_run $dir $pfxdir.$ex $refExOut` |
1641 |
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" |
|
1642 |
echo 1>&2 |
echo 1>&2 |
1643 |
echo "$fres" | sed 's/ 99/ --/g' | sed 's/ > />/' | sed 's/ < /</' >> $SUMMARY |
echo "$fres" | sed 's/ 99/ --/g' | sed 's/ > />/' | sed 's/ < /</' >> $SUMMARY |
1644 |
echo "fresults='$fres'" | sed 's/ 99/ --/g' >> $locDIR"/summary.txt" |
echo "fresults='$fres'" | sed 's/ 99/ --/g' >> $locDIR"/summary.txt" |
1742 |
if test "x$DELDIR" = xt ; then |
if test "x$DELDIR" = xt ; then |
1743 |
rm -rf $DRESULTS |
rm -rf $DRESULTS |
1744 |
fi |
fi |
1745 |
|
echo "======== End of testreport execution ========" |