Commit 3ac5664b authored by Andreas Marek's avatar Andreas Marek

Fix error in Toeplitz test

parent bed147d5
...@@ -221,21 +221,7 @@ program test ...@@ -221,21 +221,7 @@ program test
#endif #endif
#if defined(__EIGENVALUES) || defined(__SOLVE_TRIDIAGONAL) #if defined(__EIGENVALUES) || defined(__SOLVE_TRIDIAGONAL)
#ifdef TEST_REAL call prepare_toeplitz_matrix(na, d, sd, ds, sds, a, as, z, nblk, np_rows, np_cols, my_prow, my_pcol)
#ifdef TEST_SINGLE
call prepare_toeplitz_matrix_real_single(na, d, sd, ds, sds, a, as, z, nblk, np_rows, np_cols, my_prow, my_pcol)
#else
call prepare_toeplitz_matrix_real_double(na, d, sd, ds, sds, a, as, z, nblk, np_rows, np_cols, my_prow, my_pcol)
#endif
#endif
#ifdef TEST_COMPLEX
#ifdef TEST_SINGLE
call prepare_toeplitz_matrix_complex_single(na, d, sd, ds, sds, a, as, z, nblk, np_rows, np_cols, my_prow, my_pcol)
#else
call prepare_toeplitz_matrix_complex_double(na, d, sd, ds, sds, a, as, z, nblk, np_rows, np_cols, my_prow, my_pcol)
#endif
#endif
#endif #endif
if (elpa_init(CURRENT_API_VERSION) /= ELPA_OK) then if (elpa_init(CURRENT_API_VERSION) /= ELPA_OK) then
...@@ -342,7 +328,6 @@ program test ...@@ -342,7 +328,6 @@ program test
if (myid .eq. 0) then if (myid .eq. 0) then
#ifdef TEST_SOLVER_2STAGE #ifdef TEST_SOLVER_2STAGE
call e%print_times("e%eigenvectors()")
call e%print_times(elpa_int_value_to_string(KERNEL_KEY, kernel)) call e%print_times(elpa_int_value_to_string(KERNEL_KEY, kernel))
#else #else
#ifdef __EIGENVECTORS #ifdef __EIGENVECTORS
...@@ -372,6 +357,8 @@ program test ...@@ -372,6 +357,8 @@ program test
#if defined(__EIGENVALUES) || defined(__SOLVE_TRIDIAGONAL) #if defined(__EIGENVALUES) || defined(__SOLVE_TRIDIAGONAL)
status = 0 status = 0
! analytic solution ! analytic solution
diagonalElement = ds(1)
subdiagonalElement = sds(1)
do ii=1, na do ii=1, na
#ifdef TEST_DOUBLE #ifdef TEST_DOUBLE
ev_analytic(ii) = diagonalElement + 2.0 * subdiagonalElement *cos( pi*real(ii,kind=rk8)/ real(na+1,kind=rk8) ) ev_analytic(ii) = diagonalElement + 2.0 * subdiagonalElement *cos( pi*real(ii,kind=rk8)/ real(na+1,kind=rk8) )
......
...@@ -216,7 +216,7 @@ subroutine prepare_matrix_& ...@@ -216,7 +216,7 @@ subroutine prepare_matrix_&
implicit none implicit none
integer, intent(in) :: na, nblk, np_rows, np_cols, my_prow, my_pcol integer, intent(in) :: na, nblk, np_rows, np_cols, my_prow, my_pcol
integer :: diagonalElement, subdiagonalElement real(kind=C_DATATYPE_KIND) :: diagonalElement, subdiagonalElement
real(kind=C_DATATYPE_KIND) :: d(:), sd(:), ds(:), sds(:) real(kind=C_DATATYPE_KIND) :: d(:), sd(:), ds(:), sds(:)
#if REALCASE == 1 #if REALCASE == 1
......
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