10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-06-02 11:25:26 +02:00

Better det search key

This commit is contained in:
Anthony Scemama 2018-11-21 15:41:53 +01:00
parent ec5b3a6863
commit ec35981925
6 changed files with 12 additions and 9 deletions

View File

@ -226,7 +226,7 @@ subroutine remove_duplicates_in_psi_det(found_duplicates)
enddo
!$OMP END DO
!$OMP DO schedule(dynamic,256)
!$OMP DO schedule(dynamic,1024)
do i=1,N_det-1
if (duplicate(i)) then
cycle

View File

@ -7,9 +7,8 @@ integer*8 function det_search_key(det,Nint)
integer, intent(in) :: Nint
integer(bit_kind), intent(in) :: det(Nint,2)
integer :: i
! i = shiftr(elec_alpha_num, bit_kind_shift)+1
! det_search_key = shiftr(ior(det(i,1),det(i,2)),1)
det_search_key = int(sum(det),8)
i = shiftr(elec_alpha_num, bit_kind_shift)+1
det_search_key = int(shiftr(ior(det(i,1),det(i,2)),1)+sum(det),8)
end
@ -22,9 +21,8 @@ integer*8 function occ_pattern_search_key(det,Nint)
integer, intent(in) :: Nint
integer(bit_kind), intent(in) :: det(Nint,2)
integer :: i
! i = shiftr(elec_alpha_num, bit_kind_shift)+1
! occ_pattern_search_key = shiftr(ior(det(i,1),det(i,2)),1)
occ_pattern_search_key = int(sum(det),8)
i = shiftr(elec_alpha_num, bit_kind_shift)+1
occ_pattern_search_key = int(shiftr(ior(det(i,1),det(i,2)),1)+sum(det),8)
end

View File

@ -127,6 +127,7 @@ program fci_zmq
call ezfio_set_fci_energy_pt2(psi_energy_with_nucl_rep(1:N_states)+pt2)
endif
print *, 'N_det = ', N_det
print *, 'N_sop = ', N_occ_pattern
print *, 'N_states = ', N_states
print*, 'correlation_ratio = ', correlation_energy_ratio

View File

@ -13,7 +13,7 @@ subroutine ZMQ_selection(N_in, pt2, variance, norm)
double precision, intent(out) :: variance(N_states)
double precision, intent(out) :: norm(N_states)
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)
if (.True.) then

View File

@ -57,6 +57,9 @@ subroutine print_summary(e_,pt2_,error_,variance_,norm_)
print *, 'N_det = ', N_det
print *, 'N_states = ', N_states
if (s2_eig) then
print *, 'N_sop = ', N_occ_pattern
endif
do k=1, N_states_p
print*,'State ',k

View File

@ -65,7 +65,8 @@ integer function zmq_get_dvector(zmq_to_qp_run_socket, worker_id, name, x, size_
rc = f77_zmq_recv(zmq_to_qp_run_socket,msg,len(msg),0)
if (msg(1:14) /= 'get_data_reply') then
print *, irp_here, 'msg(1:14) /= get_data_reply', msg(1:14)
print *, irp_here, 'msg(1:14) /= get_data_reply'
print *, ' ', trim(msg)
zmq_get_dvector = -1
go to 10
endif