2007-11-17 04:54:15 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
#BHEADER**********************************************************************
|
2008-07-18 09:34:48 +08:00
|
|
|
# Copyright (c) 2008, Lawrence Livermore National Security, LLC.
|
2007-11-17 04:54:15 +08:00
|
|
|
# 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.
|
2007-11-17 04:54:15 +08:00
|
|
|
#
|
|
|
|
|
# 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.
|
2007-11-17 04:54:15 +08:00
|
|
|
#
|
|
|
|
|
# $Revision$
|
|
|
|
|
#EHEADER**********************************************************************
|
|
|
|
|
|
|
|
|
|
testname=`basename $0 .sh`
|
|
|
|
|
|
|
|
|
|
# Echo usage information
|
|
|
|
|
case $1 in
|
|
|
|
|
-h|-help)
|
2007-12-01 07:24:44 +08:00
|
|
|
cat <<EOF
|
2007-11-17 04:54:15 +08:00
|
|
|
|
|
|
|
|
**** Only run this script on one of the tux machines. ****
|
|
|
|
|
|
|
|
|
|
$0 [-h|-help] {src_dir}
|
|
|
|
|
|
2015-01-13 05:06:36 +08:00
|
|
|
where: -h|-help prints this usage information and exits
|
|
|
|
|
{src_dir} is the hypre source directory
|
|
|
|
|
|
2007-11-17 04:54:15 +08:00
|
|
|
|
|
|
|
|
This script runs a number of tests suitable for the tux machines.
|
|
|
|
|
|
2016-01-16 02:30:49 +08:00
|
|
|
Example usage: $0 ../src
|
2007-11-17 04:54:15 +08:00
|
|
|
|
|
|
|
|
EOF
|
2007-12-01 07:24:44 +08:00
|
|
|
exit
|
|
|
|
|
;;
|
2007-11-17 04:54:15 +08:00
|
|
|
esac
|
|
|
|
|
|
|
|
|
|
# Setup
|
|
|
|
|
test_dir=`pwd`
|
|
|
|
|
output_dir=`pwd`/$testname.dir
|
|
|
|
|
rm -fr $output_dir
|
|
|
|
|
mkdir -p $output_dir
|
2016-01-19 09:05:14 +08:00
|
|
|
src_dir=`cd $1; pwd`
|
2007-11-17 04:54:15 +08:00
|
|
|
shift
|
|
|
|
|
|
2015-01-13 05:06:36 +08:00
|
|
|
# Basic build and run tests
|
|
|
|
|
mo="-j test"
|
2015-01-13 06:28:24 +08:00
|
|
|
ro="-ams -ij -sstruct -struct"
|
2015-01-13 05:06:36 +08:00
|
|
|
eo=""
|
2007-12-01 10:29:42 +08:00
|
|
|
|
2015-01-13 05:06:36 +08:00
|
|
|
co=""
|
|
|
|
|
test.sh basictest.sh $src_dir -co: $co -mo: $mo
|
2015-01-13 09:50:56 +08:00
|
|
|
renametest.sh basictest $output_dir/basictest-default
|
2011-01-12 09:34:08 +08:00
|
|
|
|
2015-02-13 08:08:39 +08:00
|
|
|
co="--enable-debug"
|
|
|
|
|
test.sh basictest.sh $src_dir -co: $co -mo: $mo -eo: $eo
|
|
|
|
|
renametest.sh basictest $output_dir/basictest-debug1
|
2015-01-13 05:06:36 +08:00
|
|
|
|
2015-02-13 08:08:39 +08:00
|
|
|
co="--enable-debug --enable-global-partition"
|
|
|
|
|
RO="-fac"
|
2015-01-13 05:06:36 +08:00
|
|
|
test.sh basictest.sh $src_dir -co: $co -mo: $mo -ro: $RO -eo: $eo
|
2015-02-13 08:08:39 +08:00
|
|
|
renametest.sh basictest $output_dir/basictest-debug2
|
|
|
|
|
|
2016-05-14 07:53:08 +08:00
|
|
|
co="--enable-debug CC=mpiCC"
|
|
|
|
|
test.sh basictest.sh $src_dir -co: $co -mo: $mo -ro: $ro -eo: $eo
|
|
|
|
|
renametest.sh basictest $output_dir/basictest-debug-cpp
|
|
|
|
|
|
2017-03-05 11:10:29 +08:00
|
|
|
# co="--with-insure --enable-debug --with-print-errors"
|
|
|
|
|
# MO="test"
|
|
|
|
|
# test.sh basictest.sh $src_dir -co: $co -mo: $MO -ro: $ro
|
|
|
|
|
# renametest.sh basictest $output_dir/basictest--with-insure1
|
|
|
|
|
#
|
|
|
|
|
# co="--with-insure --enable-debug --enable-global-partition"
|
|
|
|
|
# MO="test"
|
|
|
|
|
# test.sh basictest.sh $src_dir -co: $co -mo: $MO -ro: $ro
|
|
|
|
|
# renametest.sh basictest $output_dir/basictest--with-insure2
|
|
|
|
|
|
|
|
|
|
co="--enable-debug --with-print-errors"
|
|
|
|
|
test.sh basictest.sh $src_dir -co: $co -mo: $mo -ro: $ro -rt -valgrind
|
|
|
|
|
renametest.sh basictest $output_dir/basictest--valgrind1
|
2015-02-13 08:08:39 +08:00
|
|
|
|
2017-03-05 11:10:29 +08:00
|
|
|
co="--enable-debug --enable-global-partition"
|
|
|
|
|
test.sh basictest.sh $src_dir -co: $co -mo: $mo -ro: $ro -rt -valgrind
|
|
|
|
|
renametest.sh basictest $output_dir/basictest--valgrind2
|
2015-01-13 05:06:36 +08:00
|
|
|
|
|
|
|
|
co="--without-MPI"
|
|
|
|
|
test.sh basictest.sh $src_dir -co: $co -mo: $mo
|
2015-01-13 09:50:56 +08:00
|
|
|
renametest.sh basictest $output_dir/basictest--without-MPI
|
2015-01-13 05:06:36 +08:00
|
|
|
|
|
|
|
|
co="--with-strict-checking"
|
|
|
|
|
test.sh basictest.sh $src_dir -co: $co -mo: $mo
|
2015-01-13 09:50:56 +08:00
|
|
|
renametest.sh basictest $output_dir/basictest--with-strict-checking
|
2015-01-13 05:06:36 +08:00
|
|
|
|
|
|
|
|
co="--enable-shared"
|
|
|
|
|
test.sh basictest.sh $src_dir -co: $co -mo: $mo
|
2015-01-13 09:50:56 +08:00
|
|
|
renametest.sh basictest $output_dir/basictest--enable-shared
|
2015-01-13 05:06:36 +08:00
|
|
|
|
|
|
|
|
co="--enable-bigint --enable-debug"
|
|
|
|
|
test.sh basictest.sh $src_dir -co: $co -mo: $mo -ro: $ro -eo: -bigint
|
2015-01-13 09:50:56 +08:00
|
|
|
renametest.sh basictest $output_dir/basictest--enable-bigint
|
2015-01-13 05:06:36 +08:00
|
|
|
|
|
|
|
|
co="--enable-maxdim=4 --enable-debug"
|
|
|
|
|
test.sh basictest.sh $src_dir -co: $co -mo: $mo -eo: -maxdim
|
2015-01-13 09:50:56 +08:00
|
|
|
renametest.sh basictest $output_dir/basictest--enable-maxdim=4
|
2015-01-13 05:06:36 +08:00
|
|
|
|
|
|
|
|
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.???
|
2015-08-26 22:17:33 +08:00
|
|
|
grep -v make.err basictest.err > basictest.tmp
|
|
|
|
|
mv basictest.tmp basictest.err
|
2015-01-13 09:50:56 +08:00
|
|
|
renametest.sh basictest $output_dir/basictest--enable-complex
|
2015-01-13 05:06:36 +08:00
|
|
|
|
2015-01-21 06:54:12 +08:00
|
|
|
# CMake build and run tests
|
|
|
|
|
mo="-j"
|
|
|
|
|
ro="-ams -ij -sstruct -struct"
|
|
|
|
|
eo=""
|
|
|
|
|
|
|
|
|
|
co=""
|
|
|
|
|
test.sh cmaketest.sh $src_dir -co: $co -mo: $mo
|
|
|
|
|
renametest.sh cmaketest $output_dir/cmaketest-default
|
|
|
|
|
|
|
|
|
|
co="-DCMAKE_BUILD_TYPE=Debug"
|
|
|
|
|
test.sh cmaketest.sh $src_dir -co: $co -mo: $mo -ro: $ro
|
|
|
|
|
renametest.sh cmaketest $output_dir/cmaketest-debug
|
|
|
|
|
|
|
|
|
|
co="-DHYPRE_NO_GLOBAL_PARTITION=OFF"
|
|
|
|
|
test.sh cmaketest.sh $src_dir -co: $co -mo: $mo
|
|
|
|
|
renametest.sh cmaketest $output_dir/cmaketest-global-partition
|
|
|
|
|
|
|
|
|
|
co="-DHYPRE_SEQUENTIAL=ON"
|
|
|
|
|
test.sh cmaketest.sh $src_dir -co: $co -mo: $mo
|
|
|
|
|
renametest.sh cmaketest $output_dir/cmaketest-sequential
|
|
|
|
|
|
|
|
|
|
co="-DHYPRE_SHARED=ON"
|
|
|
|
|
test.sh cmaketest.sh $src_dir -co: $co -mo: $mo
|
|
|
|
|
renametest.sh cmaketest $output_dir/cmaketest-shared
|
|
|
|
|
|
|
|
|
|
co="-DHYPRE_BIGINT=ON"
|
|
|
|
|
test.sh cmaketest.sh $src_dir -co: $co -mo: $mo -ro: $ro
|
|
|
|
|
renametest.sh cmaketest $output_dir/cmaketest-bigint
|
|
|
|
|
|
|
|
|
|
# cmake build doesn't currently support maxdim
|
|
|
|
|
# cmake build doesn't currently support complex
|
|
|
|
|
|
2007-12-01 10:29:42 +08:00
|
|
|
# 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
|
2007-11-17 04:54:15 +08:00
|
|
|
|
2013-10-12 03:48:06 +08:00
|
|
|
# Check for 'int', 'double', and 'MPI_'
|
2010-12-21 03:27:44 +08:00
|
|
|
./test.sh check-int.sh $src_dir
|
|
|
|
|
mv -f check-int.??? $output_dir
|
2013-10-12 03:48:06 +08:00
|
|
|
./test.sh check-double.sh $src_dir
|
|
|
|
|
mv -f check-double.??? $output_dir
|
2010-12-21 03:27:44 +08:00
|
|
|
./test.sh check-mpi.sh $src_dir
|
|
|
|
|
mv -f check-mpi.??? $output_dir
|
|
|
|
|
|
2007-11-17 04:54:15 +08:00
|
|
|
# Echo to stderr all nonempty error files in $output_dir
|
2007-11-29 08:16:42 +08:00
|
|
|
for errfile in $( find $output_dir ! -size 0 -name "*.err" )
|
2007-11-17 04:54:15 +08:00
|
|
|
do
|
|
|
|
|
echo $errfile >&2
|
|
|
|
|
done
|