mirror of
https://github.com/LCPQ/quantum_package
synced 2024-12-25 13:53:49 +01:00
Bug in variance/norm
This commit is contained in:
parent
955f2b0b02
commit
a24db77952
@ -154,10 +154,12 @@ subroutine selection_collector(zmq_socket_pull, b, N, pt2, variance, norm)
|
|||||||
integer(ZMQ_PTR), intent(in) :: zmq_socket_pull
|
integer(ZMQ_PTR), intent(in) :: zmq_socket_pull
|
||||||
type(selection_buffer), intent(inout) :: b
|
type(selection_buffer), intent(inout) :: b
|
||||||
integer, intent(in) :: N
|
integer, intent(in) :: N
|
||||||
double precision, intent(out) :: pt2(N_states)
|
double precision, intent(inout) :: pt2(N_states)
|
||||||
|
double precision, intent(inout) :: variance(N_states)
|
||||||
|
double precision, intent(inout) :: norm(N_states)
|
||||||
double precision :: pt2_mwen(N_states)
|
double precision :: pt2_mwen(N_states)
|
||||||
double precision :: variance(N_states)
|
double precision :: variance_mwen(N_states)
|
||||||
double precision :: norm(N_states)
|
double precision :: norm_mwen(N_states)
|
||||||
integer(ZMQ_PTR),external :: new_zmq_to_qp_run_socket
|
integer(ZMQ_PTR),external :: new_zmq_to_qp_run_socket
|
||||||
integer(ZMQ_PTR) :: zmq_to_qp_run_socket
|
integer(ZMQ_PTR) :: zmq_to_qp_run_socket
|
||||||
|
|
||||||
@ -179,12 +181,14 @@ subroutine selection_collector(zmq_socket_pull, b, N, pt2, variance, norm)
|
|||||||
more = 1
|
more = 1
|
||||||
pt2(:) = 0d0
|
pt2(:) = 0d0
|
||||||
pt2_mwen(:) = 0.d0
|
pt2_mwen(:) = 0.d0
|
||||||
|
variance_mwen = 0.d0
|
||||||
|
norm_mwen = 0.d0
|
||||||
do while (more == 1)
|
do while (more == 1)
|
||||||
call pull_selection_results(zmq_socket_pull, pt2_mwen, variance, norm, b2%val(1), b2%det(1,1,1), b2%cur, task_id, ntask)
|
call pull_selection_results(zmq_socket_pull, pt2_mwen, variance_mwen, norm_mwen, b2%val(1), b2%det(1,1,1), b2%cur, task_id, ntask)
|
||||||
|
|
||||||
pt2(:) += pt2_mwen(:)
|
pt2(:) += pt2_mwen(:)
|
||||||
variance(:) += variance(:)
|
variance(:) += variance_mwen(:)
|
||||||
norm(:) += norm(:)
|
norm(:) += norm_mwen(:)
|
||||||
do i=1, b2%cur
|
do i=1, b2%cur
|
||||||
call add_to_selection_buffer(b, b2%det(1,1,i), b2%val(i))
|
call add_to_selection_buffer(b, b2%det(1,1,i), b2%val(i))
|
||||||
if (b2%val(i) > b%mini) exit
|
if (b2%val(i) > b%mini) exit
|
||||||
|
Loading…
Reference in New Issue
Block a user