35 |
echo " (DEF=\"hostname\")" |
echo " (DEF=\"hostname\")" |
36 |
echo " (-ptr|-ptracers) STRING specify which ptracers to test" |
echo " (-ptr|-ptracers) STRING specify which ptracers to test" |
37 |
echo " (DEF=\"1 2 3 4 5\")" |
echo " (DEF=\"1 2 3 4 5\")" |
38 |
|
echo " (-match) NUMBER Matching Criteria (number of digits)" |
39 |
|
echo " (DEF=\"12\")" |
40 |
echo " (-j) JOBS use \"make -j JOBS\" for parallel builds" |
echo " (-j) JOBS use \"make -j JOBS\" for parallel builds" |
41 |
echo " (-clean) *ONLY* run \"make CLEAN\"" |
echo " (-clean) *ONLY* run \"make CLEAN\"" |
42 |
echo " (-q|-quick) same as \"-nogenmake -noclean -nodepend\"" |
echo " (-quick|-q) same as \"-nogenmake -noclean -nodepend\"" |
43 |
echo " (-ng|-nogenmake) skip the genmake stage" |
echo " (-nogenmake|-ng) skip the genmake stage" |
44 |
echo " (-nc|-noclean) skip the \"make clean\" stage" |
echo " (-noclean|-nc) skip the \"make clean\" stage" |
45 |
echo " (-nd|-nodepend) skip the \"make depend\" stage" |
echo " (-nodepend|-nd) skip the \"make depend\" stage" |
46 |
echo " (-dd|-deldir) on success, delete the output directory" |
echo " (-deldir|-dd) on success, delete the output directory" |
47 |
|
echo " (-ts) provide timing information per timestep" |
48 |
|
echo " (-papis) provide MFlop/s per timestep using PAPI" |
49 |
|
echo " (-pcls) provide MFlop/s per timestep using PCL" |
50 |
echo |
echo |
51 |
echo "and where STRING can be a whitespace-delimited list" |
echo "and where STRING can be a whitespace-delimited list" |
52 |
echo "such as:" |
echo "such as:" |
157 |
echo "-1" >> tmp3.txt |
echo "-1" >> tmp3.txt |
158 |
# On the SGI O3K (*not* the O2K), "cat -n" inserts a ":" after the line number |
# On the SGI O3K (*not* the O2K), "cat -n" inserts a ":" after the line number |
159 |
cat tmp3.txt | sed -e 's|:||g' > tmp4.txt |
cat tmp3.txt | sed -e 's|:||g' > tmp4.txt |
160 |
digits_of_similarity=`./tmp_cmpnum < tmp4.txt` |
digits_of_similarity=`./tr_cmpnum < tmp4.txt` |
161 |
if [ $digits_of_similarity -eq 99 ]; then |
if [ $digits_of_similarity -eq 99 ]; then |
162 |
if [ $verbose -gt 0 ]; then |
if [ $verbose -gt 0 ]; then |
163 |
echo testoutput_for_prop: No comparison was available for \"$2\" 1>&2 |
echo testoutput_for_prop: No comparison was available for \"$2\" 1>&2 |
198 |
join t06.txt t16.txt > t6.txt |
join t06.txt t16.txt > t6.txt |
199 |
echo "-1" >> t5.txt |
echo "-1" >> t5.txt |
200 |
echo "-1" >> t6.txt |
echo "-1" >> t6.txt |
201 |
digits_5=`./tmp_cmpnum < t5.txt` |
digits_5=`./tr_cmpnum < t5.txt` |
202 |
digits_6=`./tmp_cmpnum < t6.txt` |
digits_6=`./tr_cmpnum < t6.txt` |
203 |
dashnum $digits_5 $digits_6 |
dashnum $digits_5 $digits_6 |
204 |
rm -f t[01][56].txt t[56].txt |
rm -f t[01][56].txt t[56].txt |
205 |
} |
} |
323 |
if test "x$MPI" = xt ; then |
if test "x$MPI" = xt ; then |
324 |
command="$command -mpi" |
command="$command -mpi" |
325 |
fi |
fi |
326 |
|
if test "x$TS" = xt ; then |
327 |
|
command="$command -ts" |
328 |
|
fi |
329 |
|
if test "x$PAPIS" = xt ; then |
330 |
|
command="$command -papis" |
331 |
|
else |
332 |
|
if test "x$PCLS" = xt ; then |
333 |
|
command="$command -pcls" |
334 |
|
fi |
335 |
|
fi |
336 |
printf 'genmake ... ' 1>&2 |
printf 'genmake ... ' 1>&2 |
337 |
$command > make.log 2>&1 |
$command > make.log 2>&1 |
338 |
RETVAL=$? |
RETVAL=$? |
607 |
# create codelet for comparing model output |
# create codelet for comparing model output |
608 |
|
|
609 |
printf "creating the comparison code... " |
printf "creating the comparison code... " |
610 |
cat > tmp_cmpnum.c <<EOF |
cat > tr_cmpnum.c <<EOF |
611 |
#include <stdio.h> |
#include <stdio.h> |
612 |
#include <math.h> |
#include <math.h> |
613 |
int main( int argc, char** argv ) { |
int main( int argc, char** argv ) { |
614 |
int linnum,best,lncnt; |
int linnum,cmplin,best,lncnt; |
615 |
double a,b,abave,relerr; |
double a,b,abave,relerr; |
616 |
best = -22; |
best = -22; |
617 |
lncnt = 0; |
lncnt = 0; |
620 |
if (linnum == -1) break; |
if (linnum == -1) break; |
621 |
scanf("%lf", &a); scanf("%lf", &b); |
scanf("%lf", &a); scanf("%lf", &b); |
622 |
abave = 0.5*(fabs(a)+fabs(b)); |
abave = 0.5*(fabs(a)+fabs(b)); |
623 |
if (abave > 0.0) { |
if ( abave == abave ) { |
624 |
relerr=fabs(a-b)/abave; |
if (abave > 0.0) { |
625 |
if (relerr > 0.0) { linnum = (int)rint(log10(relerr)); } |
relerr=fabs(a-b)/abave; |
626 |
else { linnum = -16 ; } |
if (relerr > 0.0) { cmplin = (int)rint(log10(relerr)); } |
627 |
best = (best > linnum) ? best : linnum; |
else { cmplin = -16 ; } |
628 |
} |
best = (best > cmplin) ? best : cmplin; } |
629 |
|
else { cmplin = -22 ; } |
630 |
|
/* printf("%d ; %lf ; %lf\n",cmplin,a,b); */ |
631 |
|
} |
632 |
|
else { |
633 |
|
/* printf("%lf ; %lf ; %lf\n",abave,a,b); */ |
634 |
|
break; } |
635 |
} |
} |
636 |
if (lncnt == 999) best=-29; |
if (lncnt == 999) best=-29; |
637 |
|
if (linnum != -1) best=-99; |
638 |
printf("%d\n", -best); |
printf("%d\n", -best); |
639 |
return 0; |
return 0; |
640 |
} |
} |
641 |
EOF |
EOF |
642 |
$CC -o tmp_cmpnum tmp_cmpnum.c -lm |
$CC -o tr_cmpnum tr_cmpnum.c -lm |
643 |
|
|
644 |
if [ -x ./tmp_cmpnum ]; then |
if [ -x ./tr_cmpnum ]; then |
645 |
echo "OK" |
echo "OK" |
646 |
return 0 |
return 0 |
647 |
else |
else |
664 |
if [ $1 = '--' ]; then |
if [ $1 = '--' ]; then |
665 |
printf ' N/O ' |
printf ' N/O ' |
666 |
else |
else |
667 |
if [ $1 -gt 12 ]; then |
if [ $1 -ge $MATCH_CRIT ]; then |
668 |
printf ' pass' |
printf ' pass' |
669 |
else |
else |
670 |
printf ' FAIL' |
printf ' FAIL' |
736 |
# Additional monitor types |
# Additional monitor types |
737 |
PTRACERS_NUM="1 2 3 4 5" |
PTRACERS_NUM="1 2 3 4 5" |
738 |
|
|
739 |
|
MATCH_CRIT=13 |
740 |
|
|
741 |
printf "parsing options... " |
printf "parsing options... " |
742 |
|
|
743 |
ac_prev= |
ac_prev= |
802 |
-ptracers=* | --ptracers=* | -ptr=* | --ptr=*) |
-ptracers=* | --ptracers=* | -ptr=* | --ptr=*) |
803 |
PTRACERS_NUM=$ac_optarg ;; |
PTRACERS_NUM=$ac_optarg ;; |
804 |
|
|
805 |
|
-match | --match ) ac_prev=MATCH_CRIT ;; |
806 |
|
-match=* | --match=* ) MATCH_CRIT=$ac_optarg ;; |
807 |
|
|
808 |
-j) ac_prev=JOBS ;; |
-j) ac_prev=JOBS ;; |
809 |
-j=*) JOBS=$ac_optarg ;; |
-j=*) JOBS=$ac_optarg ;; |
810 |
|
|
838 |
|
|
839 |
-deldir | -dd) DELDIR=t ;; |
-deldir | -dd) DELDIR=t ;; |
840 |
|
|
841 |
|
-ts) TS=t;; |
842 |
|
|
843 |
|
-papis) PAPIS=t;; |
844 |
|
|
845 |
|
-pcls) PCL=t;; |
846 |
|
|
847 |
-*) |
-*) |
848 |
echo "Error: unrecognized option: "$ac_option |
echo "Error: unrecognized option: "$ac_option |
849 |
usage |
usage |
994 |
echo |
echo |
995 |
echo >> $SUMMARY |
echo >> $SUMMARY |
996 |
if test "x$ADM" = x ; then |
if test "x$ADM" = x ; then |
997 |
line_0=" ----T----- ----S----- ----U----- ----V-----" |
if [ $MATCH_CRIT -lt 10 ] ; |
998 |
|
then line_0=" "$MATCH_CRIT ; |
999 |
|
else line_0=" "$MATCH_CRIT ; fi |
1000 |
|
line_0=" $line_0 ----T----- ----S----- ----U----- ----V-----" |
1001 |
|
# line_0=" ----T----- ----S----- ----U----- ----V-----" |
1002 |
line_1="G D M c m s m s m s m s" |
line_1="G D M c m s m s m s m s" |
1003 |
line_2="E p a R g m m e . m m e . m m e . m m e ." |
line_2="E p a R g m m e . m m e . m m e . m m e ." |
1004 |
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" |
1243 |
fi |
fi |
1244 |
fi |
fi |
1245 |
|
|
1246 |
# rm -f tmp_cmpnum.f a.out |
rm -f tr_cmpnum.c tr_cmpnum |
|
rm -f tmp_cmpnum.c tmp_cmpnum |
|
1247 |
|
|
1248 |
if test "x$CLEANUP" != xt ; then |
if test "x$CLEANUP" != xt ; then |
1249 |
cat $SUMMARY | sed 's/ -- -- -- --//g' |
cat $SUMMARY | sed 's/ -- -- -- --//g' |