From a4fded893f0f5ab2b93384d0bb0209a0e05bbae6 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 5 Jun 2018 21:51:24 +0200 Subject: [PATCH] Fixed selection --- plugins/Full_CI_ZMQ/selection_davidson_slave.irp.f | 5 +++-- plugins/Full_CI_ZMQ/zmq_selection.irp.f | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/Full_CI_ZMQ/selection_davidson_slave.irp.f b/plugins/Full_CI_ZMQ/selection_davidson_slave.irp.f index 67acc567..aecb3987 100644 --- a/plugins/Full_CI_ZMQ/selection_davidson_slave.irp.f +++ b/plugins/Full_CI_ZMQ/selection_davidson_slave.irp.f @@ -63,13 +63,14 @@ subroutine run_wf call wall_time(t0) if (zmq_get_psi(zmq_to_qp_run_socket,1) == -1) cycle + if (zmq_get_dvector(zmq_to_qp_run_socket,1,'energy',energy,N_states) == -1) cycle + if (zmq_get_dvector(zmq_to_qp_run_socket,1,'state_average_weight',state_average_weight,N_states) == -1) cycle if (zmq_get_N_det_generators (zmq_to_qp_run_socket, 1) == -1) cycle if (zmq_get_N_det_selectors(zmq_to_qp_run_socket, 1) == -1) cycle - if (zmq_get_dvector(zmq_to_qp_run_socket,1,'energy',energy,N_states) == -1) cycle if (zmq_get_dvector(zmq_to_qp_run_socket,1,'threshold_generators',threshold_generators,1) == -1) cycle if (zmq_get_dvector(zmq_to_qp_run_socket,1,'threshold_selectors',threshold_selectors,1) == -1) cycle psi_energy(1:N_states) = energy(1:N_states) - TOUCH psi_energy threshold_selectors threshold_generators + TOUCH psi_energy state_average_weight threshold_selectors threshold_generators call wall_time(t1) call write_double(6,(t1-t0),'Broadcast time') diff --git a/plugins/Full_CI_ZMQ/zmq_selection.irp.f b/plugins/Full_CI_ZMQ/zmq_selection.irp.f index 03d9cb04..8db4615a 100644 --- a/plugins/Full_CI_ZMQ/zmq_selection.irp.f +++ b/plugins/Full_CI_ZMQ/zmq_selection.irp.f @@ -44,6 +44,9 @@ subroutine ZMQ_selection(N_in, pt2) if (zmq_put_dvector(zmq_to_qp_run_socket,1,'threshold_selectors',threshold_selectors,1) == -1) then stop 'Unable to put threshold_selectors on ZMQ server' endif + if (zmq_put_dvector(zmq_to_qp_run_socket,1,'state_average_weight',pt2_e0_denominator,size(state_average_weight)) == -1) then + stop 'Unable to put state_average_weight on ZMQ server' + endif if (zmq_put_dvector(zmq_to_qp_run_socket,1,'threshold_generators',threshold_generators,1) == -1) then stop 'Unable to put threshold_generators on ZMQ server' endif