mirror of
https://github.com/pfloos/quack
synced 2025-01-03 10:05:49 +01:00
fixed openmp bug
This commit is contained in:
parent
b329da2d1c
commit
ab4cca296e
@ -29,7 +29,7 @@ subroutine RGW_excitation_density(nOrb,nC,nO,nR,nS,ERI,XpY,rho)
|
|||||||
|
|
||||||
!$OMP PARALLEL DEFAULT(NONE) &
|
!$OMP PARALLEL DEFAULT(NONE) &
|
||||||
!$OMP PRIVATE(p, q, j, b, jb) &
|
!$OMP PRIVATE(p, q, j, b, jb) &
|
||||||
!$OMP SHARED(nOrb, nC, nO, nR, ERI, tmp) &
|
!$OMP SHARED(nOrb, nC, nO, nR, ERI, tmp)
|
||||||
!$OMP DO COLLAPSE(2)
|
!$OMP DO COLLAPSE(2)
|
||||||
do p = 1, nOrb
|
do p = 1, nOrb
|
||||||
do q = 1, nOrb
|
do q = 1, nOrb
|
||||||
@ -43,7 +43,7 @@ subroutine RGW_excitation_density(nOrb,nC,nO,nR,nS,ERI,XpY,rho)
|
|||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
!$OMP END DO
|
!$OMP END DO
|
||||||
!$OMP END COLLAPSE
|
!$OMP END PARALLEL
|
||||||
|
|
||||||
call dgemm("N", "T", nOrb*nOrb, nS, nS, 1.d0, &
|
call dgemm("N", "T", nOrb*nOrb, nS, nS, 1.d0, &
|
||||||
tmp(1,1,1), nOrb*nOrb, XpY(1,1), nS, &
|
tmp(1,1,1), nOrb*nOrb, XpY(1,1), nS, &
|
||||||
|
@ -41,6 +41,8 @@ subroutine RGW_ppBSE(TDA_W,TDA,dBSE,dTDA,singlet,triplet,eta,nOrb,nC,nO,nV,nR,nS
|
|||||||
integer :: i_data, supp_data_dbl_size, supp_data_int_size
|
integer :: i_data, supp_data_dbl_size, supp_data_int_size
|
||||||
integer :: n_states, n_states_diag
|
integer :: n_states, n_states_diag
|
||||||
|
|
||||||
|
double precision :: tt1, tt2
|
||||||
|
|
||||||
double precision,allocatable :: Aph(:,:)
|
double precision,allocatable :: Aph(:,:)
|
||||||
double precision,allocatable :: Bph(:,:)
|
double precision,allocatable :: Bph(:,:)
|
||||||
|
|
||||||
@ -124,61 +126,61 @@ subroutine RGW_ppBSE(TDA_W,TDA,dBSE,dTDA,singlet,triplet,eta,nOrb,nC,nO,nV,nR,nS
|
|||||||
allocate(Bpp(nVV,nOO),Cpp(nVV,nVV),Dpp(nOO,nOO))
|
allocate(Bpp(nVV,nOO),Cpp(nVV,nVV),Dpp(nOO,nOO))
|
||||||
allocate(KB_sta(nVV,nOO),KC_sta(nVV,nVV),KD_sta(nOO,nOO))
|
allocate(KB_sta(nVV,nOO),KC_sta(nVV,nVV),KD_sta(nOO,nOO))
|
||||||
|
|
||||||
print*, 'RGW_ppBSE_static_kernel_C:'
|
!print*, 'RGW_ppBSE_static_kernel_C:'
|
||||||
call wall_time(tt1)
|
!call wall_time(tt1)
|
||||||
call RGW_ppBSE_static_kernel_C(ispin,eta,nOrb,nC,nO,nV,nR,nS,nVV,1d0,ERI,OmRPA,rho_RPA,KC_sta)
|
call RGW_ppBSE_static_kernel_C(ispin,eta,nOrb,nC,nO,nV,nR,nS,nVV,1d0,ERI,OmRPA,rho_RPA,KC_sta)
|
||||||
call wall_time(tt2)
|
!call wall_time(tt2)
|
||||||
write(*,'(A,1X,F10.3)'), 'wall time for RGW_ppBSE_static_kernel_C (sec)', tt2-tt1
|
!write(*,'(A,1X,F10.3)'), 'wall time for RGW_ppBSE_static_kernel_C (sec)', tt2-tt1
|
||||||
|
|
||||||
print*, 'RGW_ppBSE_static_kernel_D:'
|
!print*, 'RGW_ppBSE_static_kernel_D:'
|
||||||
call wall_time(tt1)
|
!call wall_time(tt1)
|
||||||
call RGW_ppBSE_static_kernel_D(ispin,eta,nOrb,nC,nO,nV,nR,nS,nOO,1d0,ERI,OmRPA,rho_RPA,KD_sta)
|
call RGW_ppBSE_static_kernel_D(ispin,eta,nOrb,nC,nO,nV,nR,nS,nOO,1d0,ERI,OmRPA,rho_RPA,KD_sta)
|
||||||
call wall_time(tt2)
|
!call wall_time(tt2)
|
||||||
write(*,'(A,1X,F10.3)'), 'wall time for RGW_ppBSE_static_kernel_D (sec)', tt2-tt1
|
!write(*,'(A,1X,F10.3)'), 'wall time for RGW_ppBSE_static_kernel_D (sec)', tt2-tt1
|
||||||
|
|
||||||
if(.not.TDA) then
|
if(.not.TDA) then
|
||||||
print*, 'RGW_ppBSE_static_kernel_B:'
|
!print*, 'RGW_ppBSE_static_kernel_B:'
|
||||||
call wall_time(tt1)
|
!call wall_time(tt1)
|
||||||
call RGW_ppBSE_static_kernel_B(ispin,eta,nOrb,nC,nO,nV,nR,nS,nOO,nVV,1d0,ERI,OmRPA,rho_RPA,KB_sta)
|
call RGW_ppBSE_static_kernel_B(ispin,eta,nOrb,nC,nO,nV,nR,nS,nOO,nVV,1d0,ERI,OmRPA,rho_RPA,KB_sta)
|
||||||
call wall_time(tt2)
|
!call wall_time(tt2)
|
||||||
write(*,'(A,1X,F10.3)'), 'wall time for RGW_ppBSE_static_kernel_B (sec)', tt2-tt1
|
!write(*,'(A,1X,F10.3)'), 'wall time for RGW_ppBSE_static_kernel_B (sec)', tt2-tt1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
print*, 'ppLR_C:'
|
!print*, 'ppLR_C:'
|
||||||
call wall_time(tt1)
|
!call wall_time(tt1)
|
||||||
call ppLR_C(ispin,nOrb,nC,nO,nV,nR,nVV,1d0,eGW,ERI,Cpp)
|
call ppLR_C(ispin,nOrb,nC,nO,nV,nR,nVV,1d0,eGW,ERI,Cpp)
|
||||||
call wall_time(tt2)
|
!call wall_time(tt2)
|
||||||
write(*,'(A,1X,F10.3)'), 'wall time for ppLR_C (sec)', tt2-tt1
|
!write(*,'(A,1X,F10.3)'), 'wall time for ppLR_C (sec)', tt2-tt1
|
||||||
|
|
||||||
print*, 'ppLR_D:'
|
!print*, 'ppLR_D:'
|
||||||
call wall_time(tt1)
|
!call wall_time(tt1)
|
||||||
call ppLR_D(ispin,nOrb,nC,nO,nV,nR,nOO,1d0,eGW,ERI,Dpp)
|
call ppLR_D(ispin,nOrb,nC,nO,nV,nR,nOO,1d0,eGW,ERI,Dpp)
|
||||||
call wall_time(tt2)
|
!call wall_time(tt2)
|
||||||
write(*,'(A,1X,F10.3)'), 'wall time for ppLR_D (sec)', tt2-tt1
|
!write(*,'(A,1X,F10.3)'), 'wall time for ppLR_D (sec)', tt2-tt1
|
||||||
|
|
||||||
if(.not.TDA) then
|
if(.not.TDA) then
|
||||||
print*, 'ppLR_B:'
|
!print*, 'ppLR_B:'
|
||||||
call wall_time(tt1)
|
!call wall_time(tt1)
|
||||||
call ppLR_B(ispin,nOrb,nC,nO,nV,nR,nOO,nVV,1d0,ERI,Bpp)
|
call ppLR_B(ispin,nOrb,nC,nO,nV,nR,nOO,nVV,1d0,ERI,Bpp)
|
||||||
call wall_time(tt2)
|
!call wall_time(tt2)
|
||||||
write(*,'(A,1X,F10.3)'), 'wall time for ppLR_B (sec)', tt2-tt1
|
!write(*,'(A,1X,F10.3)'), 'wall time for ppLR_B (sec)', tt2-tt1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
Bpp(:,:) = Bpp(:,:) + KB_sta(:,:)
|
Bpp(:,:) = Bpp(:,:) + KB_sta(:,:)
|
||||||
Cpp(:,:) = Cpp(:,:) + KC_sta(:,:)
|
Cpp(:,:) = Cpp(:,:) + KC_sta(:,:)
|
||||||
Dpp(:,:) = Dpp(:,:) + KD_sta(:,:)
|
Dpp(:,:) = Dpp(:,:) + KD_sta(:,:)
|
||||||
|
|
||||||
print*, 'ppLR:'
|
!print*, 'ppLR:'
|
||||||
call wall_time(tt1)
|
!call wall_time(tt1)
|
||||||
call ppLR(TDA,nOO,nVV,Bpp,Cpp,Dpp,Om1,X1,Y1,Om2,X2,Y2,EcBSE(ispin))
|
call ppLR(TDA,nOO,nVV,Bpp,Cpp,Dpp,Om1,X1,Y1,Om2,X2,Y2,EcBSE(ispin))
|
||||||
call wall_time(tt2)
|
!call wall_time(tt2)
|
||||||
write(*,'(A,1X,F10.3)'), 'wall time for ppLR (sec)', tt2-tt1
|
!write(*,'(A,1X,F10.3)'), 'wall time for ppLR (sec)', tt2-tt1
|
||||||
|
|
||||||
deallocate(Bpp,Cpp,Dpp,KB_sta,KC_sta,KD_sta)
|
deallocate(Bpp,Cpp,Dpp,KB_sta,KC_sta,KD_sta)
|
||||||
|
!
|
||||||
print*, 'LAPACK:'
|
! print*, 'LAPACK:'
|
||||||
print*, Om2
|
! print*, Om2
|
||||||
print*, Om1
|
! print*, Om1
|
||||||
|
|
||||||
! ---
|
! ---
|
||||||
|
|
||||||
@ -188,46 +190,46 @@ subroutine RGW_ppBSE(TDA_W,TDA,dBSE,dTDA,singlet,triplet,eta,nOrb,nC,nO,nV,nR,nS
|
|||||||
! Davidson
|
! Davidson
|
||||||
! ---
|
! ---
|
||||||
|
|
||||||
n_states = nOO + 5
|
! n_states = nOO + 5
|
||||||
n_states_diag = n_states + 4
|
! n_states_diag = n_states + 4
|
||||||
allocate(Om(nOO+nVV), R(nOO+nVV,n_states_diag))
|
! allocate(Om(nOO+nVV), R(nOO+nVV,n_states_diag))
|
||||||
|
!
|
||||||
supp_data_int = 1
|
! supp_data_int = 1
|
||||||
allocate(supp_data_int(supp_data_int_size))
|
! allocate(supp_data_int(supp_data_int_size))
|
||||||
supp_data_int(1) = nS
|
! supp_data_int(1) = nS
|
||||||
|
!
|
||||||
supp_data_dbl_size = nS + nOrb*nOrb*nS + 1
|
! supp_data_dbl_size = nS + nOrb*nOrb*nS + 1
|
||||||
allocate(supp_data_dbl(supp_data_dbl_size))
|
! allocate(supp_data_dbl(supp_data_dbl_size))
|
||||||
! scalars
|
! ! scalars
|
||||||
supp_data_dbl(1) = eta
|
! supp_data_dbl(1) = eta
|
||||||
i_data = 1
|
! i_data = 1
|
||||||
! rho_RPA
|
! ! rho_RPA
|
||||||
do q = 1, nOrb
|
! do q = 1, nOrb
|
||||||
do p = 1, nOrb
|
! do p = 1, nOrb
|
||||||
do m = 1, nS
|
! do m = 1, nS
|
||||||
i_data = i_data + 1
|
! i_data = i_data + 1
|
||||||
supp_data_dbl(i_data) = rho_RPA(p,q,m)
|
! supp_data_dbl(i_data) = rho_RPA(p,q,m)
|
||||||
enddo
|
! enddo
|
||||||
enddo
|
! enddo
|
||||||
enddo
|
! enddo
|
||||||
! OmRPA
|
! ! OmRPA
|
||||||
do m = 1, nS
|
! do m = 1, nS
|
||||||
i_data = i_data + 1
|
! i_data = i_data + 1
|
||||||
supp_data_dbl(i_data) = OmRPA(m)
|
! supp_data_dbl(i_data) = OmRPA(m)
|
||||||
enddo
|
! enddo
|
||||||
|
!
|
||||||
call ppLR_davidson(ispin, TDA, nC, nO, nR, nOrb, nOO, nVV, &
|
! call ppLR_davidson(ispin, TDA, nC, nO, nR, nOrb, nOO, nVV, &
|
||||||
1.d0, & ! lambda
|
! 1.d0, & ! lambda
|
||||||
eGW(1), &
|
! eGW(1), &
|
||||||
0.d0, & ! eF
|
! 0.d0, & ! eF
|
||||||
ERI(1,1,1,1), &
|
! ERI(1,1,1,1), &
|
||||||
supp_data_int(1), supp_data_int_size, &
|
! supp_data_int(1), supp_data_int_size, &
|
||||||
supp_data_dbl(1), supp_data_dbl_size, &
|
! supp_data_dbl(1), supp_data_dbl_size, &
|
||||||
Om(1), R(1,1), n_states, n_states_diag, "GW")
|
! Om(1), R(1,1), n_states, n_states_diag, "GW")
|
||||||
|
!
|
||||||
deallocate(Om, R)
|
! deallocate(Om, R)
|
||||||
deallocate(supp_data_dbl, supp_data_int)
|
! deallocate(supp_data_dbl, supp_data_int)
|
||||||
stop
|
! stop
|
||||||
|
|
||||||
! ---
|
! ---
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user