mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-21 11:03:29 +01:00
Fixed bug in PT2 with fast stochastic convergence
This commit is contained in:
parent
ba08b70d2f
commit
ce43b16fc0
@ -186,6 +186,7 @@ subroutine run_pt2_slave_large(thread,iproc,energy)
|
||||
type(pt2_type) :: pt2_data
|
||||
integer :: n_tasks, k, N
|
||||
integer :: i_generator, subset
|
||||
integer :: ifirst
|
||||
|
||||
integer :: bsize ! Size of selection buffers
|
||||
logical :: sending
|
||||
@ -202,6 +203,7 @@ subroutine run_pt2_slave_large(thread,iproc,energy)
|
||||
|
||||
zmq_socket_push = new_zmq_push_socket(thread)
|
||||
|
||||
ifirst = 0
|
||||
b%N = 0
|
||||
buffer_ready = .False.
|
||||
n_tasks = 1
|
||||
@ -250,7 +252,11 @@ subroutine run_pt2_slave_large(thread,iproc,energy)
|
||||
call omp_set_lock(global_selection_buffer_lock)
|
||||
global_selection_buffer%mini = b%mini
|
||||
call merge_selection_buffers(b,global_selection_buffer)
|
||||
if (ifirst /= 0 ) then
|
||||
b%cur=0
|
||||
else
|
||||
ifirst = 1
|
||||
endif
|
||||
call omp_unset_lock(global_selection_buffer_lock)
|
||||
if ( iproc == 1 ) then
|
||||
call omp_set_lock(global_selection_buffer_lock)
|
||||
|
@ -20,4 +20,5 @@ subroutine routine
|
||||
call diagonalize_CI
|
||||
print*,'N_det = ',N_det
|
||||
call save_wavefunction_general(N_det,N_states,psi_det_sorted,size(psi_coef_sorted,1),psi_coef_sorted)
|
||||
call print_mol_properties
|
||||
end
|
||||
|
@ -14,5 +14,6 @@ end
|
||||
|
||||
subroutine run
|
||||
implicit none
|
||||
call print_mol_properties
|
||||
print *, psi_energy + nuclear_repulsion
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user