240 |
# 1rst : main variable used to decide if it pass or FAIL |
# 1rst : main variable used to decide if it pass or FAIL |
241 |
# others : number of matching digits to be printed in summary.txt |
# others : number of matching digits to be printed in summary.txt |
242 |
listChk=$DEF_CHECK_LIST |
listChk=$DEF_CHECK_LIST |
|
nbDef=`echo $listChk | awk '{print NF-1+3*gsub("+","E")}'` |
|
243 |
# load experiment-specific list from file "tr_checklist" (if it exist) |
# load experiment-specific list from file "tr_checklist" (if it exist) |
244 |
if test -r $1/$2/tr_checklist ; then listChk=`cat $1/$2/tr_checklist` ; fi |
if test -r $1/$2/tr_checklist ; then listChk=`cat $1/$2/tr_checklist` ; fi |
245 |
sVar=`echo $listChk | awk '{print $1}'` |
sVar=`echo $listChk | awk '{print $1}'` |
246 |
# remove 1rst var and expand the list: + => min max mean s.d |
# remove 1rst var and expand the list: + => min max mean s.d |
247 |
listVar=`echo $listChk | awk '{ for(i=2;i<=NF;i++){if (sub("+","",$i)) \ |
listVar=`echo $listChk | sed 's/ [a-zA-Z0-9]*+/&mn &mx &av &sd/g' \ |
248 |
{printf " %s %s %s %s",$i"mn",$i"mx",$i"av",$i"sd"} else {printf " %s",$i} }}'` |
| sed 's/+//g' | sed "s/^$sVar//"` |
249 |
if [ $debug -gt 0 ]; then echo "testoutput_run: listVar(I)='$listVar'" 1>&2 ; fi |
if [ $debug -gt 0 ]; then echo "testoutput_run: listVar(I)='$listVar'" 1>&2 ; fi |
250 |
for ii in 1 2 3 4 5 6 7 8 9 ; do |
for ii in 1 2 3 4 5 6 7 8 9 ; do |
251 |
tst=`eval 'echo "$HAVE_PTR0'$ii'"'` |
tst=`eval 'echo "$HAVE_PTR0'$ii'"'` |
303 |
done |
done |
304 |
|
|
305 |
nbVar=`echo $listVar | awk '{print NF}'` |
nbVar=`echo $listVar | awk '{print NF}'` |
306 |
if [ $nbVar -lt $nbDef ] ; then |
if [ $nbVar -lt $LEN_CHECK_LIST ] ; then |
307 |
#-- fill line (up to standard length) with dot: |
#-- fill line (up to standard length) with dot: |
308 |
adNul=`expr $nbDef - $nbVar | awk '{for(i=1;i<=$1;i++){print "."}}'` |
adNul=`expr $LEN_CHECK_LIST - $nbVar | awk '{for(i=1;i<=$1;i++){print "."}}'` |
309 |
echo $allargs $adNul |
echo $allargs $adNul |
310 |
else |
else |
311 |
echo $allargs |
echo $allargs |
585 |
RETVAL=8 |
RETVAL=8 |
586 |
ENDVAL=-1 |
ENDVAL=-1 |
587 |
else |
else |
588 |
if test $OUTPUTFILE -ot $EXECUTABLE ; then |
if test ! -f $OUTPUTFILE -o $OUTPUTFILE -ot $EXECUTABLE ; then |
589 |
|
# output do not exist or is older than executable: |
590 |
rm -f run.log ; touch run.log |
rm -f run.log ; touch run.log |
591 |
if test -f run.log_00 ; then cat run.log_00 >> run.log ; fi |
if test -f run.log_00 ; then cat run.log_00 >> run.log ; fi |
592 |
( eval $COMMAND ) >> run.log 2>&1 |
( eval $COMMAND ) >> run.log 2>&1 |
637 |
double a,b,abave,relerr; |
double a,b,abave,relerr; |
638 |
best = -22; |
best = -22; |
639 |
lncnt = 0; |
lncnt = 0; |
640 |
while( 1 & (lncnt+=1) < 999 ) { |
while( 1 & ( (lncnt+=1) < 999 ) ) { |
641 |
scanf("%d", &linnum); |
scanf("%d", &linnum); |
642 |
if (linnum == -1) break; |
if (linnum == -1) break; |
643 |
scanf("%lf", &a); scanf("%lf", &b); |
scanf("%lf", &a); scanf("%lf", &b); |
684 |
listPrt=$@ |
listPrt=$@ |
685 |
listRes=`echo $listPrt | sed 's/>//' | sed 's/<//'` |
listRes=`echo $listPrt | sed 's/>//' | sed 's/<//'` |
686 |
xx=`echo $listPrt | sed 's/.*>//' | sed 's/<.*//' | awk '{print $1}'` |
xx=`echo $listPrt | sed 's/.*>//' | sed 's/<.*//' | awk '{print $1}'` |
687 |
|
printf '%3s' $listPrt |
688 |
|
# line below does not work on hp-ux_ia64 : do those substitutions later on |
689 |
# printf '%3s' $listPrt | sed 's/ 99/ --/g' | sed 's/ > />/' | sed 's/ < /</' |
# printf '%3s' $listPrt | sed 's/ 99/ --/g' | sed 's/ > />/' | sed 's/ < /</' |
|
printf '%3s' $listPrt | sed 's/ 99/ --/g' | sed 's/ > / /' | sed 's/ < / /' |
|
690 |
|
|
691 |
if [ $xx = '..' ]; then |
if [ $xx = '..' ]; then |
692 |
printf ' N/O ' |
printf ' N/O ' |
969 |
if test "x$ADM" != xt ; then |
if test "x$ADM" != xt ; then |
970 |
DEF_CHECK_LIST='PS PS T+ S+ U+ V+ pt1+ pt2+ pt3+ pt4+ pt5+' |
DEF_CHECK_LIST='PS PS T+ S+ U+ V+ pt1+ pt2+ pt3+ pt4+ pt5+' |
971 |
EMPTY_RESULTS='.. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..' |
EMPTY_RESULTS='.. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ..' |
972 |
nbDef=`echo $DEF_CHECK_LIST | awk '{print NF-1+3*gsub("+","E")}'` |
LEN_CHECK_LIST=`echo $DEF_CHECK_LIST | sed 's/ [a-zA-Z0-9]*+/&mn &mx &av &sd/g' | awk '{print NF-1}'` |
973 |
ii=`echo $EMPTY_RESULTS | awk '{print NF}'` |
ii=`echo $EMPTY_RESULTS | awk '{print NF}'` |
974 |
EMPTY_RESULTS=$EMPTY_RESULTS`expr $nbDef - $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 " ."}}'` |
975 |
fi |
fi |
976 |
|
|
977 |
# create the FORTRAN comparison code |
# create the FORTRAN comparison code |
1197 |
if test "x$ADM" = x ; then |
if test "x$ADM" = x ; then |
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" >> $SUMMARY |
echo "$fres" | sed 's/ 99/ --/g' | sed 's/ > />/' | sed 's/ < /</' >> $SUMMARY |
1201 |
touch $CDIR"/summary.txt" |
touch $CDIR"/summary.txt" |
1202 |
echo "fresults='$fres'" >> $CDIR"/summary.txt" |
echo "fresults='$fres'" | sed 's/ 99/ --/g' >> $CDIR"/summary.txt" |
1203 |
echo "MACH='$MACH'" >> $CDIR"/summary.txt" |
echo "MACH='$MACH'" >> $CDIR"/summary.txt" |
1204 |
echo "UNAMEA='$UNAMEA'" >> $CDIR"/summary.txt" |
echo "UNAMEA='$UNAMEA'" >> $CDIR"/summary.txt" |
1205 |
echo "DATE='$DATE'" >> $CDIR"/summary.txt" |
echo "DATE='$DATE'" >> $CDIR"/summary.txt" |
1217 |
linkdata $dir/tr_run.$ex input.$ex input |
linkdata $dir/tr_run.$ex input.$ex input |
1218 |
runmodel $dir/tr_run.$ex && run=Y \ |
runmodel $dir/tr_run.$ex && run=Y \ |
1219 |
&& results=`testoutput_run $dir tr_run.$ex ${ex}".txt"` |
&& results=`testoutput_run $dir tr_run.$ex ${ex}".txt"` |
|
fres=`printf '%s %s %s %s' ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N}` |
|
1220 |
fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results` |
fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results` |
1221 |
fres="$fres.$ex" |
fres="$fres.$ex" |
1222 |
echo |
echo |
1223 |
echo "$fres" >> $SUMMARY |
echo "$fres" | sed 's/ 99/ --/g' | sed 's/ > />/' | sed 's/ < /</' >> $SUMMARY |
1224 |
touch $CDIR"/summary.txt" |
touch $CDIR"/summary.txt" |
1225 |
echo "fresults='$fres'" >> $CDIR"/summary.txt" |
echo "fresults='$fres'" | sed 's/ 99/ --/g' >> $CDIR"/summary.txt" |
1226 |
echo "MACH='$MACH'" >> $CDIR"/summary.txt" |
echo "MACH='$MACH'" >> $CDIR"/summary.txt" |
1227 |
echo "UNAMEA='$UNAMEA'" >> $CDIR"/summary.txt" |
echo "UNAMEA='$UNAMEA'" >> $CDIR"/summary.txt" |
1228 |
echo "DATE='$DATE'" >> $CDIR"/summary.txt" |
echo "DATE='$DATE'" >> $CDIR"/summary.txt" |
1295 |
if test -e tr_out.txt ; then |
if test -e tr_out.txt ; then |
1296 |
mv tr_out.txt tr_out.txt.old |
mv tr_out.txt tr_out.txt.old |
1297 |
fi |
fi |
1298 |
cat $SUMMARY | sed '11,$ s/ \.//g' > tr_out.txt |
cat $SUMMARY | sed '/^[YN] [YN] [YN] [YN]/ s/ \.//g' > tr_out.txt |
1299 |
fi |
fi |
1300 |
|
|
1301 |
if test "x$DELDIR" = xt ; then |
if test "x$DELDIR" = xt ; then |