Remove becp1_d

This commit is contained in:
Ivan Carnimeo 2023-10-06 17:05:07 +02:00
parent 2ab7ae61f8
commit 96f255f4cd
4 changed files with 4 additions and 34 deletions

View File

@ -179,9 +179,6 @@ MODULE lrus
! dpqq and dpqq_so: dipole moment of each Q multiplied by the fcoef factors
!
type (bec_type), ALLOCATABLE, TARGET :: becp1(:) ! nksq)
#if defined(__CUDA)
type (bec_type_d), ALLOCATABLE, TARGET :: becp1_d(:)
#endif
! becp1 contains < beta_n | psi_i >
!
REAL (DP), ALLOCATABLE :: bbg(:,:) ! nkb, nkb)

View File

@ -37,9 +37,6 @@ subroutine allocate_phq
USE el_phon, ONLY : el_ph_mat, el_ph_mat_nc_mag, elph
USE freq_ph, ONLY : polar, nfs
USE lrus, ONLY : becp1, dpqq, dpqq_so
#if defined(__CUDA)
USE lrus, ONLY : becp1_d
#endif
USE qpoint, ONLY : nksq, eigqts, xk_col
USE eqv, ONLY : dpsi, evq, vlocq, dmuxc, dvpsi
USE lr_symm_base, ONLY : rtau
@ -147,17 +144,10 @@ subroutine allocate_phq
endif
allocate (this_pcxpsi_is_on_file(nksq,3))
this_pcxpsi_is_on_file(:,:)=.false.
ALLOCATE (becp1(nksq))
ALLOCATE (alphap(3,nksq))
#if defined(__CUDA)
ALLOCATE (becp1_d(nksq))
#endif
DO ik=1,nksq
call allocate_bec_type ( nkb, nbnd, becp1(ik) )
#if defined(__CUDA)
CALL allocate_bec_type_gpu ( nkb, nbnd, becp1_d(ik) )
#endif
DO ipol=1,3
call allocate_bec_type ( nkb, nbnd, alphap(ipol,ik) )
ENDDO

View File

@ -31,9 +31,6 @@ subroutine deallocate_phq
USE el_phon, ONLY : el_ph_mat, el_ph_mat_nc_mag
USE freq_ph, ONLY : polar
USE lrus, ONLY : int3, int3_nc, int3_paw, becp1, dpqq, dpqq_so
#if defined(__CUDA)
USE lrus, ONLY : becp1_d
#endif
USE lr_symm_base, ONLY : rtau
USE gc_lr, ONLY : grho, gmag, dvxc_rr, dvxc_sr, dvxc_ss, dvxc_s, &
vsgga, segni
@ -132,14 +129,6 @@ subroutine deallocate_phq
end do
deallocate(becp1)
end if
#if defined(__CUDA)
if(allocated(becp1_d)) then
do ik=1,size(becp1_d)
call deallocate_bec_type_gpu ( becp1_d(ik) )
end do
deallocate(becp1_d)
end if
#endif
IF (ALLOCATED(alphapt)) THEN
DO ik=1,nksq
DO ipol=1,3

View File

@ -58,9 +58,6 @@ SUBROUTINE phq_init()
kpq,g_kpq,igqg,xk_gamma, lrwfcr
USE wannier_gw, ONLY : l_head
USE lrus, ONLY : becp1, dpqq, dpqq_so
#if defined(__CUDA)
USE lrus, ONLY : becp1_d
#endif
USE qpoint, ONLY : xq, nksq, eigqts, ikks, ikqs
USE qpoint_aux, ONLY : becpt, alphapt, ikmks
USE eqv, ONLY : evq
@ -192,14 +189,11 @@ SUBROUTINE phq_init()
!
#if defined(__CUDA)
evc_d = evc
!$acc host_data use_device(vkb)
CALL calbec_gpu (npw, vkb(:,:), evc_d, becp1_d(ik) )
!$acc end host_data
CALL synchronize_bec_type_gpu( becp1_d(ik), becp1(ik), 'h')
#else
CALL calbec (npw, vkb, evc, becp1(ik) )
#endif
!$acc data present_or_copyin(evc)
Call calbec( offload_type, npw, vkb, evc, bectmp )
!$acc end data
Call becupdate( offload_type, becp1, ik, nksq, bectmp )
!
! ... e') we compute the derivative of the becp term with respect to an
! atomic displacement