Commit 945cafe4 authored by Pavel Kus's avatar Pavel Kus

introducing skip_check_correctness optional parameter for tests

if provided a a fourth parameter, all correctness checks will be
skipped. Can be usefull for repeated performance tests.
parent d37d3dfb
......@@ -125,7 +125,7 @@ program test_complex2
success = .true.
call read_input_parameters_traditional(na, nev, nblk, write_to_file)
call read_input_parameters(na, nev, nblk, write_to_file)
!-------------------------------------------------------------------------------
! MPI Initialization
call setup_mpi(myid, nprocs)
......
......@@ -122,7 +122,7 @@ program test_real2
success = .true.
call read_input_parameters_traditional(na, nev, nblk, write_to_file)
call read_input_parameters(na, nev, nblk, write_to_file)
!-------------------------------------------------------------------------------
! MPI Initialization
......
......@@ -125,7 +125,7 @@ program test_complex2
success = .true.
call read_input_parameters_traditional(na, nev, nblk, write_to_file)
call read_input_parameters(na, nev, nblk, write_to_file)
!-------------------------------------------------------------------------------
! MPI Initialization
call setup_mpi(myid, nprocs)
......
......@@ -122,7 +122,7 @@ program test_real2
integer(kind=ik) :: j
success = .true.
call read_input_parameters_traditional(na, nev, nblk, write_to_file)
call read_input_parameters(na, nev, nblk, write_to_file)
!-------------------------------------------------------------------------------
! MPI Initialization
......
......@@ -100,7 +100,7 @@ program test_transpose_multiply
success = .true.
call read_input_parameters_traditional(na, nev, nblk, write_to_file)
call read_input_parameters(na, nev, nblk, write_to_file)
!-------------------------------------------------------------------------------
! MPI Initialization
......
......@@ -99,7 +99,7 @@ program test_transpose_multiply
success = .true.
call read_input_parameters_traditional(na, nev, nblk, write_to_file)
call read_input_parameters(na, nev, nblk, write_to_file)
!-------------------------------------------------------------------------------
! MPI Initialization
......
......@@ -100,7 +100,7 @@ program test_transpose_multiply
success = .true.
call read_input_parameters_traditional(na, nev, nblk, write_to_file)
call read_input_parameters(na, nev, nblk, write_to_file)
!-------------------------------------------------------------------------------
! MPI Initialization
......
......@@ -100,7 +100,7 @@ program test_transpose_multiply
success = .true.
call read_input_parameters_traditional(na, nev, nblk, write_to_file)
call read_input_parameters(na, nev, nblk, write_to_file)
!-------------------------------------------------------------------------------
! MPI Initialization
......
......@@ -132,7 +132,7 @@ program test_complex2_double_banded
#define COMPLEXCASE
#define DOUBLE_PRECISION_COMPLEX 1
call read_input_parameters_traditional(na, nev, nblk, write_to_file)
call read_input_parameters(na, nev, nblk, write_to_file)
!-------------------------------------------------------------------------------
! MPI Initialization
call setup_mpi(myid, nprocs)
......
......@@ -88,7 +88,7 @@ program test_interface
type(output_t) :: write_to_file
class(elpa_t), pointer :: e1, e2
call read_input_parameters_traditional(na, nev, nblk, write_to_file)
call read_input_parameters(na, nev, nblk, write_to_file)
call setup_mpi(myid, nprocs)
status = 0
......
......@@ -127,7 +127,7 @@ program test_real2_double_banded
#define DOUBLE_PRECISION_REAL 1
call read_input_parameters_traditional(na, nev, nblk, write_to_file)
call read_input_parameters(na, nev, nblk, write_to_file)
!-------------------------------------------------------------------------------
! MPI Initialization
......
......@@ -132,7 +132,7 @@ program test_complex2_single_banded
#define COMPLEXCASE
#define DOUBLE_PRECISION_COMPLEX 1
call read_input_parameters_traditional(na, nev, nblk, write_to_file)
call read_input_parameters(na, nev, nblk, write_to_file)
!-------------------------------------------------------------------------------
! MPI Initialization
call setup_mpi(myid, nprocs)
......
......@@ -125,7 +125,7 @@ program test_real2_single_banded
class(elpa_t), pointer :: e
#define DOUBLE_PRECISION_REAL 1
call read_input_parameters_traditional(na, nev, nblk, write_to_file)
call read_input_parameters(na, nev, nblk, write_to_file)
!-------------------------------------------------------------------------------
! MPI Initialization
......
......@@ -149,7 +149,7 @@ program test
! eigenvalues
EV_TYPE, allocatable :: ev(:)
logical :: check_all_evals
logical :: check_all_evals, skip_check_correctness
#if defined(TEST_MATRIX_TOEPLITZ) || defined(TEST_MATRIX_FRANK)
EV_TYPE, allocatable :: d(:), sd(:), ds(:), sds(:)
......@@ -176,7 +176,7 @@ program test
do_test_toeplitz_eigenvalues, do_test_cholesky, &
do_test_hermitian_multiply
call read_input_parameters_traditional(na, nev, nblk, write_to_file)
call read_input_parameters_traditional(na, nev, nblk, write_to_file, skip_check_correctness)
call setup_mpi(myid, nprocs)
#ifdef HAVE_REDIRECT
#ifdef WITH_MPI
......@@ -509,6 +509,18 @@ program test
#endif /* TEST_HERMITIAN_MULTIPLY */
! if the test is used for (repeated) performacne tests, one might want to skip the checking
! of the results, which might be time-consuming and not necessary.
if(skip_check_correctness) then
do_test_numeric_residual = .false.
do_test_numeric_residual_generalized = .false.
do_test_analytic_eigenvalues = .false.
do_test_analytic_eigenvalues_eigenvectors = .false.
do_test_frank_eigenvalues = .false.
do_test_toeplitz_eigenvalues = .false.
do_test_cholesky = .false.
endif
e => elpa_allocate()
call e%set("na", na, error)
......
......@@ -124,7 +124,7 @@ program test
class(elpa_t), pointer :: e
class(elpa_autotune_t), pointer :: tune_state
call read_input_parameters_traditional(na, nev, nblk, write_to_file)
call read_input_parameters(na, nev, nblk, write_to_file)
call setup_mpi(myid, nprocs)
#ifdef HAVE_REDIRECT
#ifdef WITH_MPI
......
......@@ -64,6 +64,7 @@ module test_read_input_parameters
interface read_input_parameters
module procedure read_input_parameters_general
module procedure read_input_parameters_traditional
module procedure read_input_parameters_traditional_noskip
end interface
contains
......@@ -338,12 +339,24 @@ module test_read_input_parameters
end subroutine
subroutine read_input_parameters_traditional(na, nev, nblk, write_to_file)
subroutine read_input_parameters_traditional_noskip(na, nev, nblk, write_to_file)
implicit none
integer(kind=ik), intent(out) :: na, nev, nblk
type(output_t), intent(out) :: write_to_file
logical :: skip_check_correctness
call read_input_parameters_traditional(na, nev, nblk, write_to_file, skip_check_correctness)
end subroutine
subroutine read_input_parameters_traditional(na, nev, nblk, write_to_file, skip_check_correctness)
implicit none
integer(kind=ik), intent(out) :: na, nev, nblk
type(output_t), intent(out) :: write_to_file
logical, intent(out) :: skip_check_correctness
! Command line arguments
character(len=128) :: arg1, arg2, arg3, arg4, arg5
......@@ -355,6 +368,7 @@ module test_read_input_parameters
nblk = 16
write_to_file%eigenvectors = .false.
write_to_file%eigenvalues = .false.
skip_check_correctness = .false.
if (.not. any(COMMAND_ARGUMENT_COUNT() == [0, 3, 4, 5])) then
write(error_unit, '(a,i0,a)') "Invalid number (", COMMAND_ARGUMENT_COUNT(), ") of command line arguments!"
......@@ -384,8 +398,11 @@ module test_read_input_parameters
if (arg4 .eq. "output_eigenvalues") then
write_to_file%eigenvalues = .true.
elseif (arg4 .eq. "skip_check_correctness") then
skip_check_correctness = .true.
else
write(error_unit, *) "Invalid value for output flag! Must be ""output_eigenvalues"" or omitted"
write(error_unit, *) &
"Invalid value for parameter 4. Must be ""output_eigenvalues"", ""skip_check_correctness"" or omitted"
stop 1
endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment