Commit 6fbd3e6e authored by Matteo Gerosa's avatar Matteo Gerosa
Browse files

Fixed timing "chidiago" in davidson_diago. Removed comments. Restart in Wfreq...

Fixed timing "chidiago" in davidson_diago. Removed comments. Restart in Wfreq working at all points.
parent c956fae1
......@@ -489,13 +489,13 @@ SUBROUTINE solve_gfreq_k(l_read_restart)
ENDIF
!
DO iks = 1, k_grid%nps ! KPOINT-SPIN (INTEGRAL OVER K')
IF (ikks==bksks%lastdone_ks .AND. ib==bksks%lastdone_band .AND. iks <= bksks%lastdone_ksc) CYCLE
!
ik = k_grid%ip(iks)
!
time_spent(1) = get_clock( 'glanczos' )
!
CALL q_grid%find( k_grid%p_cart(:,ikk) - k_grid%p_cart(:,ik), 1, 'cart', iq, g0 )
IF (ikks==bksks%lastdone_ks .AND. ib==bksks%lastdone_band .AND. iks <= bksks%lastdone_ksc) CYCLE
!
CALL preallocate_solvegfreq_q( iks_l2g(ikks), iks_l2g(iks), qp_bandrange(1), qp_bandrange(2), pert)
!
......
......@@ -899,9 +899,6 @@ SUBROUTINE solve_wfreq_k(l_read_restart,l_generate_plot)
!
! PSIC
!
! IF(gamma_only) THEN
! CALL SINGLEBAND_invfft(npw,evc(1,iv),npwx,psic,dffts%nnr)
! ELSE
IF(noncolin) THEN
CALL single_invfft_k(dffts,npwkq,npwx,evckpq(1 ,iv),psick_nc(1,1),'Wave',igk_k(1,ikqs))
CALL single_invfft_k(dffts,npwkq,npwx,evckpq(npwx+1,iv),psick_nc(1,2),'Wave',igk_k(1,ikqs))
......@@ -939,13 +936,6 @@ SUBROUTINE solve_wfreq_k(l_read_restart,l_generate_plot)
ENDDO
!
! Bring it to R-space
! IF(gamma_only) THEN
! CALL SINGLEBAND_invfft(npwq,pertg(1),npwx,pertr,dffts%nnr)
! DO ir=1,dffts%nnr
! pertr(ir)=psic(ir)*pertr(ir)
! ENDDO
! CALL SINGLEBAND_fwfft(npw,pertr,dffts%nnr,dvpsi(1,ip),npwx)
! ELSE
IF(noncolin) THEN
CALL single_invfft_k(dffts,npwq,npwqx,pertg(1),pertr,'Wave',igq_q(1,iq))
DO ir=1,dffts%nnr
......
......@@ -517,10 +517,6 @@ SUBROUTINE davidson_diago_k ( )
lastdone_iq = 0
l_restart_q_done = .FALSE.
!
CALL start_clock( 'chidiago' )
time_spent(1)=get_clock( 'chidiago' )
CALL get_clock_called( 'stern' , sternop_ncalls(1) )
!
! ... DISTRIBUTE nvecx
!
pert=idistribute()
......@@ -562,6 +558,10 @@ SUBROUTINE davidson_diago_k ( )
!
QPOINTS_LOOP: &
DO iq = 1, q_grid%np
!
CALL start_clock( 'chidiago' )
time_spent(1)=get_clock( 'chidiago' )
CALL get_clock_called( 'stern' , sternop_ncalls(1) )
!
nbase = nvec
conv = .FALSE.
......@@ -659,7 +659,7 @@ SUBROUTINE davidson_diago_k ( )
ENDDO
!
pccg_res_tr2 = -1._DP
!CALL dfpt_q ( mloc, dvg(1,mstart), dng(1,mstart), pccg_res_tr2, iq )
!
CALL dfpt ( mloc, dvg(1,mstart), dng(1,mstart), pccg_res_tr2, iq )
dav_iter = -1
CALL wstat_restart_write( dav_iter, notcnv, nbase, ew, hr_distr, vr_distr, iq)
......@@ -699,7 +699,7 @@ SUBROUTINE davidson_diago_k ( )
ENDDO
!
pccg_res_tr2 = MIN(0.01_DP,1000000._DP*tr2_dfpt)
!CALL dfpt_q ( mloc, dvg(1,mstart), dng(1,mstart), pccg_res_tr2, iq )
!
CALL dfpt ( mloc, dvg(1,mstart), dng(1,mstart), pccg_res_tr2, iq )
!
! </ EXTRA STEP >
......@@ -795,7 +795,7 @@ SUBROUTINE davidson_diago_k ( )
! Apply operator with DFPT
!
pccg_res_tr2 = tr2_dfpt
!CALL dfpt_q ( mloc, dvg(1,mstart), dng(1,mstart), pccg_res_tr2, iq )
!
CALL dfpt ( mloc, dvg(1,mstart), dng(1,mstart), pccg_res_tr2, iq )
!
! ... update the reduced hamiltonian
......@@ -900,6 +900,8 @@ SUBROUTINE davidson_diago_k ( )
!
END DO iterate
!
CALL stop_clock( 'chidiago' )
!
ENDDO QPOINTS_LOOP ! iq
!
DEALLOCATE( conv )
......@@ -912,8 +914,6 @@ SUBROUTINE davidson_diago_k ( )
DEALLOCATE( dng )
DEALLOCATE( dvg )
!
CALL stop_clock( 'chidiago' )
!
RETURN
!
END SUBROUTINE
......
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