1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
|
#! /bin/sh
##
## Copyright (C) by Argonne National Laboratory
## See COPYRIGHT in top-level directory
##
if test -z "$AUTORECONF" ; then
AUTORECONF="autoreconf"
fi
echo_n() {
# "echo -n" isn't portable, must portably implement with printf
printf "%s" "$*"
}
check_python3() {
echo_n "Checking for Python 3... "
PYTHON=
python_one_liner="import sys; print(sys.version_info[0])"
PYTHON_PATH=`command -v python`
if test "x$PYTHON_PATH" != x ; then
version=`$PYTHON_PATH -c "$python_one_liner"`
if test "$version" = 3 ; then
PYTHON=$PYTHON_PATH
fi
fi
if test "x$PYTHON" = x ; then
PYTHON_PATH=`command -v python3`
if test "x$PYTHON_PATH" != x ; then
version=`$PYTHON_PATH -c "$python_one_liner"`
if test "$version" = 3 ; then
PYTHON=$PYTHON_PATH
fi
fi
fi
if test -z "$PYTHON" ; then
echo "not found"
exit 1
else
echo "$PYTHON"
fi
}
if test -z "$PYTHON" ; then
check_python3
fi
echo "Generating collective cvar tests"
$PYTHON maint/gen_coll_cvar.py
check_copy() {
name=$1
orig=$2
printf "Checking $name... "
if test ! -e $name ; then
if test -e $orig; then
cp -a $orig $name
echo "copy from $orig"
else
echo "missing"
exit 1
fi
else
echo "found"
fi
}
generate_benchmarks() {
MYDEF_BOOT="$PWD/../../modules/mydef_boot"
if test -d "$MYDEF_BOOT/bin" ; then
echo "Generating benchmark tests"
export PATH="$MYDEF_BOOT/bin:$PATH"
export PERL5LIB="$MYDEF_BOOT/lib/perl5"
export MYDEFLIB="$MYDEF_BOOT/lib/MyDef"
(cd bench && ./autogen.sh)
fi
}
check_copy version.m4 ../../maint/version.m4
check_copy confdb ../../confdb
check_copy dtpools/confdb ../../confdb
# mtest_mpix.h is generated by mpich autogen, specifically, gen_binding_c.py.
# It provides macros that replace upcoming MPI functions with MPIX prefix.
# The tests using these new functions should not be included with
# --enable-strictmpi, an option should be given when testing general MPI
# implementations.
#
# Here we supply an empty stub when this is run outside mpich.
#
if test ! -e include/mtest_mpix.h ; then
touch include/mtest_mpix.h
fi
# Generate the benchmark tests
generate_benchmarks
echo "Running autoreconf in dtpools"
(cd dtpools && $AUTORECONF -vif) || exit 1
# Create and/or update the f90 tests
printf "Create or update the Fortran 90 tests derived from the Fortran 77 tests... "
for dir in f77/* ; do
if [ ! -d $dir ] ; then continue ; fi
leafDir=`basename $dir`
if [ ! -d f90/$leafDir ] ; then
mkdir f90/$leafDir
fi
if maint/f77tof90 $dir f90/$leafDir Makefile.am Makefile.ap ; then
echo "timestamp" > f90/$leafDir/Makefile.am-stamp
else
echo "failed"
error "maint/f77tof90 $dir failed!"
exit 1
fi
done
for dir in errors/f77/* ; do
if [ ! -d $dir ] ; then continue ; fi
leafDir=`basename $dir`
if [ ! -d errors/f90/$leafDir ] ; then
mkdir errors/f90/$leafDir
fi
if maint/f77tof90 $dir errors/f90/$leafDir Makefile.am Makefile.ap ; then
echo "timestamp" > errors/f90/$leafDir/Makefile.am-stamp
else
echo "failed"
error "maint/f77tof90 $dir failed!"
exit 1
fi
done
echo "done"
$PYTHON maint/gen_all_mpitests.py
echo "Running autoreconf in ."
$AUTORECONF -vif || exit 1
|