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 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182
|
#! /bin/sh
##
## Copyright (C) by Argonne National Laboratory
## See COPYRIGHT in top-level directory
##
# Configure and build the most common configurations. Does not do
# extensive tests
#
# ----------------------------------------------------------------------------
# Set defaults
#
do_tests=yes
builddir=/sandbox/$LOGNAME/mpich2
instdir=/sandbox/$LOGNAME/mpi2-inst
srcdir=/home/MPI/testing/mpich2/mpich2
# ----------------------------------------------------------------------------
# Get arguments
for arg in "$@" ; do
case $arg in
-echo) set -x ;;
-local)
# Do the testing in place.
builddir=`pwd`
instdir=`(cd .. && pwd)`"/mpi2-inst"
srcdir=`pwd`
;;
-notest)
do_tests=no
;;
*)
if [ -n "$arg" ] ; then
echo "Unknown argument $arg"
exit 1
fi
;;
esac
done
# ----------------------------------------------------------------------------
# Validate arguments
#
if [ ! -d $srcdir ] ; then
if [ -d /homes/MPI/testing/mpich2/mpich2 ] ; then
srcdir=/homes/MPI/testing/mpich2/mpich2
else
echo "Cannot find source directory"
exit 1
fi
fi
#
if cd $builddir ; then
:
else
echo "Could not change directory to $builddir"
exit 1
fi
if [ ! -x $srcdir/configure ] ; then
echo "Cannot find configure in $srcdir"
exit 1
fi
#
# ---------------------------------------------------------------------------
# BuildMPICH uses the following global variables:
# testname - string name for test
# config_args - arguments to pass to configure
# do_tests - yes or no; controls tests
# srcdir,instdir - directories for source, installation
# This uses XML-style tags to mark the various segments, but does not
# filter the output from the individual steps for XML/SGML characters (e.g.,
# the <,>,& characters aren't handled).
# Note: we could filter through sed with
# sed -e 's/>/-AMP-gt;/g' -e 's/</-AMP-lt;/g' -e 's/\&/-AMP-amp;/g' | \
# sed -e 's/-AMP-/&/g'
#
BuildMPICH2 () {
echo "<BUILDTEST NAME=\"$testname\">"
echo "<CONFIG>"
if $srcdir/configure --prefix=$instdir $config_args ; then
echo "</CONFIG>"
echo "<MAKE>"
# Remove any lingering libraries
rm -f lib/libmpi*.a lib/libpmpi*.a lib/libmpifort*.a
rm -f lib/libmpi*.so lib/libpmpi*.so lib/libmpifort*.so
if make ; then
echo "</MAKE>"
echo "<MAKEINST>"
if make install ; then
echo "</MAKEINST>"
if [ "$do_tests" = "yes" ] ; then
echo "<RUNTEST>"
if make testing ; then
echo "Tests completed in test/mpi/summary.xml"
# Really should copy failures if any
else
echo "Tests failed ($testname)"
fi
echo "</RUNTEST>"
fi
else
rc=$?
echo "Install failed ($testname)"
echo "</MAKEINST STATUS=\"$rc\">"
fi
else
rc = $?
echo "make failed ($testname)"
echo "</MAKE STATUS=\"$rc\">"
fi
else
rc=$?
echo "Configure failed ($testname)"
echo "</CONFIG STATUS=\"$rc\">"
fi
echo "</BUILDTEST>"
}
# ---------------------------------------------------------------------------
# Preamble
echo "<MPICH2BUILD>"
echo "<DATE>"
date
echo "</DATE>"
# ---------------------------------------------------------------------------
# Basic test
testname="basic"
config_args=""
BuildMPICH2
#
# No Fortran or C++
testname="no f77/c++"
config_args="--disable-f77 --disable-cxx"
BuildMPICH2
#
# No Weak symbols
testname="no weak symbols"
config_args="--disable-weak-symbols"
BuildMPICH2
#
# --enable-fast
testname="fast"
config_args="--enable-fast"
BuildMPICH2
#
# forker pm, strict
testname="strict and forker"
config_args="--enable-strict --with-pm=forker"
BuildMPICH2
#
# Build and link with a logging library
testname="logging with lwlog"
config_args="--with-logging=lwlog --with-pm=forker"
BuildMPICH2
#
# Build with memory checking
testname="memory tests"
config_args="--enable-g=all --enable-strict"
BuildMPICH2
#
# Build with shared libraries
testname="sharedlibs"
config_args="--enable-sharedlibs=gcc"
BuildMPICH2
#
# Build with PVFS if available
# --with-romio=--with-file-system=ufs+nfs+testfs+pvfs
# Tests could be run in /pvfs/pvfsstage/$LOGNAME on Chiba
if [ -d /pvfs ] ; then
testname="pvfs"
config_args="--with-romio=--with-file-system=ufs+nfs+testfs+pvfs"
BuildMPICH2
fi
# ---------------------------------------------------------------------------
# Postamble
echo "</MPICH2BUILD>"
|