hypre/AUTOTEST/machine-tux.sh

126 lines
3.7 KiB
Bash
Raw Normal View History

#!/bin/sh
#BHEADER**********************************************************************
2008-07-18 09:34:48 +08:00
# Copyright (c) 2008, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
2008-07-18 09:34:48 +08:00
# This file is part of HYPRE. See file COPYRIGHT for details.
#
# HYPRE is free software; you can redistribute it and/or modify it under the
2008-07-18 09:34:48 +08:00
# terms of the GNU Lesser General Public License (as published by the Free
# Software Foundation) version 2.1 dated February 1999.
#
# $Revision$
#EHEADER**********************************************************************
testname=`basename $0 .sh`
# Echo usage information
case $1 in
-h|-help)
2007-12-01 07:24:44 +08:00
cat <<EOF
**** Only run this script on one of the tux machines. ****
$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 tests suitable for the tux machines.
Example usage: $0 ..
EOF
2007-12-01 07:24:44 +08:00
exit
;;
esac
# Setup
test_dir=`pwd`
output_dir=`pwd`/$testname.dir
rm -fr $output_dir
mkdir -p $output_dir
src_dir=$1
shift
# Basic build and run tests
mo="-j test"
ro="-ij -sstruct -struct"
eo=""
co=""
test.sh basictest.sh $src_dir -co: $co -mo: $mo
rename basictest $output_dir/basictest-default basictest.???
co="--with-insure --enable-debug --with-print-errors"
test.sh basictest.sh $src_dir -co: $co -mo: $mo -ro: $ro -eo: $eo
rename basictest $output_dir/basictest--with-insure basictest.???
co="--enable-global-partition --with-insure"
RO="-ij -sstruct -struct -ams -fac"
test.sh basictest.sh $src_dir -co: $co -mo: $mo -ro: $RO -eo: $eo
rename basictest $output_dir/basictest--enable-global-partition basictest.???
co="--without-MPI"
test.sh basictest.sh $src_dir -co: $co -mo: $mo
rename basictest $output_dir/basictest--without-MPI basictest.???
co="--with-strict-checking"
test.sh basictest.sh $src_dir -co: $co -mo: $mo
rename basictest $output_dir/basictest--with-strict-checking basictest.???
co="--enable-shared"
test.sh basictest.sh $src_dir -co: $co -mo: $mo
rename basictest $output_dir/basictest--enable-shared basictest.???
co="--enable-bigint --enable-debug"
test.sh basictest.sh $src_dir -co: $co -mo: $mo -ro: $ro -eo: -bigint
rename basictest $output_dir/basictest--enable-bigint basictest.???
co="--enable-maxdim=4 --enable-debug"
test.sh basictest.sh $src_dir -co: $co -mo: $mo -eo: -maxdim
rename basictest $output_dir/basictest--enable-maxdim=4 basictest.???
co="--enable-complex --enable-maxdim=4 --enable-debug"
test.sh basictest.sh $src_dir -co: $co -mo: $mo -eo: -complex
# ignore complex compiler output for now
rm -fr basictest.dir/make.???
rename basictest $output_dir/basictest--enable-complex basictest.???
# Test babel build only if 'babel-runtime' directory is present
if [ -d $src_dir/babel-runtime ]; then
co="--with-babel"
test.sh basictest.sh $src_dir -co: $co -mo: $mo
rename basictest $output_dir/basictest--with-babel basictest.???
fi
# Test linking for different languages
2007-12-01 07:24:44 +08:00
link_opts="all++ all77"
for opt in $link_opts
do
output_subdir=$output_dir/link$opt
mkdir -p $output_subdir
./test.sh link.sh $src_dir $opt
mv -f link.??? $output_subdir
done
# Test documentation build (only if 'docs_misc' directory is present)
if [ -d $src_dir/docs_misc ]; then
2007-12-01 07:24:44 +08:00
./test.sh docs.sh $src_dir
mv -f docs.??? $output_dir
fi
# Check for 'int', 'double', and 'MPI_'
./test.sh check-int.sh $src_dir
mv -f check-int.??? $output_dir
./test.sh check-double.sh $src_dir
mv -f check-double.??? $output_dir
./test.sh check-mpi.sh $src_dir
mv -f check-mpi.??? $output_dir
# 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