Commit 0c77c087 authored by Yingzhou Li's avatar Yingzhou Li Committed by Victor Yu

Revert Chebfilter back

parent 15cd905a
......@@ -34,9 +34,9 @@ module ELSI_RCI_CHEBFILTER
! Matrix ID of size n by n
!&<
integer(i4), parameter :: MID_HR = 21
integer(i4), parameter :: MID_VR = 22
integer(i4), parameter :: MID_WORK1 = 23
integer(i4), parameter :: MID_SR = 24
integer(i4), parameter :: MID_SR = 22
integer(i4), parameter :: MID_VR = 23
integer(i4), parameter :: MID_WORK1 = 24
!&>
! Stage ID
......@@ -93,18 +93,10 @@ contains
! Allocate matrix of size n by n
if (ijob == SID_ALLOCATE + 2) then
iter = iter + 1
if ovlp_is_unit then
if (iter > 23) then
call rci_op_stop(task)
else
call rci_op_allocate(iS, task, n, n, iter)
end if
if (iter > 24) then
call rci_op_stop(task)
else
if (iter > 24) then
call rci_op_stop(task)
else
call rci_op_allocate(iS, task, n, n, iter)
end if
call rci_op_allocate(iS, task, n, n, iter)
end if
return
end if
......@@ -149,18 +141,10 @@ contains
! Deallocate matrix of size n by n
if (ijob == SID_DEALLOCATE + 2) then
iter = iter + 1
if ovlp_is_unit then
if (iter > 23) then
call rci_op_stop(task)
else
call rci_op_deallocate(iS, task, iter)
end if
if (iter > 24) then
call rci_op_stop(task)
else
if (iter > 24) then
call rci_op_stop(task)
else
call rci_op_deallocate(iS, task, iter)
end if
call rci_op_deallocate(iS, task, iter)
end if
return
end if
......@@ -201,7 +185,6 @@ contains
real(r8), save, allocatable :: Vec_ev(:)
real(r8), save, allocatable :: Vec_evold(:)
logical :: ovlp_is_unit ! unitary matrix flag.
logical :: convflag ! convergence flag.
!**********************************************!
......@@ -213,7 +196,6 @@ contains
n = r_h%n_state
nact = r_h%n_state
n_state = r_h%n_state
ovlp_is_unit = r_h%ovlp_is_unit
max_iter = r_h%max_iter
max_inneriter = r_h%cheb_max_inneriter
tol_iter = r_h%tol_iter
......@@ -335,11 +317,7 @@ contains
! -- SPsi = S*Psi
if (ijob == SID_ORTH + 3) then
if ovlp_is_unit then
call rci_op_null(task)
else
call rci_op_s_multi(iS, task, 'N', m, n, MID_Psi, MID_WORK)
end if
call rci_op_s_multi(iS, task, 'N', m, n, MID_Psi, MID_WORK)
ijob = ijob + 1
return
end if
......@@ -355,13 +333,9 @@ contains
! -- SR = Psi'*SPsi
if (ijob == SID_ORTH + 5) then
if ovlp_is_unit then
call rci_op_null(task)
else
call rci_op_gemm(iS, task, 'C', 'N', n, n, m, 1.0_r8, &
MID_Psi, m, MID_WORK, m, 0.0_r8, &
MID_SR, n)
end if
call rci_op_gemm(iS, task, 'C', 'N', n, n, m, 1.0_r8, &
MID_Psi, m, MID_WORK, m, 0.0_r8, &
MID_SR, n)
ijob = ijob + 1
return
end if
......@@ -374,22 +348,13 @@ contains
return
end if
if (ijob == SID_ORTH + 7) then
if ovlp_is_unit then
call rci_op_null(task)
else
call rci_op_copy(iS, task, 'N', MID_SR, MID_WORK1)
end if
call rci_op_copy(iS, task, 'N', MID_SR, MID_WORK1)
ijob = ijob + 1
return
end if
if (ijob == SID_ORTH + 8) then
if ovlp_is_unit then
call rci_op_heev(iS, task, 'V', 'L', n, &
MID_VR, n)
else
call rci_op_hegv(iS, task, 'V', 'L', n, &
MID_VR, n, MID_WORK1, n)
end if
call rci_op_hegv(iS, task, 'V', 'L', n, &
MID_VR, n, MID_WORK1, n)
ijob = ijob + 1
return
end if
......
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