Commit dbef90e4 authored by Pavel Kus's avatar Pavel Kus
Browse files

extending check_correctness

Previously we checked ortonormality of eigenvectors by comparing
the matrix S^T * S to identity matrix. The new feature is also
checking just the diagonal of the matrix S^T * S. By that we get
the information, how far are the eigenvectors from having length 1.
If it turns out to be important, we could try to normalize them
at the end of elpa, which is simple (in contrast with enforcing
better orthogonality).
parent 07169f0e
......@@ -46,6 +46,7 @@
#undef CONST_REAL_0_0
#undef CONST_0_5
#undef CONST_1_0
#undef CONST_REAL_1_0
#undef CONST_2_0
#undef CONST_8_0
#undef MPI_REAL_PRECISION
......@@ -102,6 +103,7 @@
#define CONST_REAL_0_0 0.0_rk8
#define CONST_0_5 0.5_rk8
#define CONST_1_0 1.0_rk8
#define CONST_REAL_1_0 1.0_rk8
#define CONST_2_0 2.0_rk8
#define CONST_8_0 8.0_rk8
#define MPI_REAL_PRECISION MPI_REAL8
......@@ -157,6 +159,7 @@
#define CONST_REAL_0_0 0.0_rk4
#define CONST_0_5 0.5_rk4
#define CONST_1_0 1.0_rk4
#define CONST_REAL_1_0 1.0_rk4
#define CONST_2_0 2.0_rk4
#define CONST_8_0 8.0_rk4
#define MPI_REAL_PRECISION MPI_REAL4
......
......@@ -323,7 +323,7 @@ program test_complex2
!-------------------------------------------------------------------------------
! Test correctness of result (using plain scalapack routines)
status = check_correctness(na, nev, as, z, ev, sc_desc, myid)
status = check_correctness(na, nev, as, z, ev, sc_desc, nblk, myid, np_rows, np_cols, my_prow, my_pcol)
deallocate(a)
deallocate(as)
......
......@@ -315,7 +315,7 @@ program test_real2
!-------------------------------------------------------------------------------
! Test correctness of result (using plain scalapack routines)
status = check_correctness(na, nev, as, z, ev, sc_desc, myid)
status = check_correctness(na, nev, as, z, ev, sc_desc, nblk, myid, np_rows, np_cols, my_prow, my_pcol)
deallocate(a)
deallocate(as)
......
......@@ -323,7 +323,7 @@ program test_complex2
!-------------------------------------------------------------------------------
! Test correctness of result (using plain scalapack routines)
status = check_correctness(na, nev, as, z, ev, sc_desc, myid)
status = check_correctness(na, nev, as, z, ev, sc_desc, nblk, myid, np_rows, np_cols, my_prow, my_pcol)
deallocate(a)
deallocate(as)
......
......@@ -314,7 +314,7 @@ program test_real2
!-------------------------------------------------------------------------------
! Test correctness of result (using plain scalapack routines)
status = check_correctness(na, nev, as, z, ev, sc_desc, myid)
status = check_correctness(na, nev, as, z, ev, sc_desc, nblk, myid, np_rows, np_cols, my_prow, my_pcol)
deallocate(a)
deallocate(as)
......
......@@ -271,7 +271,7 @@ program test_complex_double_precision
!-------------------------------------------------------------------------------
! Test correctness of result (using plain scalapack routines)
status = check_correctness(na, nev, as, z, ev, sc_desc, myid)
status = check_correctness(na, nev, as, z, ev, sc_desc, nblk, myid, np_rows, np_cols, my_prow, my_pcol)
deallocate(a)
deallocate(as)
......
......@@ -46,7 +46,7 @@
program test_cholesky
use elpa1
use elpa_utilities
use elpa_utilities, only : error_unit
use test_util
use test_read_input_parameters
......
......@@ -270,7 +270,7 @@ program test_complex_gpu_version_double_precision
!-------------------------------------------------------------------------------
! Test correctness of result (using plain scalapack routines)
status = check_correctness(na, nev, as, z, ev, sc_desc, myid)
status = check_correctness(na, nev, as, z, ev, sc_desc, nblk, myid, np_rows, np_cols, my_prow, my_pcol)
deallocate(a)
deallocate(as)
......
......@@ -46,7 +46,7 @@
program test_invert_trm
use elpa1
use elpa_utilities
use elpa_utilities, only : error_unit
use test_util
use test_read_input_parameters
......
......@@ -264,7 +264,7 @@ program test_real_double_precision
!-------------------------------------------------------------------------------
! Test correctness of result (using plain scalapack routines)
status = check_correctness(na, nev, as, z, ev, sc_desc, myid)
status = check_correctness(na, nev, as, z, ev, sc_desc, nblk, myid, np_rows, np_cols, my_prow, my_pcol)
deallocate(a)
deallocate(as)
......
......@@ -46,7 +46,7 @@
program test_cholesky
use elpa1
use elpa_utilities
use elpa_utilities, only : error_unit
use test_util
use test_read_input_parameters
......
......@@ -264,7 +264,7 @@ program test_real_gpu_version_double_precision
!-------------------------------------------------------------------------------
! Test correctness of result (using plain scalapack routines)
status = check_correctness(na, nev, as, z, ev, sc_desc, myid)
status = check_correctness(na, nev, as, z, ev, sc_desc, nblk, myid, np_rows, np_cols, my_prow, my_pcol)
deallocate(a)
deallocate(as)
......
......@@ -46,7 +46,7 @@
program test_invert_trm
use elpa1
use elpa_utilities
use elpa_utilities, only : error_unit
use test_util
use test_read_input_parameters
......
......@@ -270,7 +270,7 @@ program test_complex_single_precision
!-------------------------------------------------------------------------------
! Test correctness of result (using plain scalapack routines)
status = check_correctness(na, nev, as, z, ev, sc_desc, myid)
status = check_correctness(na, nev, as, z, ev, sc_desc, nblk, myid, np_rows, np_cols, my_prow, my_pcol)
deallocate(a)
deallocate(as)
......
......@@ -46,7 +46,7 @@
program test_cholesky
use elpa1
use elpa_utilities
use elpa_utilities, only : error_unit
use test_util
use test_read_input_parameters
......
......@@ -270,7 +270,7 @@ program test_complex_gpu_version_single_precision
!-------------------------------------------------------------------------------
! Test correctness of result (using plain scalapack routines)
status = check_correctness(na, nev, as, z, ev, sc_desc, myid)
status = check_correctness(na, nev, as, z, ev, sc_desc, nblk, myid, np_rows, np_cols, my_prow, my_pcol)
deallocate(a)
deallocate(as)
......
......@@ -46,7 +46,7 @@
program test_invert_trm
use elpa1
use elpa_utilities
use elpa_utilities, only : error_unit
use test_util
use test_read_input_parameters
......
......@@ -263,7 +263,7 @@ program test_real_single_precision
!-------------------------------------------------------------------------------
! Test correctness of result (using plain scalapack routines)
status = check_correctness(na, nev, as, z, ev, sc_desc, myid)
status = check_correctness(na, nev, as, z, ev, sc_desc, nblk, myid, np_rows, np_cols, my_prow, my_pcol)
deallocate(a)
deallocate(as)
......
......@@ -46,7 +46,7 @@
program test_cholesky
use elpa1
use elpa_utilities
use elpa_utilities, only : error_unit
use test_util
use test_read_input_parameters
......
......@@ -264,7 +264,7 @@ program test_real_gpu_version_single_precision
!-------------------------------------------------------------------------------
! Test correctness of result (using plain scalapack routines)
status = check_correctness(na, nev, as, z, ev, sc_desc, myid)
status = check_correctness(na, nev, as, z, ev, sc_desc, nblk, myid, np_rows, np_cols, my_prow, my_pcol)
deallocate(a)
deallocate(as)
......
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