4
1
mirror of https://github.com/pfloos/quack synced 2024-12-23 04:43:53 +01:00

fixing openmp bugs and some warning

This commit is contained in:
Antoine Marie 2023-08-21 10:54:33 +02:00
parent 9e65d4a090
commit ddb24ecf99
10 changed files with 125 additions and 134 deletions

View File

@ -97,7 +97,6 @@ subroutine GF2_phBSE2_dynamic_kernel_A(ispin,eta,nBas,nC,nO,nV,nR,nS,lambda,ERI,
end do end do
end do end do
!$omp end parallel do
end if end if
@ -106,7 +105,7 @@ subroutine GF2_phBSE2_dynamic_kernel_A(ispin,eta,nBas,nC,nO,nV,nR,nS,lambda,ERI,
if(ispin == 2) then if(ispin == 2) then
jb = 0 jb = 0
!$omp parallel do default(private) shared(A_dyn,ZA_dyn,ERI,OmBSE,num,dem,eGF,nO,nBas,eta,nC,nR) !$omp parallel do default(private) shared(KA_dyn,ZA_dyn,ERI,OmBSE,num,dem,eGF,nO,nBas,eta,nC,nR)
do j=nC+1,nO do j=nC+1,nO
do b=nO+1,nBas-nR do b=nO+1,nBas-nR
jb = (b-nO) + (j-1)*(nBas-nO) jb = (b-nO) + (j-1)*(nBas-nO)

View File

@ -100,7 +100,7 @@ subroutine GF2_phBSE2_dynamic_kernel_B(ispin,eta,nBas,nC,nO,nV,nR,nS,lambda,ERI,
if(ispin == 2) then if(ispin == 2) then
jb = 0 jb = 0
!$omp parallel do default(private) shared(B_dyn,ERI,num,dem,eGF,nO,nBas,eta,nC,nR) !$omp parallel do default(private) shared(KB_dyn,ERI,num,dem,eGF,nO,nBas,eta,nC,nR)
do j=nC+1,nO do j=nC+1,nO
do b=nO+1,nBas-nR do b=nO+1,nBas-nR
jb = (b-nO) + (j-1)*(nBas-nO) jb = (b-nO) + (j-1)*(nBas-nO)

View File

@ -44,7 +44,7 @@ subroutine GTeh_self_energy(eta,nBas,nC,nO,nV,nR,nS,e,Om,rhoL,rhoR,EcGM,Sig,Z)
! Occupied part of the correlation self-energy ! Occupied part of the correlation self-energy
!$OMP PARALLEL & !$OMP PARALLEL &
!$OMP SHARED(Sig,rho,eta,nS,nC,nO,nBas,nR,e,Om) & !$OMP SHARED(Sig,Z,rhoL,rhoR,eta,nS,nC,nO,nBas,nR,e,Om) &
!$OMP PRIVATE(m,i,q,p,num,eps) & !$OMP PRIVATE(m,i,q,p,num,eps) &
!$OMP DEFAULT(NONE) !$OMP DEFAULT(NONE)
!$OMP DO !$OMP DO
@ -65,10 +65,10 @@ subroutine GTeh_self_energy(eta,nBas,nC,nO,nV,nR,nS,e,Om,rhoL,rhoR,EcGM,Sig,Z)
!$OMP END DO !$OMP END DO
!$OMP END PARALLEL !$OMP END PARALLEL
! Virtual part of the correlation self-energy ! Virtual part of the correlation self-energy
!$OMP PARALLEL & !$OMP PARALLEL &
!$OMP SHARED(Sig,rho,eta,nS,nC,nO,nBas,nR,e,Om) & !$OMP SHARED(Sig,Z,rhoL,rhoR,eta,nS,nC,nO,nBas,nR,e,Om) &
!$OMP PRIVATE(m,a,q,p,num,eps) & !$OMP PRIVATE(m,a,q,p,num,eps) &
!$OMP DEFAULT(NONE) !$OMP DEFAULT(NONE)
!$OMP DO !$OMP DO

View File

@ -74,9 +74,7 @@ subroutine GTpp_excitation_density(ispin,nBas,nC,nO,nV,nR,nOO,nVV,ERI,X1,Y1,rho1
end do end do
end do end do
!$OMP END DO
!$OMP DO
do ij=1,nOO do ij=1,nOO
cd = 0 cd = 0
@ -188,7 +186,7 @@ subroutine GTpp_excitation_density(ispin,nBas,nC,nO,nV,nR,nOO,nVV,ERI,X1,Y1,rho1
do q=nC+1,nBas-nR do q=nC+1,nBas-nR
do p=nC+1,nBas-nR do p=nC+1,nBas-nR
! do ab=1,nVV ! do ab=1,nVV
ab = 0 ab = 0
do a=nO+1,nBas-nR do a=nO+1,nBas-nR
do b=nO+1,nBas-nR do b=nO+1,nBas-nR
@ -212,11 +210,8 @@ subroutine GTpp_excitation_density(ispin,nBas,nC,nO,nV,nR,nOO,nVV,ERI,X1,Y1,rho1
end do end do
end do end do
!$OMP END DO
!$OMP DO ! do ij=1,nOO
! do ij=1,nOO
ij = 0 ij = 0
do i=nC+1,nO do i=nC+1,nO
do j=nC+1,nO do j=nC+1,nO

View File

@ -24,6 +24,7 @@ subroutine print_qsGTeh(nBas,nO,nSCF,Conv,thresh,eHF,eGT,c,SigC,Z,ENuc,ET,EV,EJ,
double precision,intent(in) :: c(nBas) double precision,intent(in) :: c(nBas)
double precision,intent(in) :: SigC(nBas,nBas) double precision,intent(in) :: SigC(nBas,nBas)
double precision,intent(in) :: Z(nBas) double precision,intent(in) :: Z(nBas)
double precision,intent(in) :: EqsGT
double precision,intent(in) :: dipole(ncart) double precision,intent(in) :: dipole(ncart)
! Local variables ! Local variables
@ -34,8 +35,6 @@ subroutine print_qsGTeh(nBas,nO,nSCF,Conv,thresh,eHF,eGT,c,SigC,Z,ENuc,ET,EV,EJ,
! Output variables ! Output variables
double precision,intent(out) :: EqsGT
! HOMO and LUMO ! HOMO and LUMO
HOMO = nO HOMO = nO

View File

@ -24,6 +24,7 @@ subroutine print_qsGTpp(nBas,nO,nSCF,Conv,thresh,eHF,eGT,c,SigC,Z,ENuc,ET,EV,EJ,
double precision,intent(in) :: c(nBas) double precision,intent(in) :: c(nBas)
double precision,intent(in) :: SigC(nBas,nBas) double precision,intent(in) :: SigC(nBas,nBas)
double precision,intent(in) :: Z(nBas) double precision,intent(in) :: Z(nBas)
double precision,intent(in) :: EqsGT
double precision,intent(in) :: dipole(ncart) double precision,intent(in) :: dipole(ncart)
! Local variables ! Local variables
@ -34,8 +35,6 @@ subroutine print_qsGTpp(nBas,nO,nSCF,Conv,thresh,eHF,eGT,c,SigC,Z,ENuc,ET,EV,EJ,
! Output variables ! Output variables
double precision,intent(out) :: EqsGT
! HOMO and LUMO ! HOMO and LUMO
HOMO = nO HOMO = nO

View File

@ -42,7 +42,7 @@ subroutine GW_self_energy(eta,nBas,nC,nO,nV,nR,nS,e,Om,rho,EcGM,Sig,Z)
! Occupied part of the correlation self-energy ! Occupied part of the correlation self-energy
!$OMP PARALLEL & !$OMP PARALLEL &
!$OMP SHARED(Sig,rho,eta,nS,nC,nO,nBas,nR,e,Om) & !$OMP SHARED(Sig,Z,rho,eta,nS,nC,nO,nBas,nR,e,Om) &
!$OMP PRIVATE(m,i,q,p,eps,num) & !$OMP PRIVATE(m,i,q,p,eps,num) &
!$OMP DEFAULT(NONE) !$OMP DEFAULT(NONE)
!$OMP DO !$OMP DO
@ -66,7 +66,7 @@ subroutine GW_self_energy(eta,nBas,nC,nO,nV,nR,nS,e,Om,rho,EcGM,Sig,Z)
! Virtual part of the correlation self-energy ! Virtual part of the correlation self-energy
!$OMP PARALLEL & !$OMP PARALLEL &
!$OMP SHARED(Sig,rho,eta,nS,nC,nO,nBas,nR,e,Om) & !$OMP SHARED(Sig,Z,rho,eta,nS,nC,nO,nBas,nR,e,Om) &
!$OMP PRIVATE(m,a,q,p,eps,num) & !$OMP PRIVATE(m,a,q,p,eps,num) &
!$OMP DEFAULT(NONE) !$OMP DEFAULT(NONE)
!$OMP DO !$OMP DO

View File

@ -24,6 +24,7 @@ subroutine print_qsGW(nBas,nO,nSCF,Conv,thresh,eHF,eGW,c,SigC,Z,ENuc,ET,EV,EJ,Ex
double precision,intent(in) :: c(nBas) double precision,intent(in) :: c(nBas)
double precision,intent(in) :: SigC(nBas,nBas) double precision,intent(in) :: SigC(nBas,nBas)
double precision,intent(in) :: Z(nBas) double precision,intent(in) :: Z(nBas)
double precision,intent(in) :: EqsGW
double precision,intent(in) :: dipole(ncart) double precision,intent(in) :: dipole(ncart)
! Local variables ! Local variables
@ -34,8 +35,6 @@ subroutine print_qsGW(nBas,nO,nSCF,Conv,thresh,eHF,eGW,c,SigC,Z,ENuc,ET,EV,EJ,Ex
! Output variables ! Output variables
double precision,intent(out) :: EqsGW
! HOMO and LUMO ! HOMO and LUMO
HOMO = nO HOMO = nO

View File

@ -78,8 +78,8 @@ FIX_ORDER_OF_LIBS=-Wl,--start-group
if sys.platform in ["linux", "linux2"]: if sys.platform in ["linux", "linux2"]:
compiler = compile_gfortran_linux # compiler = compile_gfortran_linux
# compiler = compile_ifort_linux compiler = compile_ifort_linux
elif sys.platform == "darwin": elif sys.platform == "darwin":
compiler = compile_gfortran_mac compiler = compile_gfortran_mac
else: else:

View File

@ -7,7 +7,7 @@ subroutine read_basis_pyscf(nBas,nO,nV)
! Input variables ! Input variables
integer,intent(out) :: nO(nspin) integer,intent(in) :: nO(nspin)
! Local variables ! Local variables