416 |
expts='' |
expts='' |
417 |
# ieee=1 |
# ieee=1 |
418 |
|
|
|
QUICK=f |
|
419 |
CLEANUP=f |
CLEANUP=f |
420 |
|
QUICK=f |
421 |
NOGENMAKE=f |
NOGENMAKE=f |
422 |
NOCLEAN=f |
NOCLEAN=f |
423 |
NODEPEND=f |
NODEPEND=f |
428 |
TESTDIRS= |
TESTDIRS= |
429 |
MPACKDIR="../tools/mpack-1.6" |
MPACKDIR="../tools/mpack-1.6" |
430 |
MPACK="$MPACKDIR/mpack" |
MPACK="$MPACKDIR/mpack" |
431 |
COMMAND="rm -f output.txt; make output.txt" |
COMMAND="make output.txt" |
432 |
MAKE=make |
MAKE=make |
433 |
MPI=f |
MPI=f |
434 |
|
|
481 |
-make=* | --make=*) |
-make=* | --make=*) |
482 |
MAKE=$ac_optarg ;; |
MAKE=$ac_optarg ;; |
483 |
|
|
484 |
|
-clean | --clean) |
485 |
|
CLEANUP=t ;; |
486 |
|
|
487 |
-quick | --quick | -q | --q) |
-quick | --quick | -q | --q) |
488 |
QUICK=t ;; |
QUICK=t ;; |
489 |
-nogenmake | --nogenmake | -ng | --ng) |
-nogenmake | --nogenmake | -ng | --ng) |
586 |
# ...and each test directory... |
# ...and each test directory... |
587 |
for dir in $TESTDIRS ; do |
for dir in $TESTDIRS ; do |
588 |
|
|
589 |
|
# Cleanup only! |
590 |
|
if test "x$CLEANUP" = xt ; then |
591 |
|
if test -r $dir/build/Makefile ; then |
592 |
|
( cd $dir/build ; make CLEAN ) |
593 |
|
fi |
594 |
|
if test -r $dir/input/Makefile ; then |
595 |
|
( cd $dir/input ; make CLEAN ) |
596 |
|
fi |
597 |
|
continue |
598 |
|
fi |
599 |
|
|
600 |
# Verify that the testdir exists and contains previous |
# Verify that the testdir exists and contains previous |
601 |
# results in the correct location--or skip this directory! |
# results in the correct location--or skip this directory! |
602 |
if test ! -r $dir"/results/output.txt" ; then |
if test ! -r $dir"/results/output.txt" ; then |
603 |
echo | tee -a $SUMMARY |
echo |
604 |
echo "can't read \"$dir/results/output.txt\" -- skipping $dir" \ |
echo "can't read \"$dir/results/output.txt\" -- skipping $dir" |
605 |
| tee -a $SUMMARY |
echo |
606 |
continue |
continue |
607 |
fi |
fi |
608 |
|
|
|
# Is this an MPI run? |
|
|
if test "x$MPI" = xt ; then |
|
|
if test ! -r $dir"/code/CPP_EEOPTIONS.h_mpi" -o ! -r $dir"/code/SIZE.h_mpi" ; then |
|
|
echo | tee -a $SUMMARY |
|
|
echo "can't read \"$dir/code/CPP_EEOPTIONS.h_mpi\" or \"$dir/code/SIZE.h_mpi\"" \ |
|
|
| tee -a $SUMMARY |
|
|
continue |
|
|
else |
|
|
cp $dir"/code/CPP_EEOPTIONS.h_mpi" $dir"/code/CPP_EEOPTIONS.h" |
|
|
cp $dir"/code/SIZE.h_mpi" $dir"/code/SIZE.h" |
|
|
fi |
|
|
else |
|
|
if test -r $dir"/code/CPP_EEOPTIONS.h_nompi" ; then |
|
|
cp $dir"/code/CPP_EEOPTIONS.h_nompi" $dir"/code/CPP_EEOPTIONS.h" |
|
|
fi |
|
|
if test -r $dir"/code/SIZE.h_nompi" ; then |
|
|
cp $dir"/code/SIZE.h_nompi" $dir"/code/SIZE.h" |
|
|
fi |
|
|
fi |
|
|
|
|
|
# Create an output dir for each OPTFILE/tdir combination |
|
|
CDIR=$DRESULTS"/"$DRESULTS"_"$NDIR |
|
|
mkdir $CDIR |
|
|
CDIR=`pwd`"/$CDIR" |
|
|
|
|
|
# ...configue, make, run, and compare the output. |
|
609 |
echo "-------------------------------------------------------------------------------" |
echo "-------------------------------------------------------------------------------" |
610 |
echo |
echo |
611 |
echo "Experiment: $dir" |
echo "Experiment: $dir" |
624 |
rundir=input |
rundir=input |
625 |
fi |
fi |
626 |
|
|
627 |
|
CODE_DIR=$dir/code |
628 |
|
BUILD_DIR=$dir/$builddir |
629 |
|
MPI_FILES="CPP_EEOPTIONS.h_mpi SIZE.h_mpi" |
630 |
|
NOMPI_FILES="CPP_EEOPTIONS.h_nompi SIZE.h_nompi" |
631 |
|
# Is this an MPI run? |
632 |
|
if test "x$MPI" = xt ; then |
633 |
|
FILES=$MPI_FILES |
634 |
|
else |
635 |
|
FILES=$NOMPI_FILES |
636 |
|
fi |
637 |
|
|
638 |
|
# Check to see that we have the files |
639 |
|
have_files=t |
640 |
|
for i in $FILES ; do |
641 |
|
if test ! -r $CODE_DIR/$i ; then |
642 |
|
echo "Warning: can't read file $CODE_DIR/$i" | tee -a $SUMMARY |
643 |
|
have_files=f |
644 |
|
fi |
645 |
|
done |
646 |
|
if test "x$have_files" != xt -a "x$MPI" = xt ; then |
647 |
|
echo "Skipping $dir due to lack of input files (see above warning)" \ |
648 |
|
| tee -a $SUMMARY |
649 |
|
continue |
650 |
|
fi |
651 |
|
|
652 |
|
# If we have the $FILES and they differ, copy the $FILES to $BUILD_DIR |
653 |
|
if "x$have_files" = xt ; then |
654 |
|
for i in $FILES ; do |
655 |
|
cmp $CODE_DIR/$i $BUILD_DIR/$i > /dev/null 2>&1 |
656 |
|
RETVAL=$? |
657 |
|
if test "x$RETVAL" != x0 ; then |
658 |
|
cp $CODE_DIR/$i $BUILD_DIR/$i |
659 |
|
fi |
660 |
|
done |
661 |
|
fi |
662 |
|
|
663 |
|
# Create an output dir for each OPTFILE/tdir combination |
664 |
|
CDIR=$DRESULTS"/"$DRESULTS"_"$NDIR |
665 |
|
mkdir $CDIR |
666 |
|
CDIR=`pwd`"/$CDIR" |
667 |
|
|
668 |
if test "x$CLEANUP" = xt ; then |
if test "x$CLEANUP" = xt ; then |
669 |
makeclean $dir/$builddir |
makeclean $dir/$builddir |
670 |
else |
else |