mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-23 04:43:45 +01:00
OpenMP in bielec construction
This commit is contained in:
parent
721f5a662b
commit
62ef1526a2
@ -1,4 +1,4 @@
|
|||||||
BEGIN_PROVIDER [real*8, bielec_PQxx, (mo_num, mo_num,n_core_inact_orb+n_act_orb,n_core_inact_orb+n_act_orb)]
|
BEGIN_PROVIDER [real*8, bielec_PQxx, (mo_num, mo_num,n_core_inact_act_orb,n_core_inact_act_orb)]
|
||||||
BEGIN_DOC
|
BEGIN_DOC
|
||||||
! bielec_PQxx : integral (pq|xx) with p,q arbitrary, x core or active
|
! bielec_PQxx : integral (pq|xx) with p,q arbitrary, x core or active
|
||||||
! indices are unshifted orbital numbers
|
! indices are unshifted orbital numbers
|
||||||
@ -7,8 +7,15 @@ BEGIN_PROVIDER [real*8, bielec_PQxx, (mo_num, mo_num,n_core_inact_orb+n_act_orb,
|
|||||||
integer :: i,j,ii,jj,p,q,i3,j3,t3,v3
|
integer :: i,j,ii,jj,p,q,i3,j3,t3,v3
|
||||||
real*8 :: mo_two_e_integral
|
real*8 :: mo_two_e_integral
|
||||||
|
|
||||||
bielec_PQxx = 0.d0
|
bielec_PQxx(:,:,:,:) = 0.d0
|
||||||
|
PROVIDE mo_two_e_integrals_in_map
|
||||||
|
|
||||||
|
!$OMP PARALLEL DEFAULT(NONE) &
|
||||||
|
!$OMP PRIVATE(i,ii,j,jj,i3,j3) &
|
||||||
|
!$OMP SHARED(n_core_inact_orb,list_core_inact,mo_num,bielec_PQxx, &
|
||||||
|
!$OMP n_act_orb,mo_integrals_map,list_act)
|
||||||
|
|
||||||
|
!$OMP DO
|
||||||
do i=1,n_core_inact_orb
|
do i=1,n_core_inact_orb
|
||||||
ii=list_core_inact(i)
|
ii=list_core_inact(i)
|
||||||
do j=i,n_core_inact_orb
|
do j=i,n_core_inact_orb
|
||||||
@ -23,9 +30,10 @@ BEGIN_PROVIDER [real*8, bielec_PQxx, (mo_num, mo_num,n_core_inact_orb+n_act_orb,
|
|||||||
bielec_PQxx(:,:,j3,i)=bielec_PQxx(:,:,i,j3)
|
bielec_PQxx(:,:,j3,i)=bielec_PQxx(:,:,i,j3)
|
||||||
end do
|
end do
|
||||||
end do
|
end do
|
||||||
|
!$OMP END DO
|
||||||
|
|
||||||
|
|
||||||
! (ij|pq)
|
!$OMP DO
|
||||||
do i=1,n_act_orb
|
do i=1,n_act_orb
|
||||||
ii=list_act(i)
|
ii=list_act(i)
|
||||||
i3=i+n_core_inact_orb
|
i3=i+n_core_inact_orb
|
||||||
@ -36,6 +44,9 @@ BEGIN_PROVIDER [real*8, bielec_PQxx, (mo_num, mo_num,n_core_inact_orb+n_act_orb,
|
|||||||
bielec_PQxx(:,:,j3,i3)=bielec_PQxx(:,:,i3,j3)
|
bielec_PQxx(:,:,j3,i3)=bielec_PQxx(:,:,i3,j3)
|
||||||
end do
|
end do
|
||||||
end do
|
end do
|
||||||
|
!$OMP END DO
|
||||||
|
|
||||||
|
!$OMP END PARALLEL
|
||||||
|
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
@ -51,10 +62,17 @@ BEGIN_PROVIDER [real*8, bielec_PxxQ, (mo_num,n_core_inact_orb+n_act_orb,n_core_i
|
|||||||
double precision, allocatable :: integrals_array(:,:)
|
double precision, allocatable :: integrals_array(:,:)
|
||||||
real*8 :: mo_two_e_integral
|
real*8 :: mo_two_e_integral
|
||||||
|
|
||||||
|
PROVIDE mo_two_e_integrals_in_map
|
||||||
|
bielec_PxxQ = 0.d0
|
||||||
|
|
||||||
|
!$OMP PARALLEL DEFAULT(NONE) &
|
||||||
|
!$OMP PRIVATE(i,ii,j,jj,i3,j3,integrals_array) &
|
||||||
|
!$OMP SHARED(n_core_inact_orb,list_core_inact,mo_num,bielec_PxxQ, &
|
||||||
|
!$OMP n_act_orb,mo_integrals_map,list_act)
|
||||||
|
|
||||||
allocate(integrals_array(mo_num,mo_num))
|
allocate(integrals_array(mo_num,mo_num))
|
||||||
|
|
||||||
bielec_PxxQ = 0.d0
|
!$OMP DO
|
||||||
|
|
||||||
do i=1,n_core_inact_orb
|
do i=1,n_core_inact_orb
|
||||||
ii=list_core_inact(i)
|
ii=list_core_inact(i)
|
||||||
do j=i,n_core_inact_orb
|
do j=i,n_core_inact_orb
|
||||||
@ -79,9 +97,11 @@ BEGIN_PROVIDER [real*8, bielec_PxxQ, (mo_num,n_core_inact_orb+n_act_orb,n_core_i
|
|||||||
end do
|
end do
|
||||||
end do
|
end do
|
||||||
end do
|
end do
|
||||||
|
!$OMP END DO
|
||||||
|
|
||||||
|
|
||||||
! (ip|qj)
|
! (ip|qj)
|
||||||
|
!$OMP DO
|
||||||
do i=1,n_act_orb
|
do i=1,n_act_orb
|
||||||
ii=list_act(i)
|
ii=list_act(i)
|
||||||
i3=i+n_core_inact_orb
|
i3=i+n_core_inact_orb
|
||||||
@ -97,6 +117,11 @@ BEGIN_PROVIDER [real*8, bielec_PxxQ, (mo_num,n_core_inact_orb+n_act_orb,n_core_i
|
|||||||
end do
|
end do
|
||||||
end do
|
end do
|
||||||
end do
|
end do
|
||||||
|
!$OMP END DO
|
||||||
|
|
||||||
|
deallocate(integrals_array)
|
||||||
|
!$OMP END PARALLEL
|
||||||
|
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
|
|
||||||
@ -108,7 +133,11 @@ BEGIN_PROVIDER [real*8, bielecCI, (n_act_orb,n_act_orb,n_act_orb, mo_num)]
|
|||||||
implicit none
|
implicit none
|
||||||
integer :: i,j,k,p,t,u,v
|
integer :: i,j,k,p,t,u,v
|
||||||
double precision, external :: mo_two_e_integral
|
double precision, external :: mo_two_e_integral
|
||||||
|
PROVIDE mo_two_e_integrals_in_map
|
||||||
|
|
||||||
|
!$OMP PARALLEL DO DEFAULT(NONE) &
|
||||||
|
!$OMP PRIVATE(i,j,k,p,t,u,v) &
|
||||||
|
!$OMP SHARED(mo_num,n_act_orb,list_act,bielecCI)
|
||||||
do p=1,mo_num
|
do p=1,mo_num
|
||||||
do j=1,n_act_orb
|
do j=1,n_act_orb
|
||||||
u=list_act(j)
|
u=list_act(j)
|
||||||
@ -121,5 +150,7 @@ BEGIN_PROVIDER [real*8, bielecCI, (n_act_orb,n_act_orb,n_act_orb, mo_num)]
|
|||||||
end do
|
end do
|
||||||
end do
|
end do
|
||||||
end do
|
end do
|
||||||
|
!$OMP END PARALLEL DO
|
||||||
|
|
||||||
END_PROVIDER
|
END_PROVIDER
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user