diff --git a/plugins/Full_CI_ZMQ/fci_zmq.irp.f b/plugins/Full_CI_ZMQ/fci_zmq.irp.f index aa0c013e..e221533b 100644 --- a/plugins/Full_CI_ZMQ/fci_zmq.irp.f +++ b/plugins/Full_CI_ZMQ/fci_zmq.irp.f @@ -128,7 +128,7 @@ subroutine ZMQ_selection(N, pt2) integer :: i integer, external :: omp_get_thread_num double precision, intent(out) :: pt2(N_states) - + call flip_generators() call new_parallel_job(zmq_to_qp_run_socket,'selection') call create_selection_buffer(N, N*2, b) @@ -149,6 +149,7 @@ subroutine ZMQ_selection(N, pt2) endif !$OMP END PARALLEL call end_parallel_job(zmq_to_qp_run_socket, 'selection') + call flip_generators() call fill_H_apply_buffer_no_selection(b%cur,b%det,N_int,0) !!! PAS DE ROBIN call copy_H_apply_buffer_to_wf() end subroutine diff --git a/plugins/Full_CI_ZMQ/selection.irp.f b/plugins/Full_CI_ZMQ/selection.irp.f index 74149345..5e4eef36 100644 --- a/plugins/Full_CI_ZMQ/selection.irp.f +++ b/plugins/Full_CI_ZMQ/selection.irp.f @@ -28,7 +28,6 @@ subroutine selection_slave(thread,iproc) buf%N = 0 ctask = 1 pt2 = 0d0 - do call get_task_from_taskserver(zmq_to_qp_run_socket,worker_id, task_id(ctask), task) done = task_id(ctask) == 0 diff --git a/src/Determinants/determinants.irp.f b/src/Determinants/determinants.irp.f index 400345c1..609379f2 100644 --- a/src/Determinants/determinants.irp.f +++ b/src/Determinants/determinants.irp.f @@ -330,6 +330,24 @@ END_PROVIDER END_PROVIDER +subroutine flip_generators() + integer :: i,j,k + integer(bit_kind) :: detmp(N_int,2) + double precision :: tmp(N_states) + + do i=1,N_det_generators/2 + detmp(:,:) = psi_det_sorted(:,:,i) + tmp = psi_coef_sorted(i, :) + psi_det_sorted(:,:,i) = psi_det_sorted(:,:,N_det_generators+1-i) + psi_coef_sorted(i, :) = psi_coef_sorted(N_det_generators+1-i, :) + + psi_det_sorted(:,:,N_det_generators+1-i) = detmp(:,:) + psi_coef_sorted(N_det_generators+1-i, :) = tmp + end do + + TOUCH psi_det_sorted psi_coef_sorted psi_average_norm_contrib_sorted +end subroutine + BEGIN_PROVIDER [ integer(bit_kind), psi_det_sorted_bit, (N_int,2,psi_det_size) ] &BEGIN_PROVIDER [ double precision, psi_coef_sorted_bit, (psi_det_size,N_states) ] implicit none