Adding a Spack autotest script
This commit is contained in:
		
							parent
							
								
									62b61918cf
								
							
						
					
					
						commit
						1d014c27c7
					
				| @ -14,9 +14,10 @@ case $1 in | |||||||
| 
 | 
 | ||||||
|    $0 [-h] {src_dir} [options] [-rt <options for runtest.sh script>] |    $0 [-h] {src_dir} [options] [-rt <options for runtest.sh script>] | ||||||
| 
 | 
 | ||||||
|    where: -h|-help   prints this usage information and exits |    where: {src_dir}     is the hypre source directory | ||||||
|           {src_dir}  is the hypre source directory |           -<test>       run <test>  (test = default, bigint, maxdim, complex) | ||||||
|           -<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 |    This script builds the hypre example codes in {src_dir}/examples and runs the | ||||||
|    example regression tests in test/TEST_examples. |    example regression tests in test/TEST_examples. | ||||||
| @ -40,6 +41,9 @@ do | |||||||
|          shift |          shift | ||||||
|          break |          break | ||||||
|          ;; |          ;; | ||||||
|  |       -spack) | ||||||
|  |          shift; spackdir="$1"; shift | ||||||
|  |          ;; | ||||||
|       -*) |       -*) | ||||||
|          tname=`echo $1 | sed 's/-//'` |          tname=`echo $1 | sed 's/-//'` | ||||||
|          tests="$tests $tname" |          tests="$tests $tname" | ||||||
| @ -61,9 +65,13 @@ mkdir -p $output_dir | |||||||
| # Run make in the examples directory | # Run make in the examples directory | ||||||
| cd $src_dir/examples | cd $src_dir/examples | ||||||
| make clean | make clean | ||||||
|  | mopt="" | ||||||
|  | if [ -n "$spackdir" ]; then | ||||||
|  |    mopt="HYPRE_DIR=$spackdir" | ||||||
|  | fi | ||||||
| for tname in $tests | for tname in $tests | ||||||
| do | do | ||||||
|    make $tname |    make $mopt $tname | ||||||
| done | done | ||||||
| 
 | 
 | ||||||
| # Run the examples regression test | # Run the examples regression test | ||||||
|  | |||||||
							
								
								
									
										1
									
								
								AUTOTEST/machine-tux-spack.filters
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								AUTOTEST/machine-tux-spack.filters
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | |||||||
|  | ==> Warning: | ||||||
							
								
								
									
										64
									
								
								AUTOTEST/machine-tux-spack.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										64
									
								
								AUTOTEST/machine-tux-spack.sh
									
									
									
									
									
										Executable 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 | ||||||
| @ -13,8 +13,9 @@ case $1 in | |||||||
| 
 | 
 | ||||||
|    $0 [-h] {src_dir} [options for make] |    $0 [-h] {src_dir} [options for make] | ||||||
| 
 | 
 | ||||||
|    where: {src_dir}  is the hypre source directory |    where: {src_dir}     is the hypre source directory | ||||||
|           -h|-help   prints this usage information and exits |           -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}. |    This script runs make clean; make [options] in {src_dir}. | ||||||
| 
 | 
 | ||||||
| @ -29,7 +30,22 @@ esac | |||||||
| src_dir=`cd $1; pwd` | src_dir=`cd $1; pwd` | ||||||
| shift | shift | ||||||
| 
 | 
 | ||||||
|  | # Parse the rest of the command line | ||||||
|  | while [ "$*" ] | ||||||
|  | do | ||||||
|  |    case $1 in | ||||||
|  |       -spack) | ||||||
|  |          shift; spackdir="$1"; shift | ||||||
|  |          ;; | ||||||
|  |    esac | ||||||
|  | done | ||||||
|  | 
 | ||||||
| # Run make | # Run make | ||||||
| cd $src_dir | cd $src_dir | ||||||
| make clean | make clean | ||||||
| make $@ | if [ -n "$spackdir" ]; then | ||||||
|  |    cd $src_dir/test | ||||||
|  |    make HYPRE_BUILD_DIR="$spackdir" $@ | ||||||
|  | else | ||||||
|  |    make $@ | ||||||
|  | fi | ||||||
|  | |||||||
| @ -14,10 +14,10 @@ case $1 in | |||||||
| 
 | 
 | ||||||
|    $0 [-h] {src_dir} [options] [-rt <options for runtest.sh script>] |    $0 [-h] {src_dir} [options] [-rt <options for runtest.sh script>] | ||||||
| 
 | 
 | ||||||
|    where: -h|-help   prints this usage information and exits |    where: {src_dir}  is the hypre source directory | ||||||
|           {src_dir}  is the hypre source directory |  | ||||||
|           -<test>    run <test>  (test = ams, fac, ij, sstruct, struct) |           -<test>    run <test>  (test = ams, fac, ij, sstruct, struct) | ||||||
|           -all       run all tests (default behavior) |           -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. |    This script runs runtest.sh in {src_dir}/test with optional parameters. | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Rob Falgout
						Rob Falgout