#!/bin/sh
# 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)

#=============================================================================
# ij: LOBPCG cases
#=============================================================================

mpirun -np 2  ./ij -lobpcg -vrand 2 -seed 1 -tol 1.e-4 -vout 1 > ijdefault.out.vout.1

# use vectors computed by previous run as the initial
mpirun -np 2  ./ij -lobpcg -vfromfile -seed 1 > ijdefault.out.vfromfile

#=============================================================================
# lobpcg: Run default case with all available PCG preconditioners
#    1: BoomerAMG_PCG
#    2: DS_PCG
#    8: ParaSails_PCG
#   12: Schwarz_PCG
#   43: Euclid_PCG
#=============================================================================

#PCG run ...LOBPCG run for one eigenpair...LOBPCG for 5 eigenpairs
mpirun -np 2  ./ij -solver 1 -tol 1.e-6  > ijdefault.out.1.lobpcg
mpirun -np 2  ./ij -lobpcg -solver 1 -tol 1.e-6 -pcgitr 0 -seed 1 -vrand 1 > ijdefault.out.1.lobpcg.1
mpirun -np 2  ./ij -lobpcg -solver 1 -tol 1.e-6 -pcgitr 0  -seed 1 -vrand 5 > ijdefault.out.1.lobpcg.5

#PCG run ...LOBPCG run for one eigenpair...LOBPCG for 5 eigenpairs
mpirun -np 2  ./ij -solver 2 -tol 1.e-6  > ijdefault.out.2.lobpcg
mpirun -np 2  ./ij -lobpcg -solver 2 -tol 1.e-6  -pcgitr 20 -seed 1 -vrand 1 > ijdefault.out.2.lobpcg.1
mpirun -np 2  ./ij -lobpcg -solver 2 -tol 1.e-6  -pcgitr 20 -seed 1 -vrand 5 > ijdefault.out.2.lobpcg.5

#PCG run ...LOBPCG run for one eigenpair...LOBPCG for 5 eigenpairs
#mpirun -np 2  ./ij -solver 8 -tol 1.e-6  > ijdefault.out.8.lobpcg
#mpirun -np 2  ./ij -lobpcg -solver 8 -tol 1.e-6  -pcgitr 10 -seed 1 -vrand 1 > ijdefault.out.8.lobpcg.1
#mpirun -np 2  ./ij -lobpcg -solver 8 -tol 1.e-6  -pcgitr 10 -seed 1 -vrand 5 > ijdefault.out.8.lobpcg.5

#PCG run ...LOBPCG run for one eigenpair...LOBPCG for 5 eigenpairs
mpirun -np 2  ./ij -solver 12 -tol 1.e-6  > ijdefault.out.12.lobpcg
mpirun -np 2  ./ij -lobpcg -solver 12 -tol 1.e-6  -pcgitr 10 -seed 1 -vrand 1 > ijdefault.out.12.lobpcg.1
mpirun -np 2  ./ij -lobpcg -solver 12 -tol 1.e-6  -pcgitr 10 -seed 1 -vrand 5 > ijdefault.out.12.lobpcg.5

#PCG run ...LOBPCG run for one eigenpair...LOBPCG for 5 eigenpairs
#mpirun -np 2  ./ij -solver 43 -tol 1.e-6  > ijdefault.out.43.lobpcg
#mpirun -np 2  ./ij -lobpcg -solver 43 -tol 1.e-6  -pcgitr 10 -seed 1 -vrand 1 > ijdefault.out.43.lobpcg.1
#mpirun -np 2  ./ij -lobpcg -solver 43 -tol 1.e-6  -pcgitr 10 -seed 1 -vrand 5 > ijdefault.out.43.lobpcg.5

