10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-08-26 14:31:44 +02:00

corrected assert(N_states>1)

This commit is contained in:
Yann Garniron 2018-03-01 11:35:00 +01:00
parent 2dc927f80a
commit 22b2870b9f
3 changed files with 43 additions and 35 deletions

View File

@ -247,28 +247,28 @@ subroutine dress_collector(zmq_socket_pull, E, relative_error, delta, delta_s2,
time = omp_get_wtime()
if(time - timeLast > 1d0 .or. (.not. loop)) then
if((time - timeLast > 2d0) .or. (.not. loop)) then
timeLast = time
cur_cp = N_cp
if(.not. actually_computed(dress_jobs(1))) cycle pullLoop
do i=2,N_det_generators
do i=1,N_det_generators
if(.not. actually_computed(dress_jobs(i))) then
if(i /= 1) then
cur_cp = done_cp_at(i-1)
else
cur_cp = 0
end if
exit
end if
end do
if(cur_cp == 0) cycle pullLoop
double precision :: su, su2, eqt, avg, E0, val
integer, external :: zmq_abort
su = 0d0
su2 = 0d0
if(N_states > 1) stop "dress_stoch : N_states == 1"
do i=1, int(cps_N(cur_cp))
call get_comb_val(comb(i), dress_detail, cur_cp, val)
su += val
@ -280,11 +280,14 @@ subroutine dress_collector(zmq_socket_pull, E, relative_error, delta, delta_s2,
if(cp_first_tooth(cur_cp) <= comb_teeth) then
E0 = E0 + dress_detail(1, first_det_of_teeth(cp_first_tooth(cur_cp))) * (1d0-fractage(cp_first_tooth(cur_cp)))
end if
call wall_time(time)
if ((dabs(eqt) < relative_error .and. cps_N(cur_cp) >= 30) .or. total_computed == N_det_generators) then
! Termination
!print '(G10.3, 2X, F16.7, 2X, G16.3, 2X, F16.4, A20)', Nabove(tooth), avg+E, eqt, time-time0, ''
! print *, "GREPME", cur_cp, E+E0+avg, eqt, time-time0, total_computed
print ""
print "(A10,I5,F15.7,E12.4,F10.2)", "grepme", cur_cp, E+E0+avg, eqt, time-time0
print ""
if (zmq_abort(zmq_to_qp_run_socket) == -1) then
call sleep(1)
if (zmq_abort(zmq_to_qp_run_socket) == -1) then
@ -294,8 +297,9 @@ subroutine dress_collector(zmq_socket_pull, E, relative_error, delta, delta_s2,
else
if (cur_cp > old_cur_cp) then
old_cur_cp = cur_cp
! print *, "GREPME", cur_cp, E+E0+avg, eqt, time-time0, total_computed
!print '(G10.3, 2X, F16.7, 2X, G16.3, 2X, F16.4, A20)', Nabove(tooth), avg+E, eqt, time-time0, ''
print ""
print "(A10,I5,F15.7,E12.4,F10.2)", "grepme", cur_cp, E+E0+avg, eqt, time-time0
print ""
endif
endif
end if
@ -355,7 +359,7 @@ end function
&BEGIN_PROVIDER [ integer, N_cps_max ]
implicit none
comb_teeth = 16
N_cps_max = 32
N_cps_max = 64
gen_per_cp = (N_det_generators / N_cps_max) + 1
N_cps_max += 1
END_PROVIDER

View File

@ -61,6 +61,7 @@ subroutine dress_with_alpha_buffer(delta_ij_loc, minilist, det_minilist, n_minil
if (perturbative_triples) then
PROVIDE one_anhil fock_virt_total fock_core_inactive_total one_creat
endif
canbediamond = 0
do l_sd=1,n_minilist
call get_excitation(det_minilist(1,1,l_sd),alpha,exc,degree1,phase,N_int)

View File

@ -366,7 +366,10 @@ subroutine mrcc_collector(zmq_socket_pull, E, relative_error, delta, delta_s2, m
E0 = E0 + mrcc_detail(1, first_det_of_teeth(cp_first_tooth(cur_cp))) * (1d0-fractage(cp_first_tooth(cur_cp)))
end if
print "(I5,F15.7,E12.4,F10.2)", cur_cp, E+E0+avg, eqt, time-timeInit
if(cur_cp /= old_cur_cp) then
old_cur_cp = cur_cp
print "(A10, I5,F15.7,E12.4,F10.2)", "grepme", cur_cp, E+E0+avg, eqt, time-timeInit
end if
if ((dabs(eqt) < relative_error .and. cps_N(cur_cp) >= 30) .or. total_computed == N_det_generators) then
if (zmq_abort(zmq_to_qp_run_socket) == -1) then