37 |
echo " (DEF=\"1 2 3 4 5\")" |
echo " (DEF=\"1 2 3 4 5\")" |
38 |
echo " (-j) JOBS use \"make -j JOBS\" for parallel builds" |
echo " (-j) JOBS use \"make -j JOBS\" for parallel builds" |
39 |
echo " (-clean) *ONLY* run \"make CLEAN\"" |
echo " (-clean) *ONLY* run \"make CLEAN\"" |
40 |
echo " (-q|-quick) same as \"-nogenmake -noclean -nodepend\"" |
echo " (-quick|-q) same as \"-nogenmake -noclean -nodepend\"" |
41 |
echo " (-ng|-nogenmake) skip the genmake stage" |
echo " (-nogenmake|-ng) skip the genmake stage" |
42 |
echo " (-nc|-noclean) skip the \"make clean\" stage" |
echo " (-noclean|-nc) skip the \"make clean\" stage" |
43 |
echo " (-nd|-nodepend) skip the \"make depend\" stage" |
echo " (-nodepend|-nd) skip the \"make depend\" stage" |
44 |
echo " (-dd|-deldir) on success, delete the output directory" |
echo " (-deldir|-dd) on success, delete the output directory" |
45 |
|
echo " (-ts) provide timing information per timestep" |
46 |
|
echo " (-papis) provide MFlop/s per timestep using PAPI" |
47 |
|
echo " (-pcls) provide MFlop/s per timestep using PCL" |
48 |
echo |
echo |
49 |
echo "and where STRING can be a whitespace-delimited list" |
echo "and where STRING can be a whitespace-delimited list" |
50 |
echo "such as:" |
echo "such as:" |
155 |
echo "-1" >> tmp3.txt |
echo "-1" >> tmp3.txt |
156 |
# 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 |
157 |
cat tmp3.txt | sed -e 's|:||g' > tmp4.txt |
cat tmp3.txt | sed -e 's|:||g' > tmp4.txt |
158 |
digits_of_similarity=`./tmp_cmpnum < tmp4.txt` |
digits_of_similarity=`./tr_cmpnum < tmp4.txt` |
159 |
if [ $digits_of_similarity -eq 99 ]; then |
if [ $digits_of_similarity -eq 99 ]; then |
160 |
if [ $verbose -gt 0 ]; then |
if [ $verbose -gt 0 ]; then |
161 |
echo testoutput_for_prop: No comparison was available for \"$2\" 1>&2 |
echo testoutput_for_prop: No comparison was available for \"$2\" 1>&2 |
196 |
join t06.txt t16.txt > t6.txt |
join t06.txt t16.txt > t6.txt |
197 |
echo "-1" >> t5.txt |
echo "-1" >> t5.txt |
198 |
echo "-1" >> t6.txt |
echo "-1" >> t6.txt |
199 |
digits_5=`./tmp_cmpnum < t5.txt` |
digits_5=`./tr_cmpnum < t5.txt` |
200 |
digits_6=`./tmp_cmpnum < t6.txt` |
digits_6=`./tr_cmpnum < t6.txt` |
201 |
dashnum $digits_5 $digits_6 |
dashnum $digits_5 $digits_6 |
202 |
rm -f t[01][56].txt t[56].txt |
rm -f t[01][56].txt t[56].txt |
203 |
} |
} |
321 |
if test "x$MPI" = xt ; then |
if test "x$MPI" = xt ; then |
322 |
command="$command -mpi" |
command="$command -mpi" |
323 |
fi |
fi |
324 |
|
if test "x$TS" = xt ; then |
325 |
|
command="$command -ts" |
326 |
|
fi |
327 |
|
if test "x$PAPIS" = xt ; then |
328 |
|
command="$command -papis" |
329 |
|
else |
330 |
|
if test "x$PCLS" = xt ; then |
331 |
|
command="$command -pcls" |
332 |
|
fi |
333 |
|
fi |
334 |
printf 'genmake ... ' 1>&2 |
printf 'genmake ... ' 1>&2 |
335 |
$command > make.log 2>&1 |
$command > make.log 2>&1 |
336 |
RETVAL=$? |
RETVAL=$? |
605 |
# create codelet for comparing model output |
# create codelet for comparing model output |
606 |
|
|
607 |
printf "creating the comparison code... " |
printf "creating the comparison code... " |
608 |
cat > tmp_cmpnum.c <<EOF |
cat > tr_cmpnum.c <<EOF |
609 |
#include <stdio.h> |
#include <stdio.h> |
610 |
#include <math.h> |
#include <math.h> |
611 |
int main( int argc, char** argv ) { |
int main( int argc, char** argv ) { |
612 |
int linnum,best,lncnt; |
int linnum,cmplin,best,lncnt; |
613 |
double a,b,abave,relerr; |
double a,b,abave,relerr; |
614 |
best = -22; |
best = -22; |
615 |
lncnt = 0; |
lncnt = 0; |
618 |
if (linnum == -1) break; |
if (linnum == -1) break; |
619 |
scanf("%lf", &a); scanf("%lf", &b); |
scanf("%lf", &a); scanf("%lf", &b); |
620 |
abave = 0.5*(fabs(a)+fabs(b)); |
abave = 0.5*(fabs(a)+fabs(b)); |
621 |
if (abave > 0.0) { |
if ( abave == abave ) { |
622 |
relerr=fabs(a-b)/abave; |
if (abave > 0.0) { |
623 |
if (relerr > 0.0) { linnum = (int)rint(log10(relerr)); } |
relerr=fabs(a-b)/abave; |
624 |
else { linnum = -16 ; } |
if (relerr > 0.0) { cmplin = (int)rint(log10(relerr)); } |
625 |
best = (best > linnum) ? best : linnum; |
else { cmplin = -16 ; } |
626 |
} |
best = (best > cmplin) ? best : cmplin; } |
627 |
|
else { cmplin = -22 ; } |
628 |
|
/* printf("%d ; %lf ; %lf\n",cmplin,a,b); */ |
629 |
|
} |
630 |
|
else { |
631 |
|
/* printf("%lf ; %lf ; %lf\n",abave,a,b); */ |
632 |
|
break; } |
633 |
} |
} |
634 |
if (lncnt == 999) best=-29; |
if (lncnt == 999) best=-29; |
635 |
|
if (linnum != -1) best=-99; |
636 |
printf("%d\n", -best); |
printf("%d\n", -best); |
637 |
return 0; |
return 0; |
638 |
} |
} |
639 |
EOF |
EOF |
640 |
$CC -o tmp_cmpnum tmp_cmpnum.c -lm |
$CC -o tr_cmpnum tr_cmpnum.c -lm |
641 |
|
|
642 |
if [ -x ./tmp_cmpnum ]; then |
if [ -x ./tr_cmpnum ]; then |
643 |
echo "OK" |
echo "OK" |
644 |
return 0 |
return 0 |
645 |
else |
else |
831 |
|
|
832 |
-deldir | -dd) DELDIR=t ;; |
-deldir | -dd) DELDIR=t ;; |
833 |
|
|
834 |
|
-ts) TS=t;; |
835 |
|
|
836 |
|
-papis) PAPIS=t;; |
837 |
|
|
838 |
|
-pcls) PCL=t;; |
839 |
|
|
840 |
-*) |
-*) |
841 |
echo "Error: unrecognized option: "$ac_option |
echo "Error: unrecognized option: "$ac_option |
842 |
usage |
usage |
1232 |
fi |
fi |
1233 |
fi |
fi |
1234 |
|
|
1235 |
# rm -f tmp_cmpnum.f a.out |
rm -f tr_cmpnum.c tr_cmpnum |
|
rm -f tmp_cmpnum.c tmp_cmpnum |
|
1236 |
|
|
1237 |
if test "x$CLEANUP" != xt ; then |
if test "x$CLEANUP" != xt ; then |
1238 |
cat $SUMMARY | sed 's/ -- -- -- --//g' |
cat $SUMMARY | sed 's/ -- -- -- --//g' |