diff --git a/src/test/TEST_error/error.sh b/src/test/TEST_error/error.sh index 7d7019907..c86ffd1e3 100755 --- a/src/test/TEST_error/error.sh +++ b/src/test/TEST_error/error.sh @@ -37,3 +37,4 @@ egrep -v "hypre error" ${TNAME}.tmp > ${TNAME}.err #============================================================================= rm -f ${TNAME}.testdata* +rm -f ${TNAME}.tmp diff --git a/src/test/TEST_ij/lazy.jobs b/src/test/TEST_ij/lazy.jobs new file mode 100644 index 000000000..a7c7045ef --- /dev/null +++ b/src/test/TEST_ij/lazy.jobs @@ -0,0 +1,16 @@ +#!/bin/bash +# Copyright (c) 1998 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) + +#============================================================================= +# Test library lazy initialization (sequential and parallel) +#============================================================================= + +mpirun -np 1 ./ij > lazy.out.1.a +mpirun -np 1 ./ij -lazy_device_init 1 > lazy.out.1.b + +mpirun -np 4 ./ij > lazy.out.2.a +mpirun -np 4 ./ij -lazy_device_init 1 > lazy.out.2.b + diff --git a/src/test/TEST_ij/lazy.sh b/src/test/TEST_ij/lazy.sh new file mode 100755 index 000000000..6fe3822bf --- /dev/null +++ b/src/test/TEST_ij/lazy.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# Copyright (c) 1998 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) + +TNAME=`basename $0 .sh` + +tail -3 ${TNAME}.out.1.a | head -2 > ${TNAME}.testdata +tail -3 ${TNAME}.out.1.b | head -2 > ${TNAME}.testdata.temp + +# Abuse HYPRE_NO_SAVED to skip the following diff with OMP +if [ -z $HYPRE_NO_SAVED ]; then + diff ${TNAME}.testdata ${TNAME}.testdata.temp >&2 +fi + +tail -3 ${TNAME}.out.2.a | head -2 > ${TNAME}.testdata +tail -3 ${TNAME}.out.2.b | head -2 > ${TNAME}.testdata.temp + +# Abuse HYPRE_NO_SAVED to skip the following diff with OMP +if [ -z $HYPRE_NO_SAVED ]; then + diff ${TNAME}.testdata ${TNAME}.testdata.temp >&2 +fi + +#============================================================================= +# remove temporary files +#============================================================================= + +rm -f ${TNAME}.testdata* diff --git a/src/test/TEST_ij/posneg.jobs b/src/test/TEST_ij/posneg.jobs new file mode 100644 index 000000000..a1f0a91f2 --- /dev/null +++ b/src/test/TEST_ij/posneg.jobs @@ -0,0 +1,17 @@ +#!/bin/bash +# Copyright (c) 1998 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) + +## Solve Ax=b and -Ax=b, convergence should be the same +mpirun -np 2 ./ij -solver 0 -rhsrand -negA 0 > posneg.out.400.p +mpirun -np 2 ./ij -solver 0 -rhsrand -negA 1 > posneg.out.400.n +mpirun -np 3 ./ij -solver 3 -rhsrand -negA 0 > posneg.out.401.p +mpirun -np 3 ./ij -solver 3 -rhsrand -negA 1 > posneg.out.401.n +mpirun -np 4 ./ij -cheby_eig_est 10 -cheby_order 4 -cheby_variant 0 -cheby_scale 1 -rlx 16 -negA 0 > posneg.out.402.p +mpirun -np 4 ./ij -cheby_eig_est 10 -cheby_order 4 -cheby_variant 0 -cheby_scale 1 -rlx 16 -negA 1 > posneg.out.402.n +mpirun -np 4 ./ij -solver 3 -cheby_eig_est 0 -cheby_order 3 -cheby_variant 1 -cheby_scale 1 -rlx 16 -negA 0 > posneg.out.403.p +mpirun -np 4 ./ij -solver 3 -cheby_eig_est 0 -cheby_order 3 -cheby_variant 1 -cheby_scale 1 -rlx 16 -negA 1 > posneg.out.403.n + + diff --git a/src/test/TEST_ij/posneg.sh b/src/test/TEST_ij/posneg.sh new file mode 100755 index 000000000..85918e046 --- /dev/null +++ b/src/test/TEST_ij/posneg.sh @@ -0,0 +1,46 @@ +#!/bin/bash +# Copyright (c) 1998 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) + +TNAME=`basename $0 .sh` + +tail -3 ${TNAME}.out.400.p | head -2 > ${TNAME}.testdata +tail -3 ${TNAME}.out.400.n | head -2 > ${TNAME}.testdata.temp + +# Abuse HYPRE_NO_SAVED to skip the following diff with OMP +if [ -z $HYPRE_NO_SAVED ]; then + diff ${TNAME}.testdata ${TNAME}.testdata.temp >&2 +fi + +tail -3 ${TNAME}.out.401.p | head -2 > ${TNAME}.testdata +tail -3 ${TNAME}.out.401.n | head -2 > ${TNAME}.testdata.temp + +# Abuse HYPRE_NO_SAVED to skip the following diff with OMP +if [ -z $HYPRE_NO_SAVED ]; then + diff ${TNAME}.testdata ${TNAME}.testdata.temp >&2 +fi + +tail -3 ${TNAME}.out.402.p | head -2 > ${TNAME}.testdata +tail -3 ${TNAME}.out.402.n | head -2 > ${TNAME}.testdata.temp + +# Abuse HYPRE_NO_SAVED to skip the following diff with OMP +if [ -z $HYPRE_NO_SAVED ]; then + diff ${TNAME}.testdata ${TNAME}.testdata.temp >&2 +fi + +tail -3 ${TNAME}.out.403.p | head -2 > ${TNAME}.testdata +tail -3 ${TNAME}.out.403.n | head -2 > ${TNAME}.testdata.temp + +# Abuse HYPRE_NO_SAVED to skip the following diff with OMP +if [ -z $HYPRE_NO_SAVED ]; then + diff ${TNAME}.testdata ${TNAME}.testdata.temp >&2 +fi + +#============================================================================= +# remove temporary files +#============================================================================= + +rm -f ${TNAME}.testdata* + diff --git a/src/test/TEST_ij/solvers.jobs b/src/test/TEST_ij/solvers.jobs index c61fce2ea..d85ef8413 100755 --- a/src/test/TEST_ij/solvers.jobs +++ b/src/test/TEST_ij/solvers.jobs @@ -126,16 +126,6 @@ mpirun -np 2 ./ij -solver 70 -mgr_nlevels 5 -mgr_bsize 2 -mgr_non_c_to_f 0 -mgr_ mpirun -np 2 ./ij -solver 71 -mgr_nlevels 0 -mgr_bsize 2 -mgr_non_c_to_f 0 -mgr_frelax_method 0 -mgr_num_reserved_nodes 0 > solvers.out.212 mpirun -np 2 ./ij -solver 71 -mgr_nlevels 1 -mgr_bsize 2 -mgr_non_c_to_f 0 -mgr_frelax_method 0 -mgr_num_reserved_nodes 0 > solvers.out.213 -## Solve Ax=b and -Ax=b, convergence should be the same -mpirun -np 2 ./ij -solver 0 -rhsrand -negA 0 > solvers.out.400.p -mpirun -np 2 ./ij -solver 0 -rhsrand -negA 1 > solvers.out.400.n -mpirun -np 3 ./ij -solver 3 -rhsrand -negA 0 > solvers.out.401.p -mpirun -np 3 ./ij -solver 3 -rhsrand -negA 1 > solvers.out.401.n -mpirun -np 4 ./ij -cheby_eig_est 10 -cheby_order 4 -cheby_variant 0 -cheby_scale 1 -rlx 16 -negA 0 > solvers.out.402.p -mpirun -np 4 ./ij -cheby_eig_est 10 -cheby_order 4 -cheby_variant 0 -cheby_scale 1 -rlx 16 -negA 1 > solvers.out.402.n -mpirun -np 4 ./ij -solver 3 -cheby_eig_est 0 -cheby_order 3 -cheby_variant 1 -cheby_scale 1 -rlx 16 -negA 0 > solvers.out.403.p -mpirun -np 4 ./ij -solver 3 -cheby_eig_est 0 -cheby_order 3 -cheby_variant 1 -cheby_scale 1 -rlx 16 -negA 1 > solvers.out.403.n - ## Test relaxation methods 88 (L1 hybrid Symm. Gauss-Seidel with a convergent l1 term) and 89 (L1 Symm. hybrid Gauss-Seidel) mpirun -np 4 ./ij -fromfile data/tucker21935/IJ.A -solver 1 -rlx 88 > solvers.out.404 mpirun -np 4 ./ij -fromfile data/tucker21935/IJ.A -solver 1 -rlx 89 > solvers.out.405 diff --git a/src/test/TEST_ij/solvers.sh b/src/test/TEST_ij/solvers.sh index 4a9c9a41e..40445a31e 100755 --- a/src/test/TEST_ij/solvers.sh +++ b/src/test/TEST_ij/solvers.sh @@ -32,23 +32,6 @@ tail -17 ${TNAME}.out.200 | head -6 > ${TNAME}.mgr_testdata tail -17 ${TNAME}.out.202 | head -6 > ${TNAME}.mgr_testdata.temp diff ${TNAME}.mgr_testdata ${TNAME}.mgr_testdata.temp >&2 -#============================================================================= -tail -3 ${TNAME}.out.400.p | head -2 > ${TNAME}.testdata -tail -3 ${TNAME}.out.400.n | head -2 > ${TNAME}.testdata.temp -diff ${TNAME}.testdata ${TNAME}.testdata.temp >&2 - -tail -3 ${TNAME}.out.401.p | head -2 > ${TNAME}.testdata -tail -3 ${TNAME}.out.401.n | head -2 > ${TNAME}.testdata.temp -diff ${TNAME}.testdata ${TNAME}.testdata.temp >&2 - -tail -3 ${TNAME}.out.402.p | head -2 > ${TNAME}.testdata -tail -3 ${TNAME}.out.402.n | head -2 > ${TNAME}.testdata.temp -diff ${TNAME}.testdata ${TNAME}.testdata.temp >&2 - -tail -3 ${TNAME}.out.403.p | head -2 > ${TNAME}.testdata -tail -3 ${TNAME}.out.403.n | head -2 > ${TNAME}.testdata.temp -diff ${TNAME}.testdata ${TNAME}.testdata.temp >&2 - #============================================================================= # compare with baseline case #============================================================================= diff --git a/src/test/TEST_ij/state.jobs b/src/test/TEST_ij/state.jobs index 681e84c85..c7ab0bc17 100644 --- a/src/test/TEST_ij/state.jobs +++ b/src/test/TEST_ij/state.jobs @@ -11,19 +11,3 @@ mpirun -np 1 ./ij -test_init > state.out.1 mpirun -np 4 ./ij -test_init > state.out.100 -#============================================================================= -# Test library lazy initialization (sequential and parallel) -#============================================================================= - -mpirun -np 1 ./ij > state.out.1.a -mpirun -np 1 ./ij -lazy_device_init 1 > state.out.1.b - -mpirun -np 4 ./ij > state.out.2.a -mpirun -np 4 ./ij -lazy_device_init 1 > state.out.2.b - -mpirun -np 1 ./struct > state.out.3.a -mpirun -np 1 ./struct -lazy_device_init 1 > state.out.3.b - -mpirun -np 4 ./struct > state.out.4.a -mpirun -np 4 ./struct -lazy_device_init 1 > state.out.4.b - diff --git a/src/test/TEST_ij/state.sh b/src/test/TEST_ij/state.sh index 15741f66a..ea1e7538a 100755 --- a/src/test/TEST_ij/state.sh +++ b/src/test/TEST_ij/state.sh @@ -6,22 +6,6 @@ TNAME=`basename $0 .sh` -tail -3 ${TNAME}.out.1.a | head -2 > ${TNAME}.testdata -tail -3 ${TNAME}.out.1.b | head -2 > ${TNAME}.testdata.temp -diff ${TNAME}.testdata ${TNAME}.testdata.temp >&2 - -tail -3 ${TNAME}.out.2.a | head -2 > ${TNAME}.testdata -tail -3 ${TNAME}.out.2.b | head -2 > ${TNAME}.testdata.temp -diff ${TNAME}.testdata ${TNAME}.testdata.temp >&2 - -tail -3 ${TNAME}.out.3.a | head -2 > ${TNAME}.testdata -tail -3 ${TNAME}.out.3.b | head -2 > ${TNAME}.testdata.temp -diff ${TNAME}.testdata ${TNAME}.testdata.temp >&2 - -tail -3 ${TNAME}.out.4.a | head -2 > ${TNAME}.testdata -tail -3 ${TNAME}.out.4.b | head -2 > ${TNAME}.testdata.temp -diff ${TNAME}.testdata ${TNAME}.testdata.temp >&2 - #============================================================================= # Compare with baseline case #============================================================================= @@ -37,8 +21,3 @@ do tail -3 $i done > ${TNAME}.out -#============================================================================= -# remove temporary files -#============================================================================= - -rm -f ${TNAME}.testdata* diff --git a/src/test/TEST_struct/lazy.jobs b/src/test/TEST_struct/lazy.jobs new file mode 100644 index 000000000..6a161c7b1 --- /dev/null +++ b/src/test/TEST_struct/lazy.jobs @@ -0,0 +1,16 @@ +#!/bin/bash +# Copyright (c) 1998 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) + +#============================================================================= +# Test library lazy initialization (sequential and parallel) +#============================================================================= + +mpirun -np 1 ./struct > lazy.out.1.a +mpirun -np 1 ./struct -lazy_device_init 1 > lazy.out.1.b + +mpirun -np 4 ./struct > lazy.out.2.a +mpirun -np 4 ./struct -lazy_device_init 1 > lazy.out.2.b + diff --git a/src/test/TEST_struct/lazy.sh b/src/test/TEST_struct/lazy.sh new file mode 100755 index 000000000..12571909a --- /dev/null +++ b/src/test/TEST_struct/lazy.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# Copyright (c) 1998 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) + +TNAME=`basename $0 .sh` + +tail -3 ${TNAME}.out.1.a | head -2 > ${TNAME}.testdata +tail -3 ${TNAME}.out.1.b | head -2 > ${TNAME}.testdata.temp +diff ${TNAME}.testdata ${TNAME}.testdata.temp >&2 + +tail -3 ${TNAME}.out.2.a | head -2 > ${TNAME}.testdata +tail -3 ${TNAME}.out.2.b | head -2 > ${TNAME}.testdata.temp +diff ${TNAME}.testdata ${TNAME}.testdata.temp >&2 + +#============================================================================= +# remove temporary files +#============================================================================= + +rm -f ${TNAME}.testdata*