

#
# Main Stratimikos tests
#

(FRAMEWORK, INSTALL, StratimikosAmesos) {
    TESTS = ../example/simple_stratimikos_example_amesos.exe;
    ARGS = --linear-solver-params-file=../example/amesos.klu.xml --matrix-file=../example/FourByFour.mtx --tol=1e-13;
    COMM = MPI(1),SERIAL;
}

(FRAMEWORK, INSTALL, StratimikosAmesos) {
    TESTS = ../example/simple_stratimikos_example_amesos.exe;
    ARGS = --extra-linear-solver-params="<ParameterList><Parameter name=\"Linear Solver Type\" type=\"string\" value=\"Amesos\"/></ParameterList>"  --matrix-file=../example/FourByFour.mtx --tol=1e-10 --linear-solver-params-used-file=lowsf.amesos.used.xml;
    COMM = MPI(1),SERIAL;
}

(FRAMEWORK, INSTALL, StratimikosAztecOOIfpack) {
    TESTS = ../example/simple_stratimikos_example_aztecoo_ifpack.exe;
    ARGS = --linear-solver-params-file=../example/aztecoo.ifpack.xml --matrix-file=../example/FourByFour.mtx --tol=1e-13;
    COMM = MPI(1),SERIAL;
}

(FRAMEWORK, INSTALL, StratimikosAztecOOIfpack) {
    TESTS = ../example/simple_stratimikos_example_aztecoo_ifpack.exe;
    ARGS = --extra-linear-solver-params="<ParameterList><Parameter name=\"Linear Solver Type\" type=\"string\" value=\"AztecOO\"/></ParameterList>"  --matrix-file=../example/FourByFour.mtx --tol=1e-10 --linear-solver-params-used-file=lowsf.aztecoo.used.xml;
    COMM = MPI(1),SERIAL;
}

(FRAMEWORK, INSTALL, StratimikosAztecOOML) {
    TESTS = ../example/simple_stratimikos_example_aztecoo_ml.exe;
    ARGS = --linear-solver-params-file=../example/aztecoo.ml.xml --matrix-file=../example/FourByFour.mtx --tol=1e-13;
    COMM = MPI(1),SERIAL;
}

(FRAMEWORK, INSTALL, StratimikosBelosIfpack) {
    TESTS = ../example/simple_stratimikos_example_belos_ifpack.exe;
    ARGS = --linear-solver-params-file=../example/belos.ifpack.xml --matrix-file=../example/FourByFour.mtx --tol=1e-13;
    COMM = MPI(1),SERIAL;
}

(FRAMEWORK, INSTALL, StratimikosBelosML) {
    TESTS = ../example/simple_stratimikos_example_belos_ml.exe;
    ARGS = --linear-solver-params-file=../example/belos.ml.xml --matrix-file=../example/FourByFour.mtx --tol=1e-13;
    COMM = MPI(1),SERIAL;
}

(FRAMEWORK, INSTALL, StratimikosAmesos) {
    TESTS = ./test_single_stratimikos_solver_driver_amesos.exe;
    ARGS = --input-file=FourByFour.xml,
      --input-file=FourByFour.amesos.xml;
    COMM = MPI(1),SERIAL;
}

(FRAMEWORK, INSTALL, StratimikosAztecOOIfpack) {
    TESTS = ./test_single_stratimikos_solver_driver_aztecoo_ifpack.exe;
    ARGS = --input-file=FourByFour.aztecoo.np.xml,
      --input-file=FourByFour.aztecoo.ifpack.xml,
      --input-file=FourByFour.aztecoo.ifpack.adjoint.xml;
    COMM = MPI(1),SERIAL;
}

(FRAMEWORK, INSTALL, StratimikosAztecOOML) {
    TESTS = ./test_single_stratimikos_solver_driver_aztecoo_ml.exe;
    ARGS = --input-file=FourByFour.aztecoo.np.xml, --input-file=FourByFour.aztecoo.ml.xml;
    COMM = MPI(1),SERIAL;
}

