|
Packit Service |
c5cf8c |
#! /bin/sh
|
|
Packit Service |
c5cf8c |
#
|
|
Packit Service |
c5cf8c |
# Get coverage information for mpich
|
|
Packit Service |
c5cf8c |
#
|
|
Packit Service |
c5cf8c |
#set -x
|
|
Packit Service |
c5cf8c |
# The default approach is to prepare the coverage for this MPICH
|
|
Packit Service |
c5cf8c |
# distribution and to place the coverage web pages into a
|
|
Packit Service |
c5cf8c |
# (mpichsrc)/www/coverage
|
|
Packit Service |
c5cf8c |
srcdir=/tmp/BuGuYkQogF/mpich-3.3.2
|
|
Packit Service |
c5cf8c |
tsuites=$srcdir/tests/mpi
|
|
Packit Service |
c5cf8c |
weblocbase=$srcdir/www/coverage
|
|
Packit Service |
c5cf8c |
weblocprefix=""
|
|
Packit Service |
c5cf8c |
blddir=/tmp/$LOGNAME/mpich-cov
|
|
Packit Service |
c5cf8c |
mpiinstalldir=/tmp/$LOGNAME/mpich-cinst
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
logfile=""
|
|
Packit Service |
c5cf8c |
#pm=gforker
|
|
Packit Service |
c5cf8c |
pm=hydra
|
|
Packit Service |
c5cf8c |
# device and channel
|
|
Packit Service |
c5cf8c |
# (we'll also want this to be in the path)
|
|
Packit Service |
c5cf8c |
device="ch3:sock"
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
test_intel=yes
|
|
Packit Service |
c5cf8c |
test_mpich=yes
|
|
Packit Service |
c5cf8c |
test_mpich1=yes
|
|
Packit Service |
c5cf8c |
test_cxx=yes
|
|
Packit Service |
c5cf8c |
test_io=yes
|
|
Packit Service |
c5cf8c |
testNames="intel mpich1 mpich cxx io"
|
|
Packit Service |
c5cf8c |
build_mpich=yes
|
|
Packit Service |
c5cf8c |
alltest=yes
|
|
Packit Service |
c5cf8c |
update_web=yes
|
|
Packit Service |
c5cf8c |
quiet=no
|
|
Packit Service |
c5cf8c |
#
|
|
Packit Service |
c5cf8c |
# Process args to see if we are running only a subset of the steps,
|
|
Packit Service |
c5cf8c |
# for example, to rerun a test suite
|
|
Packit Service |
c5cf8c |
for arg ; do
|
|
Packit Service |
c5cf8c |
# Extract option, if any
|
|
Packit Service |
c5cf8c |
case $arg in
|
|
Packit Service |
c5cf8c |
*=*)
|
|
Packit Service |
c5cf8c |
option=`echo A$arg | sed -e 's/^[^=]*=//'`
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
*)
|
|
Packit Service |
c5cf8c |
option=""
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
esac
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
case $arg in
|
|
Packit Service |
c5cf8c |
-nobuild)
|
|
Packit Service |
c5cf8c |
build_mpich=no
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
-quiet)
|
|
Packit Service |
c5cf8c |
quiet=yes
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
-logfile=*)
|
|
Packit Service |
c5cf8c |
logfile=$option
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
-srcdir=*)
|
|
Packit Service |
c5cf8c |
srcdir=$option
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
-device=*)
|
|
Packit Service |
c5cf8c |
device=$option
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
-pm=*)
|
|
Packit Service |
c5cf8c |
pm=$option
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
-test=*)
|
|
Packit Service |
c5cf8c |
if [ $alltest = yes ] ; then
|
|
Packit Service |
c5cf8c |
alltest=no
|
|
Packit Service |
c5cf8c |
test_intel=no
|
|
Packit Service |
c5cf8c |
test_mpich1=no
|
|
Packit Service |
c5cf8c |
test_mpich=no
|
|
Packit Service |
c5cf8c |
test_io=no
|
|
Packit Service |
c5cf8c |
test_cxx=no
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
name=`echo A$arg | sed -e 's/A-test=//'`
|
|
Packit Service |
c5cf8c |
eval test_$name=yes
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
-notest=*)
|
|
Packit Service |
c5cf8c |
# Turn off just one test
|
|
Packit Service |
c5cf8c |
alltest=no
|
|
Packit Service |
c5cf8c |
name=`echo A$arg | sed -e 's/A-notest=//'`
|
|
Packit Service |
c5cf8c |
eval test_$name=no
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
-notest)
|
|
Packit Service |
c5cf8c |
alltest=no
|
|
Packit Service |
c5cf8c |
test_intel=no
|
|
Packit Service |
c5cf8c |
test_mpich1=no
|
|
Packit Service |
c5cf8c |
test_mpich=no
|
|
Packit Service |
c5cf8c |
test_io=no
|
|
Packit Service |
c5cf8c |
test_cxx=no
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
-blddir=*)
|
|
Packit Service |
c5cf8c |
blddir=`echo A$arg | sed -e 's/A-blddir=//'`
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
-noupdateweb)
|
|
Packit Service |
c5cf8c |
update_web=no
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
-updateweb)
|
|
Packit Service |
c5cf8c |
update_web=yes
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
-webdir)
|
|
Packit Service |
c5cf8c |
weblocbase=$option
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
-help)
|
|
Packit Service |
c5cf8c |
cat <
|
|
Packit Service |
c5cf8c |
createcoverage [ -srcdir=sourcedir ] [ -blddir=builddir ]
|
|
Packit Service |
c5cf8c |
[ -test=onetest ] [ -notest=skiptest ]
|
|
Packit Service |
c5cf8c |
[ -device=device ] [ -nobuild ] [ -quiet ] [ -pm=pm ]
|
|
Packit Service |
c5cf8c |
[ -[no]updateweb ] [ -webdir=webdir ]
|
|
Packit Service |
c5cf8c |
sourcedir - Directory containing the source for MPICH.
|
|
Packit Service |
c5cf8c |
Default is $srcdir
|
|
Packit Service |
c5cf8c |
blddir - Directory where the coverage tests should be built.
|
|
Packit Service |
c5cf8c |
Default is $blddir
|
|
Packit Service |
c5cf8c |
onetest - Run only this test suite. Available tests are
|
|
Packit Service |
c5cf8c |
$testNames
|
|
Packit Service |
c5cf8c |
skiptest - Skip this test suite.
|
|
Packit Service |
c5cf8c |
device - Device to test. Default is $device
|
|
Packit Service |
c5cf8c |
pm - Select the process manager. Default is $pm
|
|
Packit Service |
c5cf8c |
-updateweb - Update the web page containing the single file listing
|
|
Packit Service |
c5cf8c |
at $weblocbase/$device/coverage.txt
|
|
Packit Service |
c5cf8c |
webdir - Directory into which to place the web pages.
|
|
Packit Service |
c5cf8c |
The default is $weblocbase
|
|
Packit Service |
c5cf8c |
(the final directory is webdir/$device ).
|
|
Packit Service |
c5cf8c |
EOF
|
|
Packit Service |
c5cf8c |
exit 1;
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
*)
|
|
Packit Service |
c5cf8c |
echo "Argument $arg unrecognized"
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
esac
|
|
Packit Service |
c5cf8c |
done
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# Move everthing into a device-specific directory
|
|
Packit Service |
c5cf8c |
webloc="$weblocbase/$device"
|
|
Packit Service |
c5cf8c |
if [ "$update_web" = yes ] ; then
|
|
Packit Service |
c5cf8c |
if [ ! -d $webloc ] ; then mkdir -p $webloc ; fi
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
#
|
|
Packit Service |
c5cf8c |
# Set the derived directories
|
|
Packit Service |
c5cf8c |
annotedir=$webloc
|
|
Packit Service |
c5cf8c |
if [ -n "$weblocprefix" ] ; then
|
|
Packit Service |
c5cf8c |
# Only add device to the location if we are not using relative paths
|
|
Packit Service |
c5cf8c |
# for the web pages
|
|
Packit Service |
c5cf8c |
annotewebprefix="$weblocprefix/$device"
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
annoteindex=$webloc/index.htm
|
|
Packit Service |
c5cf8c |
# Locations of the test directories
|
|
Packit Service |
c5cf8c |
mpichsrcdir=$srcdir/Test/mpi
|
|
Packit Service |
c5cf8c |
intelsrcdir=$tsuites/IntelMPITEST
|
|
Packit Service |
c5cf8c |
mpich1srcdir=$tsuites/mpich1test
|
|
Packit Service |
c5cf8c |
cxxsrcdir=$tsuites/mpicxxtest
|
|
Packit Service |
c5cf8c |
iosrcdir=$tsuites/Testmpio
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# For each of the tests selected, turn off those for which the
|
|
Packit Service |
c5cf8c |
# test source directories are not available
|
|
Packit Service |
c5cf8c |
for test in $testNames ; do
|
|
Packit Service |
c5cf8c |
eval t="test_$test"
|
|
Packit Service |
c5cf8c |
eval tval=\$$t
|
|
Packit Service |
c5cf8c |
if [ "$tval" = yes ] ; then
|
|
Packit Service |
c5cf8c |
eval tloc=\$${test}srcdir
|
|
Packit Service |
c5cf8c |
if [ ! -d "$tloc" ] ; then
|
|
Packit Service |
c5cf8c |
echo "Turning off test $test because test source directory $tloc is not available"
|
|
Packit Service |
c5cf8c |
eval $t=no
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
done
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# Compute the appropriate device directories
|
|
Packit Service |
c5cf8c |
# Base directories
|
|
Packit Service |
c5cf8c |
case $device in
|
|
Packit Service |
c5cf8c |
ch3|ch3:nemesis)
|
|
Packit Service |
c5cf8c |
devsrcdirs="src/mpid/ch3/channels/nemesis/src src/mpid/ch3/src src/mpid/ch3/channels/nemesis/netmod/tcp src/mpid/ch3/channels/nemesis/netmod/none"
|
|
Packit Service |
c5cf8c |
extra_opts="$extra_opts --enable-nemesis-dbg-localoddeven"
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
ch3:sock)
|
|
Packit Service |
c5cf8c |
devsrcdirs="src/mpid/ch3/channels/sock/src src/mpid/ch3/src src/mpid/common/sock/poll src/mpid/ch3/util/sock"
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
ch3*)
|
|
Packit Service |
c5cf8c |
devsrcdirs="src/mpid/ch3/src"
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
*)
|
|
Packit Service |
c5cf8c |
if [ -d "$srcdir/src/mpid/$device" ] ; then
|
|
Packit Service |
c5cf8c |
devsrcdirs="src/mpid/$device"
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
esac
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# Set a timeout for mpiexec just in case
|
|
Packit Service |
c5cf8c |
MPIEXEC_TIMEOUT=180
|
|
Packit Service |
c5cf8c |
export MPIEXEC_TIMEOUT
|
|
Packit Service |
c5cf8c |
#
|
|
Packit Service |
c5cf8c |
# We use fd 6 to redirect output. If we have selected "-quiet", this
|
|
Packit Service |
c5cf8c |
# sends stdout to /dev/null
|
|
Packit Service |
c5cf8c |
if [ "$quiet" = yes ] ; then
|
|
Packit Service |
c5cf8c |
exec 6>/dev/null
|
|
Packit Service |
c5cf8c |
elif [ -n "$logfile" ] ; then
|
|
Packit Service |
c5cf8c |
exec 6>$logfile
|
|
Packit Service |
c5cf8c |
else
|
|
Packit Service |
c5cf8c |
set -x
|
|
Packit Service |
c5cf8c |
exec 6>&1
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
if [ ! -d $blddir ] ; then
|
|
Packit Service |
c5cf8c |
# Try to build it
|
|
Packit Service |
c5cf8c |
mkdir $blddir
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
if [ ! -d $blddir ] ; then
|
|
Packit Service |
c5cf8c |
echo "$blddir does not exist"
|
|
Packit Service |
c5cf8c |
echo "Create it and rerun this script"
|
|
Packit Service |
c5cf8c |
exit 1
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# Build with the coverage options
|
|
Packit Service |
c5cf8c |
if [ $build_mpich = yes ] ; then
|
|
Packit Service |
c5cf8c |
echo "------ Build MPICH ------" >&6
|
|
Packit Service |
c5cf8c |
cd $blddir
|
|
Packit Service |
c5cf8c |
$srcdir/configure --enable-coverage --with-pm=$pm --enable-romio \
|
|
Packit Service |
c5cf8c |
--with-device=$device \
|
|
Packit Service |
c5cf8c |
-prefix=$mpiinstalldir $extra_opts >&6 2>&6
|
|
Packit Service |
c5cf8c |
rc=$?
|
|
Packit Service |
c5cf8c |
if [ "$rc" != 0 ] ; then
|
|
Packit Service |
c5cf8c |
echo "$srcdir/configure failed with return code $rc"
|
|
Packit Service |
c5cf8c |
exit 1
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
make clean >&6 2>&6
|
|
Packit Service |
c5cf8c |
# Make sure that we clean away any old results
|
|
Packit Service |
c5cf8c |
find . -name '*.bb' -o -name '*.bbg' -o -name '*.da' -print | \
|
|
Packit Service |
c5cf8c |
xargs -r rm -f
|
|
Packit Service |
c5cf8c |
find . -name '*.gcov' -print | xargs -r rm -f
|
|
Packit Service |
c5cf8c |
rm -f lib/*
|
|
Packit Service |
c5cf8c |
make >&6 2>&6
|
|
Packit Service |
c5cf8c |
rc=$?
|
|
Packit Service |
c5cf8c |
if [ "$rc" != 0 ] ; then
|
|
Packit Service |
c5cf8c |
echo "Make step failed with return code $rc"
|
|
Packit Service |
c5cf8c |
exit 1
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
echo "------ Install MPICH ------" >&6
|
|
Packit Service |
c5cf8c |
make install >&6 2>&6
|
|
Packit Service |
c5cf8c |
rc=$?
|
|
Packit Service |
c5cf8c |
if [ "$rc" != 0 ] ; then
|
|
Packit Service |
c5cf8c |
echo "Make install step failed with return code $rc"
|
|
Packit Service |
c5cf8c |
exit 1
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
echo "------ End of Install MPICH ------" >&6
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
#
|
|
Packit Service |
c5cf8c |
# Run the tests
|
|
Packit Service |
c5cf8c |
if [ $test_mpich = yes ] ; then
|
|
Packit Service |
c5cf8c |
# The mpich tests are easy
|
|
Packit Service |
c5cf8c |
echo "------ Run MPICH Tests ------" >&6
|
|
Packit Service |
c5cf8c |
cd $blddir
|
|
Packit Service |
c5cf8c |
make testing >&6 2>&6
|
|
Packit Service |
c5cf8c |
echo "------ End Run MPICH Tests ------" >&6
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
if [ ! -d $blddir/othertest ] ; then
|
|
Packit Service |
c5cf8c |
mkdir $blddir/othertest
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
for dir in intel cxx mpich1 Testmpio ; do
|
|
Packit Service |
c5cf8c |
if [ ! -d $blddir/othertest/$dir ] ; then
|
|
Packit Service |
c5cf8c |
mkdir $blddir/othertest/$dir
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
done
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
if [ $test_intel = yes ] ; then
|
|
Packit Service |
c5cf8c |
echo "------ Run Intel Tests ------" >&6
|
|
Packit Service |
c5cf8c |
# The intel tests aren't hard
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
cd $blddir/othertest/intel
|
|
Packit Service |
c5cf8c |
$intelsrcdir/configure --enable-coverage \
|
|
Packit Service |
c5cf8c |
--with-mpich=$mpiinstalldir >&6 2>&6
|
|
Packit Service |
c5cf8c |
make clean >&6 2>&6
|
|
Packit Service |
c5cf8c |
make testing >&6 2>&6
|
|
Packit Service |
c5cf8c |
echo "------ End Run Intel Tests ------" >&6
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
if [ $test_cxx = yes ] ; then
|
|
Packit Service |
c5cf8c |
echo "------ Run C++ Tests ------" >&6
|
|
Packit Service |
c5cf8c |
# Neither are the cxx test
|
|
Packit Service |
c5cf8c |
# Build mpicxxtest --enable-coverage (still need to implement)
|
|
Packit Service |
c5cf8c |
cd $blddir/othertest/cxx
|
|
Packit Service |
c5cf8c |
$cxxsrcdir/configure --enable-coverage --with-mpich=$mpiinstalldir \
|
|
Packit Service |
c5cf8c |
--enable-xml >&6 2>&6
|
|
Packit Service |
c5cf8c |
make clean >&6 2>&6
|
|
Packit Service |
c5cf8c |
make testing >&6 2>&6
|
|
Packit Service |
c5cf8c |
echo "------ End Run C++ Tests ------" >&6
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
if [ $test_io = yes ] ; then
|
|
Packit Service |
c5cf8c |
echo "------ Run MPI-IO Tests ------" >&6
|
|
Packit Service |
c5cf8c |
# These tests do not even have a configure or make!
|
|
Packit Service |
c5cf8c |
cd $blddir/othertest/Testmpio
|
|
Packit Service |
c5cf8c |
$mpiinstalldir/bin/mpicc -o testmpio $iosrcdir/testmpio.c >&6 2>&6
|
|
Packit Service |
c5cf8c |
if [ ! -x testmpio ] ; then
|
|
Packit Service |
c5cf8c |
echo "Unable to build MPI-IO test testmpio. See log file $logfile for reason (build attempted in $blddir/othertest/Testmpio)"
|
|
Packit Service |
c5cf8c |
else
|
|
Packit Service |
c5cf8c |
if [ ! -d t1 ] ; then mkdir t1 ; fi
|
|
Packit Service |
c5cf8c |
MPIO_USER_PATH=`pwd`/t1
|
|
Packit Service |
c5cf8c |
export MPIO_USER_PATH
|
|
Packit Service |
c5cf8c |
$mpiinstalldir/bin/mpiexec -n 4 ./testmpio 1 >&6 2>&6
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
echo "------ End Run MPI-IO Tests ------" >&6
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
if [ $test_mpich1 = yes ] ; then
|
|
Packit Service |
c5cf8c |
echo "------ Run MPICH-1 Tests ------" >&6
|
|
Packit Service |
c5cf8c |
# Nor are the mpich1 tests
|
|
Packit Service |
c5cf8c |
# Build mpich tests --enable-coverage
|
|
Packit Service |
c5cf8c |
# Need to provide a target that does not do the "runtest -check" step,
|
|
Packit Service |
c5cf8c |
# since there may be output about "Can't read output file foo.da"
|
|
Packit Service |
c5cf8c |
cd $blddir/othertest/mpich1
|
|
Packit Service |
c5cf8c |
MPIRUN=$mpiinstalldir/bin/mpiexec
|
|
Packit Service |
c5cf8c |
export MPIRUN
|
|
Packit Service |
c5cf8c |
MPITEST_IGNORE_RUNTEST=yes
|
|
Packit Service |
c5cf8c |
export MPITEST_IGNORE_RUNTEST
|
|
Packit Service |
c5cf8c |
$mpich1srcdir/configure --enable-coverage -cc=$mpiinstalldir/bin/mpicc \
|
|
Packit Service |
c5cf8c |
-fc=$mpiinstalldir/bin/mpifort --enable-io \
|
|
Packit Service |
c5cf8c |
-mpilibname=mpich \
|
|
Packit Service |
c5cf8c |
-prefix=$mpiinstalldir >&6 2>&6
|
|
Packit Service |
c5cf8c |
make clean >&6 2>&6
|
|
Packit Service |
c5cf8c |
make testing >&6 2>&6
|
|
Packit Service |
c5cf8c |
echo "------ End Run MPICH-1 Tests ------" >&6
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# Now create the summary
|
|
Packit Service |
c5cf8c |
echo "------ Collect Coverage Information ------" >&6
|
|
Packit Service |
c5cf8c |
cd $blddir
|
|
Packit Service |
c5cf8c |
# Ignore the output from gcov
|
|
Packit Service |
c5cf8c |
make coverage >/dev/null 2>&1
|
|
Packit Service |
c5cf8c |
rc=$?
|
|
Packit Service |
c5cf8c |
if [ "$rc" != 0 ] ; then
|
|
Packit Service |
c5cf8c |
echo "Make coverage step failed with return code $rc"
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
#
|
|
Packit Service |
c5cf8c |
# The following list of directories gets the following:
|
|
Packit Service |
c5cf8c |
# All of the top-level MPI routines (src/mpi and src/util/info)
|
|
Packit Service |
c5cf8c |
# Support routines for nameservice using the file option (src/nameserv/file)
|
|
Packit Service |
c5cf8c |
# Support routines for datatypes
|
|
Packit Service |
c5cf8c |
# Basic implementation of the channel device. This is included
|
|
Packit Service |
c5cf8c |
# because some of the top-level MPI routines just push operations down
|
|
Packit Service |
c5cf8c |
# to the device (e.g., MPI_Put). src/mpid/ch3/src contains the "common"
|
|
Packit Service |
c5cf8c |
# code for the channel devices, so it is reasonable to try for good
|
|
Packit Service |
c5cf8c |
# coverage of this code as well.
|
|
Packit Service |
c5cf8c |
# annoteindex is not used with
|
|
Packit Service |
c5cf8c |
rm -f coverage.txt
|
|
Packit Service |
c5cf8c |
if [ "$update_web" = yes ] ; then
|
|
Packit Service |
c5cf8c |
# Clean out the old annotated files
|
|
Packit Service |
c5cf8c |
if [ -d "$annotedir/src" ] ; then
|
|
Packit Service |
c5cf8c |
(cd $annotedir/src && \
|
|
Packit Service |
c5cf8c |
find . -name '*.c.htm' -ctime +2 -print | \
|
|
Packit Service |
c5cf8c |
xargs -r rm -f )
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
$srcdir/maint/getcoverage -annote=$annotedir \
|
|
Packit Service |
c5cf8c |
-annoteweb=$annotewebprefix \
|
|
Packit Service |
c5cf8c |
-indexdir=$annotedir \
|
|
Packit Service |
c5cf8c |
src/mpi src/util/info src/nameserv/file \
|
|
Packit Service |
c5cf8c |
src/mpid/common/datatype \
|
|
Packit Service |
c5cf8c |
$devsrcdirs \
|
|
Packit Service |
c5cf8c |
src/pmi/simple src/binding/f77 src/binding/cxx > coverage.txt
|
|
Packit Service |
c5cf8c |
else
|
|
Packit Service |
c5cf8c |
$srcdir/maint/getcoverage \
|
|
Packit Service |
c5cf8c |
src/mpi src/util/info src/nameserv/file \
|
|
Packit Service |
c5cf8c |
src/mpid/common/datatype \
|
|
Packit Service |
c5cf8c |
$devsrcdirs \
|
|
Packit Service |
c5cf8c |
src/pmi/simple src/binding/f77 src/binding/cxx > coverage.txt
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
# The coverage data is in the build dir ($blddir).
|
|
Packit Service |
c5cf8c |
echo "------ End Collect Coverage Information ------" >&6
|
|
Packit Service |
c5cf8c |
if [ "$update_web" = yes ] ; then
|
|
Packit Service |
c5cf8c |
if [ -d $webloc ] ; then
|
|
Packit Service |
c5cf8c |
rm -f $webloc/coverage.txt
|
|
Packit Service |
c5cf8c |
cp coverage.txt $webloc/coverage.txt
|
|
Packit Service |
c5cf8c |
else
|
|
Packit Service |
c5cf8c |
echo "Unable to access $webloc to install coverage output"
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
# Make the logfile available on the web page
|
|
Packit Service |
c5cf8c |
if [ -n "$logfile" -a -s "$logfile" ] ; then
|
|
Packit Service |
c5cf8c |
rm -f $webloc/cov-logfile.txt
|
|
Packit Service |
c5cf8c |
cp $logfile $webloc/cov-logfile.txt
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
#
|
|
Packit Service |
c5cf8c |
# From mpich build directory:
|
|
Packit Service |
c5cf8c |
# make coverage >/dev/null 2>&1
|
|
Packit Service |
c5cf8c |
# The above step creates the *.gcov files
|
|
Packit Service |
c5cf8c |
# maint/getcoverage.in src/mpi/*.gcov src/util/info/*.gcov \
|
|
Packit Service |
c5cf8c |
# src/mpid/ch3/src/*.gcov src/mpid/ch3/channels/sock/src/*.gcov etc. \
|
|
Packit Service |
c5cf8c |
# > coverage.txt
|
|
Packit Service |
c5cf8c |
#
|
|
Packit Service |
c5cf8c |
# The above generates a file that shows each missed executable line, along
|
|
Packit Service |
c5cf8c |
# with some context (the two lines preceding the missed line).
|
|
Packit Service |
c5cf8c |
#
|
|
Packit Service |
c5cf8c |
# It doesn't get all of the files; for example, it misses others in util
|
|
Packit Service |
c5cf8c |
# (e.g., util/mem), and it misses all of ROMIO because of the file
|
|
Packit Service |
c5cf8c |
# structure of ROMIO (src/mpi/romio/{adio|mpi-io}/*.gcov).
|