mirror of
https://github.com/LCPQ/quantum_package
synced 2024-09-27 03:51:01 +02:00
Fixed Segfault
This commit is contained in:
parent
b9d7611af4
commit
34ba5d4fd4
@ -2133,6 +2133,11 @@ subroutine ac_operator(iorb,ispin,key,hjj,Nint,na,nb)
|
||||
key(k,ispin) = ibset(key(k,ispin),l)
|
||||
other_spin = iand(ispin,1)+1
|
||||
|
||||
if (iorb > mo_tot_num) then
|
||||
print *, irp_here, 'iorb > mo_tot_num'
|
||||
print *, iorb, mo_tot_num
|
||||
stop -1
|
||||
endif
|
||||
hjj = hjj + mo_mono_elec_integral(iorb,iorb)
|
||||
|
||||
! Same spin
|
||||
|
@ -204,7 +204,8 @@ subroutine make_selection_buffer_s2(b)
|
||||
endif
|
||||
enddo
|
||||
if (dup) then
|
||||
val(i) = val(i) + val(j)
|
||||
! val(i) = val(i) + val(j)
|
||||
val(i) = max(val(i), val(j))
|
||||
duplicate(j) = .True.
|
||||
endif
|
||||
j+=1
|
||||
@ -254,14 +255,14 @@ subroutine make_selection_buffer_s2(b)
|
||||
call occ_pattern_to_dets_size(o(1,1,i),sze,elec_alpha_num,N_int)
|
||||
n_d = n_d + sze
|
||||
if (n_d > b%cur) then
|
||||
if (n_d - b%cur > b%cur - n_d + sze) then
|
||||
n_d = n_d - sze
|
||||
endif
|
||||
! if (n_d - b%cur > b%cur - n_d + sze) then
|
||||
! n_d = n_d - sze
|
||||
! endif
|
||||
exit
|
||||
endif
|
||||
enddo
|
||||
|
||||
allocate(b%det(N_int,2,n_d), b%val(n_d))
|
||||
allocate(b%det(N_int,2,2*n_d), b%val(2*n_d))
|
||||
k=1
|
||||
do i=1,n_p
|
||||
n=n_d
|
||||
@ -274,7 +275,7 @@ subroutine make_selection_buffer_s2(b)
|
||||
if (k > n_d) exit
|
||||
enddo
|
||||
deallocate(o)
|
||||
b%N = n_d
|
||||
b%N = 2*n_d
|
||||
b%cur = n_d
|
||||
end
|
||||
|
||||
|
@ -403,8 +403,8 @@ subroutine lapack_diagd(eigvalues,eigvectors,H,nmax,n)
|
||||
! print*,'n = ',n
|
||||
|
||||
A=H
|
||||
lwork = 2*n*n + 6*n+ 1
|
||||
liwork = 5*n + 3
|
||||
lwork = max(1000,2*n*n + 6*n+ 1)
|
||||
liwork = max(5*n + 3,1000)
|
||||
allocate (work(lwork),iwork(liwork))
|
||||
|
||||
lwork = -1
|
||||
|
@ -28,7 +28,7 @@ function run_FCI() {
|
||||
}
|
||||
|
||||
@test "FCI H2O cc-pVDZ" {
|
||||
run_FCI h2o.ezfio 2000 -76.1247512890078 -76.1258973417948
|
||||
run_FCI h2o.ezfio 2000 -76.1250464119599 -76.1258876912360
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user