(FRAMEWORK, INSTALL, StratimikosBelosIfpack) {
    TESTS = ./test_single_stratimikos_solver_driver_belos_ifpack.exe;
    ARGS = --input-file=FourByFour.belos.np.xml, --input-file=FourByFour.belos.ifpack.xml;
    COMM = MPI(1),SERIAL;
}

(FRAMEWORK, INSTALL, StratimikosBelosML) {
    TESTS = ./test_single_stratimikos_solver_driver_belos_ml.exe;
    ARGS = --input-file=FourByFour.belos.np.xml, --input-file=FourByFour.belos.ml.xml;
    COMM = MPI(1),SERIAL;
}

(FRAMEWORK, INSTALL, StratimikosAztecOOIfpack) {
    TESTS = ../example/MixedOrderPhysicsBasedPreconditioner_aztecoo_ifpack.exe;
    ARGS = --params-file=MixedOrderPhysicsBasedPreconditioner.Base.xml --base-dir=../example --solve-tol=1.0,
      --params-file=MixedOrderPhysicsBasedPreconditioner.Base.xml --extra-params-file=MixedOrderPhysicsBasedPreconditioner.P2SolveOutput.xml --base-dir=../example --solve-tol=1.0,
      --params-file=MixedOrderPhysicsBasedPreconditioner.Base.xml --extra-params-file=MixedOrderPhysicsBasedPreconditioner.AllSolveOutput.xml --base-dir=../example --solve-tol=1.0,
      --params-file=MixedOrderPhysicsBasedPreconditioner.Base.xml --extra-params-file=MixedOrderPhysicsBasedPreconditioner.P2SolveOutputMSolveOutputToFile.xml --base-dir=../example --solve-tol=1.0,
      --params-file=MixedOrderPhysicsBasedPreconditioner.Base.xml --extra-params-file=MixedOrderPhysicsBasedPreconditioner.P2SolveOutput.xml --base-dir=../example --use-algebraic-prec --solve-tol=1.0;
    COMM = MPI(1),SERIAL;
}

(FRAMEWORK, INSTALL, StratimikosBelosIfpack) {
    TESTS = ../example/MixedOrderPhysicsBasedPreconditioner_belos_ifpack.exe;
    ARGS = \
      --params-file=MixedOrderPhysicsBasedPreconditioner.Belos.xml --base-dir=../example --use-algebraic-prec --solve-tol=1e+5,
      --params-file=MixedOrderPhysicsBasedPreconditioner.Belos.xml --base-dir=../example --invert-P1 --solve-tol=1e+5;
    COMM = MPI(1),SERIAL;
}

(DOCUMENTATION) {
    TESTS = ../example/generate-sample-output.pl;
    COMM = MPI(1),SERIAL;
}


#
# Amesos/Stratimikos tests
#

(FRAMEWORK, INSTALL, StratimikosAmesos) {
    TESTS = ../adapters/amesos/test/test_amesos_thyra_driver.exe;
    ARGS = --matrix-dir=../adapters/amesos/test --show-all-tests;
    COMM = SERIAL;
}


#
# AztecOO/Stratimikos tests
#

(FRAMEWORK, INSTALL, StratimikosAztecOO) {
    TESTS = ../adapters/aztecoo/test/test_single_aztecoo_thyra_solver_driver.exe;
    ARGS = --matrix-file=../adapters/aztecoo/test/FourByFour.mtx --show-all-tests;
    X-HOST = paunchy;
    COMM = MPI(1), SERIAL;
}

(FRAMEWORK, INSTALL, StratimikosAztecOO) {
    TESTS = ../adapters/aztecoo/test/test_aztecoo_thyra_driver.exe;
    ARGS = --matrix-dir=../adapters/aztecoo/test --show-all-tests;
    X-HOST = paunchy;
    COMM = MPI(1), SERIAL;
}

