Commit 85af2858 authored by Pavel Kus's avatar Pavel Kus

fixing Cholesky decomposition test

This test was wrong, it was computing A * A^T instead of A^T * A.
The latter is correct since our implementation of Cholesky decomposition
stores the triangular matrix in the upper triangle
The test was passing only because the Cholesky decomposition was tested
with diagonal matrix only, than this does not matter.
parent 40ac762e
......@@ -376,8 +376,8 @@ program test
#endif /* EIGENVALUES OR TRIDIAGONAL */
#if defined(TEST_CHOLESKY)
diagonalElement = (2.546_rk, 0.0_rk)
subdiagonalElement = (0.0_rk, 0.0_rk)
diagonalElement = 2.0_rk * ONE
subdiagonalElement = -1.0_rk * ONE
call prepare_matrix_toeplitz(na, diagonalElement, subdiagonalElement, &
d, sd, ds, sds, a, as, nblk, np_rows, &
np_cols, my_prow, my_pcol)
......
......@@ -407,15 +407,15 @@ function check_correctness_evp_numeric_residuals_&
#endif /* WITH_MPI */
#endif /* COMPLEXCASE == 1 */
! tmp2 = a * a**T
! tmp2 = a**T * a
#ifdef WITH_MPI
call p&
&BLAS_CHAR&
&gemm("N","N", na, na, na, ONE, a, 1, 1, sc_desc, tmp1, 1, 1, &
&gemm("N","N", na, na, na, ONE, tmp1, 1, 1, sc_desc, a, 1, 1, &
sc_desc, ZERO, tmp2, 1, 1, sc_desc)
#else /* WITH_MPI */
call BLAS_CHAR&
&gemm("N","N", na, na, na, ONE, a, na, tmp1, na, ZERO, tmp2, na)
&gemm("N","N", na, na, na, ONE, tmp1, na, a, na, ZERO, tmp2, na)
#endif /* WITH_MPI */
! compare tmp2 with original matrix
......
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