mirror of
https://github.com/LCPQ/quantum_package
synced 2024-12-23 04:43:50 +01:00
Memory bug also in S2
This commit is contained in:
parent
029547820a
commit
90c24d9dac
@ -117,11 +117,12 @@ subroutine get_s2_u0(psi_keys_tmp,psi_coefs_tmp,n,nmax,s2)
|
|||||||
integer :: i,j,l,jj,ii
|
integer :: i,j,l,jj,ii
|
||||||
integer, allocatable :: idx(:)
|
integer, allocatable :: idx(:)
|
||||||
|
|
||||||
integer :: shortcut(0:n+1), sort_idx(n)
|
integer, allocatable :: shortcut(:), sort_idx(:)
|
||||||
integer(bit_kind) :: sorted(N_int,n), version(N_int,n)
|
integer(bit_kind), allocatable :: sorted(:,:), version(:,:)
|
||||||
integer :: sh, sh2, ni, exa, ext, org_i, org_j, endi, pass
|
integer :: sh, sh2, ni, exa, ext, org_i, org_j, endi, pass
|
||||||
double precision :: davidson_threshold_bis
|
double precision :: davidson_threshold_bis
|
||||||
|
|
||||||
|
allocate (shortcut(0:n+1), sort_idx(n), sorted(Nint,n), version(Nint,n))
|
||||||
s2 = 0.d0
|
s2 = 0.d0
|
||||||
davidson_threshold_bis = threshold_davidson
|
davidson_threshold_bis = threshold_davidson
|
||||||
call sort_dets_ab_v(psi_keys_tmp, sorted, sort_idx, shortcut, version, n, N_int)
|
call sort_dets_ab_v(psi_keys_tmp, sorted, sort_idx, shortcut, version, n, N_int)
|
||||||
@ -210,6 +211,7 @@ subroutine get_s2_u0(psi_keys_tmp,psi_coefs_tmp,n,nmax,s2)
|
|||||||
s2 = s2 + psi_coefs_tmp(i)*psi_coefs_tmp(i)*s2_tmp
|
s2 = s2 + psi_coefs_tmp(i)*psi_coefs_tmp(i)*s2_tmp
|
||||||
enddo
|
enddo
|
||||||
s2 = s2 + S_z2_Sz
|
s2 = s2 + S_z2_Sz
|
||||||
|
deallocate (shortcut, sort_idx, sorted, version)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user