(FRAMEWORK, INSTALL, StratimikosAztecOO) {
    TESTS = ../adapters/aztecoo/test/testEpetraOperatorWrapper.exe;
    X-HOST = paunchy;
    COMM = MPI(1), SERIAL;
}


#
# Belos/Stratimikos tests
#

(FRAMEWORK,INSTALL,StratimikosBelos) {
    TESTS = ../adapters/belos/test/MVOPTester/MVOPTesterThyra_test.exe;
    ARGS = -v;
    EXIT-STATUS = STRING-COMPARISON;
    COMM = SERIAL, MPI;
}

(FRAMEWORK,INSTALL,StratimikosBelos) {
    TESTS = ../adapters/belos/test/LOWSFactory/test_single_belos_thyra_solver_driver.exe;
    ARGS = --max-iters=4 --no-use-preconditioner --show-all-tests  --matrix-file=../adapters/belos/test/LOWSFactory/FourByFour.mtx;
    COMM = SERIAL;
}

(FRAMEWORK,INSTALL,StratimikosBelos) {
    TESTS = ../adapters/belos/test/LOWSFactory/test_single_belos_thyra_solver_driver.exe;
    ARGS = --max-iters=1 --show-all-tests --matrix-file=../adapters/belos/test/LOWSFactory/FourByFour.mtx;
    COMM = SERIAL;
}

(FRAMEWORK,INSTALL,StratimikosBelos) {
    TESTS = ../adapters/belos/test/LOWSFactory/test_single_belos_thyra_solver_driver.exe;
    ARGS = --show-all-tests --gmres-krylov-length=190 --max-solution-error=1e-2 --max-resid=1e-6 --matrix-file=../adapters/belos/test/LOWSFactory/nos5.mtx;
    COMM = SERIAL;
}

(FRAMEWORK,INSTALL,StratimikosBelos) {
    TESTS = ../adapters/belos/test/LOWSFactory/test_single_belos_thyra_solver_driver.exe;
    ARGS =  --no-use-preconditioner --show-all-tests --num-rhs=1 --block-size=1 --gmres-krylov-length=300 \
            --max-fwd-error=1e-13 --max-resid=1e-13 --max-iters=1000 --max-solution-error=1e-6 --matrix-file=../adapters/belos/test/LOWSFactory/nos1.mtx;
    COMM = SERIAL;
}

(FRAMEWORK,INSTALL,StratimikosBelos) {
    TESTS = ../adapters/belos/test/LOWSFactory/test_single_belos_thyra_solver_driver.exe;
    ARGS =  --no-use-preconditioner --show-all-tests --num-rhs=8 --block-size=8 --gmres-krylov-length=300 --max-fwd-error=1e-13 \
            --max-resid=1e-13 --max-iters=1000 --max-solution-error=1e-6 --matrix-file=../adapters/belos/test/LOWSFactory/nos1.mtx;
    COMM = SERIAL;
    X-HOST = s858352.srn.sandia.gov;
}

(FRAMEWORK,INSTALL,StratimikosBelos) {
    TESTS = ../adapters/belos/test/LOWSFactory/test_single_belos_thyra_solver_driver.exe;
    ARGS =  --show-all-tests --num-rhs=1 --block-size=1 --gmres-krylov-length=300 --max-fwd-error=1e-13 --max-resid=1e-13 \
            --max-iters=1000 --max-solution-error=1e-6 --matrix-file=../adapters/belos/test/LOWSFactory/nos1.mtx;
    COMM = SERIAL;
}

(FRAMEWORK,INSTALL,StratimikosBelos) {
    TESTS = ../adapters/belos/test/LOWSFactory/test_single_belos_thyra_solver_driver.exe;
    ARGS =  --show-all-tests --num-rhs=8 --block-size=8 --gmres-krylov-length=300 --max-fwd-error=1e-13 --max-resid=1e-13 \
            --max-iters=1000 --max-solution-error=1e-6 --matrix-file=../adapters/belos/test/LOWSFactory/nos1.mtx;
    COMM = SERIAL;
    X-HOST = s858352.srn.sandia.gov;
}
