179 |
return $digits_of_similarity |
return $digits_of_similarity |
180 |
} |
} |
181 |
|
|
|
check_for_add_mon_output() |
|
|
{ |
|
|
# Check for additional types of monitor output |
|
|
if test "x$1" = x ; then |
|
|
return |
|
|
fi |
|
|
|
|
|
for ii in $PTRACERS_NUM ; do |
|
|
eval "HAVE_PTR0"$ii"=f" |
|
|
done |
|
|
|
|
|
ptr_add="trcstat_ptracerXX_min trcstat_ptracerXX_max" |
|
|
ptr_add="$ptr_add trcstat_ptracerXX_mean trcstat_ptracerXX_sd" |
|
|
for ii in $PTRACERS_NUM ; do |
|
|
for jj in $ptr_add ; do |
|
|
name=`eval "echo $jj | sed -e 's|XX|0"$ii"|g'"` |
|
|
tst=`grep $name $1 | wc -l | awk '{print $1}'` |
|
|
if test ! "x$tst" = x0 ; then |
|
|
eval "HAVE_PTR0"$ii"=t" |
|
|
fi |
|
|
done |
|
|
# eval 'echo "HAVE_PTR0'$ii' = $HAVE_PTR0'$ii'"' |
|
|
done |
|
|
} |
|
|
|
|
182 |
testoutput_run() |
testoutput_run() |
183 |
{ |
{ |
184 |
# testoutput_run directory subdir reference_output |
# testoutput_run directory subdir reference_output |
196 |
listVar=`echo $listChk | sed 's/ [a-zA-Z0-9]*+/&mn &mx &av &sd/g' \ |
listVar=`echo $listChk | sed 's/ [a-zA-Z0-9]*+/&mn &mx &av &sd/g' \ |
197 |
| sed 's/+//g' | sed "s/^$sVar//"` |
| sed 's/+//g' | sed "s/^$sVar//"` |
198 |
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 |
199 |
for ii in 1 2 3 4 5 6 7 8 9 ; do |
# check for ptracer output in reference_output file : |
200 |
tst=`eval 'echo "$HAVE_PTR0'$ii'"'` |
outpref=$1/results/$3 |
201 |
#echo "-- ptr test=" $tst "number of var=" `echo $listVar | awk '{print NF}'` 1>&2 |
ptr_mon="trcstat_ptracerXX_min trcstat_ptracerXX_max" |
202 |
if test "x$tst" != xt ; then listVar=`echo "$listVar" | sed "s/ pt$ii..//g"` ; fi |
ptr_mon="$ptr_mon trcstat_ptracerXX_mean trcstat_ptracerXX_sd" |
203 |
done |
for ii in $PTRACERS_NUM ; do |
204 |
tst=`echo $sVar $listVar | awk '{ for(i=2;i<=NF;i++){t+=($i==$1)}; print t }'` |
ptrfound=0 |
205 |
|
for jj in $ptr_mon ; do |
206 |
|
name=`eval "echo $jj | sed -e 's|XX|0"$ii"|g'"` |
207 |
|
tst=`grep $name $outpref | wc -l | awk '{print $1}'` |
208 |
|
if test ! "x$tst" = x0 ; then ptrfound=1 ; fi |
209 |
|
done |
210 |
|
if test $ptrfound = '1' ; then |
211 |
|
eval "HAVE_PTR0"$ii"=t" |
212 |
|
else |
213 |
|
eval "HAVE_PTR0"$ii"=f" |
214 |
|
if test "x$ADM" = x ; then |
215 |
|
# remove this ptr from the list of output variable to check |
216 |
|
# echo "-- ptr test=" $tst "number of var=" `echo $listVar | awk '{print NF}'` 1>&2 |
217 |
|
listVar=`echo "$listVar" | sed "s/ pt$ii..//g"` |
218 |
|
fi |
219 |
|
fi |
220 |
|
# eval 'echo "HAVE_PTR0'$ii' = $HAVE_PTR0'$ii'"' 1>&2 |
221 |
|
done |
222 |
|
tst=`echo $sVar $listVar | awk '{ for(i=2;i<=NF;i++){if($i==$1)t+=1}; print t }'` |
223 |
if test $tst != 1 ; then |
if test $tst != 1 ; then |
224 |
if test $tst = 0 ; then echo "==> WARNING: selected var >$sVar< not found" 1>&2 |
if test $tst = 0 ; then echo "==> WARNING: selected var >$sVar< not found" 1>&2 |
225 |
else echo "==> WARNING: found selected var >$sVar< $tst times" 1>&2 ; fi |
else echo "==> WARNING: found selected var >$sVar< $tst times" 1>&2 ; fi |
756 |
|
|
757 |
ADM= |
ADM= |
758 |
|
|
759 |
# Additional monitor types |
# list of pTracers to check for monitor output |
760 |
PTRACERS_NUM="1 2 3 4 5" |
PTRACERS_NUM="1 2 3 4 5" |
761 |
|
|
762 |
MATCH_CRIT=13 |
MATCH_CRIT=13 |
988 |
|
|
989 |
# Create a uniquely named directory to store results |
# Create a uniquely named directory to store results |
990 |
CMDLINE=$0 |
CMDLINE=$0 |
991 |
for xx in "$@" ; do CMDLINE="$CMDLINE '$xx'" ; done |
for xx in "$@" ; do nw=`echo $xx | wc -w` |
992 |
|
if test $nw = '1' ; then CMDLINE="$CMDLINE $xx" |
993 |
|
else CMDLINE="$CMDLINE '$xx'" ; fi |
994 |
|
done |
995 |
|
#for xx in "$@" ; do CMDLINE="$CMDLINE '$xx'" ; done |
996 |
MACH=`hostname` |
MACH=`hostname` |
997 |
UNAMEA=`uname -a` |
UNAMEA=`uname -a` |
998 |
DATE=`date +%Y%m%d` |
DATE=`date +%Y%m%d` |
1056 |
line_3="N n k u 2 i a a d i a a d i a a d i a a d" |
line_3="N n k u 2 i a a d i a a d i a a d i a a d" |
1057 |
line_4="2 d e n d n x n . n x n . n x n . n x n ." |
line_4="2 d e n d n x n . n x n . n x n . n x n ." |
1058 |
for ii in $PTRACERS_NUM ; do |
for ii in $PTRACERS_NUM ; do |
|
# tst=`eval 'echo $HAVE_PTR0'$ii` |
|
|
# if test "x$tst" = xt ; then |
|
1059 |
line_0="$line_0 --PTR 0"$ii"--" |
line_0="$line_0 --PTR 0"$ii"--" |
1060 |
line_1="$line_1 m s" |
line_1="$line_1 m s" |
1061 |
line_2="$line_2 m m e ." |
line_2="$line_2 m m e ." |
1062 |
line_3="$line_3 i a a d" |
line_3="$line_3 i a a d" |
1063 |
line_4="$line_4 n x n ." |
line_4="$line_4 n x n ." |
|
# fi |
|
1064 |
done |
done |
1065 |
echo "$line_0" | tee -a $SUMMARY |
echo "$line_0" | tee -a $SUMMARY |
1066 |
echo "$line_1" | tee -a $SUMMARY |
echo "$line_1" | tee -a $SUMMARY |
1100 |
# Cleanup only! |
# Cleanup only! |
1101 |
if test "x$CLEANUP" = xt ; then |
if test "x$CLEANUP" = xt ; then |
1102 |
if test -r $BUILD_DIR/Makefile ; then |
if test -r $BUILD_DIR/Makefile ; then |
1103 |
echo ' ------ clean dir:' $dir/build |
echo ' ------ clean dir:' $dir/$builddir |
1104 |
( cd $BUILD_DIR ; make CLEAN ) |
( cd $BUILD_DIR ; make CLEAN ) |
1105 |
fi |
fi |
1106 |
if test -d $dir/$rundir/CVS ; then |
if test -d $dir/$rundir/CVS ; then |
1121 |
echo "can't read \"$fout\" -- skipping $dir" |
echo "can't read \"$fout\" -- skipping $dir" |
1122 |
continue |
continue |
1123 |
fi |
fi |
|
if test "x$ADM" = x ; then |
|
|
check_for_add_mon_output $fout |
|
|
fi |
|
1124 |
|
|
1125 |
# Check for additional types of monitor output |
# Check for specific files for particular type of run |
1126 |
|
|
1127 |
if test ! -r $CODE_DIR"/SIZE.h_mpi" -a "x$MPI" = "xt" ; then |
if test ! -r $CODE_DIR"/SIZE.h_mpi" -a "x$MPI" = "xt" ; then |
1128 |
echo "can't find \"$CODE_DIR/SIZE.h_mpi\" -- skipping $dir" |
echo "can't find \"$CODE_DIR/SIZE.h_mpi\" -- skipping $dir" |