mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-08-31 21:23:40 +02: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
|
type(pt2_type) :: pt2_data
|
||||||
integer :: n_tasks, k, N
|
integer :: n_tasks, k, N
|
||||||
integer :: i_generator, subset
|
integer :: i_generator, subset
|
||||||
|
integer :: ifirst
|
||||||
|
|
||||||
integer :: bsize ! Size of selection buffers
|
integer :: bsize ! Size of selection buffers
|
||||||
logical :: sending
|
logical :: sending
|
||||||
@ -202,6 +203,7 @@ subroutine run_pt2_slave_large(thread,iproc,energy)
|
|||||||
|
|
||||||
zmq_socket_push = new_zmq_push_socket(thread)
|
zmq_socket_push = new_zmq_push_socket(thread)
|
||||||
|
|
||||||
|
ifirst = 0
|
||||||
b%N = 0
|
b%N = 0
|
||||||
buffer_ready = .False.
|
buffer_ready = .False.
|
||||||
n_tasks = 1
|
n_tasks = 1
|
||||||
@ -250,7 +252,11 @@ subroutine run_pt2_slave_large(thread,iproc,energy)
|
|||||||
call omp_set_lock(global_selection_buffer_lock)
|
call omp_set_lock(global_selection_buffer_lock)
|
||||||
global_selection_buffer%mini = b%mini
|
global_selection_buffer%mini = b%mini
|
||||||
call merge_selection_buffers(b,global_selection_buffer)
|
call merge_selection_buffers(b,global_selection_buffer)
|
||||||
b%cur=0
|
if (ifirst /= 0 ) then
|
||||||
|
b%cur=0
|
||||||
|
else
|
||||||
|
ifirst = 1
|
||||||
|
endif
|
||||||
call omp_unset_lock(global_selection_buffer_lock)
|
call omp_unset_lock(global_selection_buffer_lock)
|
||||||
if ( iproc == 1 ) then
|
if ( iproc == 1 ) then
|
||||||
call omp_set_lock(global_selection_buffer_lock)
|
call omp_set_lock(global_selection_buffer_lock)
|
||||||
|
@ -20,4 +20,5 @@ subroutine routine
|
|||||||
call diagonalize_CI
|
call diagonalize_CI
|
||||||
print*,'N_det = ',N_det
|
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 save_wavefunction_general(N_det,N_states,psi_det_sorted,size(psi_coef_sorted,1),psi_coef_sorted)
|
||||||
|
call print_mol_properties
|
||||||
end
|
end
|
||||||
|
@ -14,5 +14,6 @@ end
|
|||||||
|
|
||||||
subroutine run
|
subroutine run
|
||||||
implicit none
|
implicit none
|
||||||
print *, psi_energy + nuclear_repulsion
|
call print_mol_properties
|
||||||
|
print *, psi_energy + nuclear_repulsion
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user