9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-11-07 05:53:37 +01:00

Fixed bug in deterministic PT2 for buffer size

This commit is contained in:
Anthony Scemama 2020-06-13 00:05:11 +02:00
parent b4bbd01574
commit ebf49ce789
3 changed files with 4 additions and 3 deletions

View File

@ -59,8 +59,7 @@ subroutine run_selection_slave(thread,iproc,energy)
read(task,*) subset, i_generator, N read(task,*) subset, i_generator, N
if(buf%N == 0) then if(buf%N == 0) then
! Only first time ! Only first time
bsize = min(N, (elec_alpha_num * (mo_num-elec_alpha_num))**2) call create_selection_buffer(N, N*2, buf)
call create_selection_buffer(bsize, bsize*2, buf)
buffer_ready = .True. buffer_ready = .True.
else else
if (N /= buf%N) then if (N /= buf%N) then

View File

@ -16,6 +16,7 @@ subroutine ZMQ_selection(N_in, pt2, variance, norm)
! PROVIDE psi_det psi_coef N_det qp_max_mem N_states pt2_F s2_eig N_det_generators ! PROVIDE psi_det psi_coef N_det qp_max_mem N_states pt2_F s2_eig N_det_generators
N = max(N_in,1) N = max(N_in,1)
N = min(N, (elec_alpha_num * (mo_num-elec_alpha_num))**2)
if (.True.) then if (.True.) then
PROVIDE pt2_e0_denominator nproc PROVIDE pt2_e0_denominator nproc
PROVIDE psi_bilinear_matrix_columns_loc psi_det_alpha_unique psi_det_beta_unique PROVIDE psi_bilinear_matrix_columns_loc psi_det_alpha_unique psi_det_beta_unique
@ -78,6 +79,7 @@ subroutine ZMQ_selection(N_in, pt2, variance, norm)
stop 'Unable to add task to task server' stop 'Unable to add task to task server'
endif endif
endif endif
N = max(N_in,1)
ASSERT (associated(b%det)) ASSERT (associated(b%det))