Commit 088513b2 authored by Andreas Marek's avatar Andreas Marek
Browse files

Better seperate the three steps of solve 1stage:

whether or not a step is actually computed is decided with logicals
(default all 3 steps are computed). This makes the implementation
of "solve_tridi" and "eigenvalues_only" a bit cleaner in the future
parent 17c722d6
......@@ -113,6 +113,8 @@ function elpa_solve_evp_&
integer(kind=ik) :: na, nev, lda, ldq, nblk, matrixCols, &
mpi_comm_rows, mpi_comm_cols, mpi_comm_all
logical :: do_bandred, do_solve, do_trans_ev
call obj%timer%start("elpa_solve_evp_&
......@@ -236,6 +238,18 @@ function elpa_solve_evp_&
stop 1
! start the computations
! as default do all three steps (this might change at some point)
do_bandred = .true.
do_solve = .true.
do_trans_ev = .true.
if (obj%eigenvalues_only) then
do_trans_ev = .true.
if (do_bandred) then
call obj%timer%start("forward")
call tridiag_&
......@@ -243,7 +257,9 @@ function elpa_solve_evp_&
& (obj, na, a, lda, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols, ev, e, tau, do_useGPU)
call obj%timer%stop("forward")
endif !do_bandred
if (do_solve) then
call obj%timer%start("solve")
call solve_tridi_&
......@@ -257,12 +273,9 @@ function elpa_solve_evp_&
nblk, matrixCols, mpi_comm_rows, mpi_comm_cols, wantDebug, success)
call obj%timer%stop("solve")
if (.not.(success)) return
endif !do_solve
if (obj%eigenvalues_only) then
if (.not.(obj%eigenvalues_only) ) then
if (do_trans_ev) then
! q must be given thats why from here on we can use q and not q_actual
q(1:l_rows,1:l_cols_nev) = q_real(1:l_rows,1:l_cols_nev)
......@@ -275,7 +288,7 @@ function elpa_solve_evp_&
& (obj, na, nev, a, lda, tau, q, ldq, nblk, matrixCols, mpi_comm_rows, mpi_comm_cols, do_useGPU)
call obj%timer%stop("back")
endif ! .not.(obj%eigenvalues_only
endif ! do_trans_ev
deallocate(q_real, stat=istat, errmsg=errorMessage)
......@@ -309,7 +322,6 @@ function elpa_solve_evp_&
&" // ": error when deallocating q_dummy "//errorMessage
stop 1
call obj%timer%stop("elpa_solve_evp_&
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