mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-11-19 12:32:30 +01:00
fixed termination bug in cholesky for small basis
This commit is contained in:
parent
869efdd077
commit
316d81e8cf
@ -73,7 +73,7 @@ END_PROVIDER
|
|||||||
integer, external :: getUnitAndOpen
|
integer, external :: getUnitAndOpen
|
||||||
integer :: iunit, ierr
|
integer :: iunit, ierr
|
||||||
|
|
||||||
ndim8 = ao_num*ao_num*1_8
|
ndim8 = ao_num*ao_num*1_8+1
|
||||||
double precision :: wall0,wall1
|
double precision :: wall0,wall1
|
||||||
|
|
||||||
type(c_ptr) :: c_pointer(2)
|
type(c_ptr) :: c_pointer(2)
|
||||||
@ -143,19 +143,21 @@ END_PROVIDER
|
|||||||
|
|
||||||
if (do_direct_integrals) then
|
if (do_direct_integrals) then
|
||||||
!$OMP PARALLEL DO DEFAULT(SHARED) PRIVATE(i8) SCHEDULE(dynamic,21)
|
!$OMP PARALLEL DO DEFAULT(SHARED) PRIVATE(i8) SCHEDULE(dynamic,21)
|
||||||
do i8=ndim8,1,-1
|
do i8=ndim8-1,1,-1
|
||||||
D(i8) = ao_two_e_integral(addr1(i8), addr2(i8), &
|
D(i8) = ao_two_e_integral(addr1(i8), addr2(i8), &
|
||||||
addr1(i8), addr2(i8))
|
addr1(i8), addr2(i8))
|
||||||
enddo
|
enddo
|
||||||
!$OMP END PARALLEL DO
|
!$OMP END PARALLEL DO
|
||||||
else
|
else
|
||||||
!$OMP PARALLEL DO DEFAULT(SHARED) PRIVATE(i8) SCHEDULE(dynamic,21)
|
!$OMP PARALLEL DO DEFAULT(SHARED) PRIVATE(i8) SCHEDULE(dynamic,21)
|
||||||
do i8=ndim8,1,-1
|
do i8=ndim8-1,1,-1
|
||||||
D(i8) = get_ao_two_e_integral(addr1(i8), addr1(i8), &
|
D(i8) = get_ao_two_e_integral(addr1(i8), addr1(i8), &
|
||||||
addr2(i8), addr2(i8), ao_integrals_map)
|
addr2(i8), addr2(i8), ao_integrals_map)
|
||||||
enddo
|
enddo
|
||||||
!$OMP END PARALLEL DO
|
!$OMP END PARALLEL DO
|
||||||
endif
|
endif
|
||||||
|
! Just to guarentee termination
|
||||||
|
D(ndim8) = 0.d0
|
||||||
|
|
||||||
D_sorted(:) = -D(:)
|
D_sorted(:) = -D(:)
|
||||||
call dsort_noidx_big(D_sorted,ndim8)
|
call dsort_noidx_big(D_sorted,ndim8)
|
||||||
@ -205,6 +207,7 @@ END_PROVIDER
|
|||||||
i = i+1
|
i = i+1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
block_size = max(N,24)
|
block_size = max(N,24)
|
||||||
|
|
||||||
! Determine nq so that Delta fits in memory
|
! Determine nq so that Delta fits in memory
|
||||||
@ -314,9 +317,10 @@ END_PROVIDER
|
|||||||
! g.
|
! g.
|
||||||
|
|
||||||
iblock = 0
|
iblock = 0
|
||||||
|
|
||||||
do j=1,nq
|
do j=1,nq
|
||||||
|
|
||||||
if ( (Qmax <= Dmin).or.(N+j*1_8 > ndim8) ) exit
|
if ( (Qmax < Dmin).or.(N+j*1_8 > ndim8) ) exit
|
||||||
|
|
||||||
! i.
|
! i.
|
||||||
rank = N+j
|
rank = N+j
|
||||||
|
Loading…
Reference in New Issue
Block a user