Adding a Spack autotest script

This commit is contained in:
Rob Falgout 2020-05-16 08:30:29 -07:00
parent 62b61918cf
commit 1d014c27c7
5 changed files with 98 additions and 9 deletions

View File

@ -14,9 +14,10 @@ case $1 in
$0 [-h] {src_dir} [options] [-rt <options for runtest.sh script>]
where: -h|-help prints this usage information and exits
{src_dir} is the hypre source directory
where: {src_dir} is the hypre source directory
-<test> run <test> (test = default, bigint, maxdim, complex)
-spack <dir> compile and link drivers to spack build
-h|-help prints this usage information and exits
This script builds the hypre example codes in {src_dir}/examples and runs the
example regression tests in test/TEST_examples.
@ -40,6 +41,9 @@ do
shift
break
;;
-spack)
shift; spackdir="$1"; shift
;;
-*)
tname=`echo $1 | sed 's/-//'`
tests="$tests $tname"
@ -61,9 +65,13 @@ mkdir -p $output_dir
# Run make in the examples directory
cd $src_dir/examples
make clean
mopt=""
if [ -n "$spackdir" ]; then
mopt="HYPRE_DIR=$spackdir"
fi
for tname in $tests
do
make $tname
make $mopt $tname
done
# Run the examples regression test

View File

@ -0,0 +1 @@
==> Warning:

64
AUTOTEST/machine-tux-spack.sh Executable file
View File

@ -0,0 +1,64 @@
#!/bin/sh
# Copyright 1998-2019 Lawrence Livermore National Security, LLC and other
# HYPRE Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
testname=`basename $0 .sh`
# Echo usage information
case $1 in
-h|-help)
cat <<EOF
**** This script requires certain external libraries. ****
$0 [-h|-help] {src_dir}
where: -h|-help prints this usage information and exits
{src_dir} is the hypre source directory
This script runs a number of external library tests.
Example usage: $0 ../src
EOF
exit
;;
esac
# Setup
test_dir=`pwd`
output_dir=`pwd`/$testname.dir
rm -fr $output_dir
mkdir -p $output_dir
src_dir=`cd $1; pwd`
shift
# OpenMPI limits the number of processes available by default - override
export OMPI_MCA_rmaps_base_oversubscribe=1
# Basic build and run tests
# RDF - Add this later when LOBPCG residual diff issues are resolved
#
# spackspec="hypre@develop+debug~superlu-dist"
# spack install $spackspec
# spack load $spackspec
# spackdir=`spack location -i $spackspec`
# test.sh basic.sh ../src -co: -mo: -spack $spackdir -eo: -spack $spackdir
# ./renametest.sh basic $output_dir/basic-examples
spackspec="hypre@develop~debug+superlu-dist"
spack install $spackspec
spack load $spackspec
spackdir=`spack location -i $spackspec`
test.sh basic.sh ../src -co: -mo: -spack $spackdir -ro: -superlu
./renametest.sh basic $output_dir/basic-dsuperlu
# Echo to stderr all nonempty error files in $output_dir
for errfile in $( find $output_dir ! -size 0 -name "*.err" )
do
echo $errfile >&2
done

View File

@ -14,6 +14,7 @@ case $1 in
$0 [-h] {src_dir} [options for make]
where: {src_dir} is the hypre source directory
-spack <dir> compile and link drivers to spack build
-h|-help prints this usage information and exits
This script runs make clean; make [options] in {src_dir}.
@ -29,7 +30,22 @@ esac
src_dir=`cd $1; pwd`
shift
# Parse the rest of the command line
while [ "$*" ]
do
case $1 in
-spack)
shift; spackdir="$1"; shift
;;
esac
done
# Run make
cd $src_dir
make clean
make $@
if [ -n "$spackdir" ]; then
cd $src_dir/test
make HYPRE_BUILD_DIR="$spackdir" $@
else
make $@
fi

View File

@ -14,10 +14,10 @@ case $1 in
$0 [-h] {src_dir} [options] [-rt <options for runtest.sh script>]
where: -h|-help prints this usage information and exits
{src_dir} is the hypre source directory
where: {src_dir} is the hypre source directory
-<test> run <test> (test = ams, fac, ij, sstruct, struct)
-all run all tests (default behavior)
-h|-help prints this usage information and exits
This script runs runtest.sh in {src_dir}/test with optional parameters.