mirror of
https://github.com/LCPQ/quantum_package
synced 2025-01-05 11:00:10 +01:00
Fixed bug in selection
This commit is contained in:
parent
2a6b86d0ac
commit
7801c57de9
@ -24,7 +24,7 @@ subroutine run
|
|||||||
E_CI_before = pt2_E0_denominator(1) + nuclear_repulsion
|
E_CI_before = pt2_E0_denominator(1) + nuclear_repulsion
|
||||||
threshold_selectors = 1.d0
|
threshold_selectors = 1.d0
|
||||||
threshold_generators = 1d0
|
threshold_generators = 1d0
|
||||||
relative_error = 1.d-3
|
relative_error = -1.d-3
|
||||||
call ZMQ_pt2(E_CI_before, pt2, relative_error)
|
call ZMQ_pt2(E_CI_before, pt2, relative_error)
|
||||||
print *, 'Final step'
|
print *, 'Final step'
|
||||||
print *, 'N_det = ', N_det
|
print *, 'N_det = ', N_det
|
||||||
|
@ -91,42 +91,38 @@ subroutine push_selection_results(zmq_socket_push, pt2, b, task_id, ntask)
|
|||||||
type(selection_buffer), intent(inout) :: b
|
type(selection_buffer), intent(inout) :: b
|
||||||
integer, intent(in) :: ntask, task_id(*)
|
integer, intent(in) :: ntask, task_id(*)
|
||||||
integer :: rc
|
integer :: rc
|
||||||
integer :: bcur
|
|
||||||
bcur = max(b%cur,1)
|
|
||||||
|
|
||||||
rc = f77_zmq_send( zmq_socket_push, bcur, 4, ZMQ_SNDMORE)
|
rc = f77_zmq_send( zmq_socket_push, b%cur, 4, ZMQ_SNDMORE)
|
||||||
if(rc /= 4) then
|
if(rc /= 4) then
|
||||||
print *, b%cur, bcur
|
print *, 'f77_zmq_send( zmq_socket_push, b%cur, 4, ZMQ_SNDMORE)'
|
||||||
print *, 'f77_zmq_send( zmq_socket_push, bcur, 4, ZMQ_SNDMORE)'
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if (b%cur > 0) then
|
||||||
|
|
||||||
rc = f77_zmq_send( zmq_socket_push, pt2, 8*N_states, ZMQ_SNDMORE)
|
rc = f77_zmq_send( zmq_socket_push, pt2, 8*N_states, ZMQ_SNDMORE)
|
||||||
if(rc /= 8*N_states) then
|
if(rc /= 8*N_states) then
|
||||||
print *, b%cur, bcur
|
|
||||||
print *, 'f77_zmq_send( zmq_socket_push, pt2, 8*N_states, ZMQ_SNDMORE)'
|
print *, 'f77_zmq_send( zmq_socket_push, pt2, 8*N_states, ZMQ_SNDMORE)'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
rc = f77_zmq_send( zmq_socket_push, b%val(1), 8*bcur, ZMQ_SNDMORE)
|
rc = f77_zmq_send( zmq_socket_push, b%val(1), 8*b%cur, ZMQ_SNDMORE)
|
||||||
if(rc /= 8*bcur) then
|
if(rc /= 8*b%cur) then
|
||||||
print *, b%cur, bcur
|
print *, 'f77_zmq_send( zmq_socket_push, b%val(1), 8*b%cur, ZMQ_SNDMORE)'
|
||||||
print *, 'f77_zmq_send( zmq_socket_push, b%val(1), 8*bcur, ZMQ_SNDMORE)'
|
endif
|
||||||
|
|
||||||
|
rc = f77_zmq_send( zmq_socket_push, b%det(1,1,1), bit_kind*N_int*2*b%cur, ZMQ_SNDMORE)
|
||||||
|
if(rc /= bit_kind*N_int*2*b%cur) then
|
||||||
|
print *, 'f77_zmq_send( zmq_socket_push, b%det(1,1,1), bit_kind*N_int*2*b%cur, ZMQ_SNDMORE)'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
rc = f77_zmq_send( zmq_socket_push, b%det(1,1,1), bit_kind*N_int*2*bcur, ZMQ_SNDMORE)
|
|
||||||
if(rc /= bit_kind*N_int*2*bcur) then
|
|
||||||
print *, b%cur, bcur
|
|
||||||
print *, 'f77_zmq_send( zmq_socket_push, b%det(1,1,1), bit_kind*N_int*2*bcur, ZMQ_SNDMORE)'
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
rc = f77_zmq_send( zmq_socket_push, ntask, 4, ZMQ_SNDMORE)
|
rc = f77_zmq_send( zmq_socket_push, ntask, 4, ZMQ_SNDMORE)
|
||||||
if(rc /= 4) then
|
if(rc /= 4) then
|
||||||
print *, b%cur, bcur
|
|
||||||
print *, 'f77_zmq_send( zmq_socket_push, ntask, 4, ZMQ_SNDMORE)'
|
print *, 'f77_zmq_send( zmq_socket_push, ntask, 4, ZMQ_SNDMORE)'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
rc = f77_zmq_send( zmq_socket_push, task_id(1), ntask*4, 0)
|
rc = f77_zmq_send( zmq_socket_push, task_id(1), ntask*4, 0)
|
||||||
if(rc /= 4*ntask) then
|
if(rc /= 4*ntask) then
|
||||||
print *, b%cur, bcur
|
|
||||||
print *, 'f77_zmq_send( zmq_socket_push, task_id(1), ntask*4, 0)'
|
print *, 'f77_zmq_send( zmq_socket_push, task_id(1), ntask*4, 0)'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -151,6 +147,7 @@ subroutine pull_selection_results(zmq_socket_pull, pt2, val, det, N, task_id, nt
|
|||||||
print *, 'f77_zmq_recv( zmq_socket_pull, N, 4, 0)'
|
print *, 'f77_zmq_recv( zmq_socket_pull, N, 4, 0)'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if (N>0) then
|
||||||
rc = f77_zmq_recv( zmq_socket_pull, pt2, N_states*8, 0)
|
rc = f77_zmq_recv( zmq_socket_pull, pt2, N_states*8, 0)
|
||||||
if(rc /= 8*N_states) then
|
if(rc /= 8*N_states) then
|
||||||
print *, 'f77_zmq_recv( zmq_socket_pull, pt2, N_states*8, 0)'
|
print *, 'f77_zmq_recv( zmq_socket_pull, pt2, N_states*8, 0)'
|
||||||
@ -165,6 +162,9 @@ subroutine pull_selection_results(zmq_socket_pull, pt2, val, det, N, task_id, nt
|
|||||||
if(rc /= bit_kind*N_int*2*N) then
|
if(rc /= bit_kind*N_int*2*N) then
|
||||||
print *, 'f77_zmq_recv( zmq_socket_pull, det(1,1,1), bit_kind*N_int*2*N, 0)'
|
print *, 'f77_zmq_recv( zmq_socket_pull, det(1,1,1), bit_kind*N_int*2*N, 0)'
|
||||||
endif
|
endif
|
||||||
|
else
|
||||||
|
pt2(:) = 0.d0
|
||||||
|
endif
|
||||||
|
|
||||||
rc = f77_zmq_recv( zmq_socket_pull, ntask, 4, 0)
|
rc = f77_zmq_recv( zmq_socket_pull, ntask, 4, 0)
|
||||||
if(rc /= 4) then
|
if(rc /= 4) then
|
||||||
|
@ -316,14 +316,15 @@ subroutine select_singles_and_doubles(i_generator,hole_mask,particle_mask,fock_d
|
|||||||
integer :: N_holes(2), N_particles(2)
|
integer :: N_holes(2), N_particles(2)
|
||||||
integer :: hole_list(N_int*bit_kind_size,2)
|
integer :: hole_list(N_int*bit_kind_size,2)
|
||||||
integer :: particle_list(N_int*bit_kind_size,2)
|
integer :: particle_list(N_int*bit_kind_size,2)
|
||||||
|
integer(bit_kind), allocatable:: preinteresting_det(:,:,:)
|
||||||
|
allocate (preinteresting_det(N_int,2,N_det))
|
||||||
|
|
||||||
call bitstring_to_list_ab(hole , hole_list , N_holes , N_int)
|
call bitstring_to_list_ab(hole , hole_list , N_holes , N_int)
|
||||||
call bitstring_to_list_ab(particle, particle_list, N_particles, N_int)
|
call bitstring_to_list_ab(particle, particle_list, N_particles, N_int)
|
||||||
|
|
||||||
integer, allocatable :: indices(:), exc_degree(:), iorder(:)
|
|
||||||
integer(bit_kind), allocatable:: preinteresting_det(:,:,:)
|
|
||||||
integer :: l_a, nmax
|
integer :: l_a, nmax
|
||||||
allocate (preinteresting_det(N_int,2,N_det), indices(N_det), &
|
integer, allocatable :: indices(:), exc_degree(:), iorder(:)
|
||||||
|
allocate (indices(N_det), &
|
||||||
exc_degree(max(N_det_alpha_unique,N_det_beta_unique)))
|
exc_degree(max(N_det_alpha_unique,N_det_beta_unique)))
|
||||||
k=1
|
k=1
|
||||||
do i=1,N_det_alpha_unique
|
do i=1,N_det_alpha_unique
|
||||||
|
Loading…
Reference in New Issue
Block a user