10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-11-04 21:24:02 +01: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() time = omp_get_wtime()
if((time - timeLast > 2d0) .or. (.not. loop)) then
if(time - timeLast > 1d0 .or. (.not. loop)) then
timeLast = time timeLast = time
cur_cp = N_cp 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(.not. actually_computed(dress_jobs(i))) then
if(i /= 1) then
cur_cp = done_cp_at(i-1) cur_cp = done_cp_at(i-1)
else
cur_cp = 0
end if
exit exit
end if end if
end do end do
if(cur_cp == 0) cycle pullLoop if(cur_cp == 0) cycle pullLoop
double precision :: su, su2, eqt, avg, E0, val double precision :: su, su2, eqt, avg, E0, val
integer, external :: zmq_abort integer, external :: zmq_abort
su = 0d0 su = 0d0
su2 = 0d0 su2 = 0d0
if(N_states > 1) stop "dress_stoch : N_states == 1"
do i=1, int(cps_N(cur_cp)) do i=1, int(cps_N(cur_cp))
call get_comb_val(comb(i), dress_detail, cur_cp, val) call get_comb_val(comb(i), dress_detail, cur_cp, val)
su += 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 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))) E0 = E0 + dress_detail(1, first_det_of_teeth(cp_first_tooth(cur_cp))) * (1d0-fractage(cp_first_tooth(cur_cp)))
end if end if
call wall_time(time) call wall_time(time)
if ((dabs(eqt) < relative_error .and. cps_N(cur_cp) >= 30) .or. total_computed == N_det_generators) then if ((dabs(eqt) < relative_error .and. cps_N(cur_cp) >= 30) .or. total_computed == N_det_generators) then
! Termination ! Termination
!print '(G10.3, 2X, F16.7, 2X, G16.3, 2X, F16.4, A20)', Nabove(tooth), avg+E, eqt, time-time0, '' print ""
! print *, "GREPME", cur_cp, E+E0+avg, eqt, time-time0, total_computed 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 if (zmq_abort(zmq_to_qp_run_socket) == -1) then
call sleep(1) call sleep(1)
if (zmq_abort(zmq_to_qp_run_socket) == -1) then 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 else
if (cur_cp > old_cur_cp) then if (cur_cp > old_cur_cp) then
old_cur_cp = cur_cp old_cur_cp = cur_cp
! print *, "GREPME", cur_cp, E+E0+avg, eqt, time-time0, total_computed print ""
!print '(G10.3, 2X, F16.7, 2X, G16.3, 2X, F16.4, A20)', Nabove(tooth), avg+E, eqt, time-time0, '' print "(A10,I5,F15.7,E12.4,F10.2)", "grepme", cur_cp, E+E0+avg, eqt, time-time0
print ""
endif endif
endif endif
end if end if
@ -355,7 +359,7 @@ end function
&BEGIN_PROVIDER [ integer, N_cps_max ] &BEGIN_PROVIDER [ integer, N_cps_max ]
implicit none implicit none
comb_teeth = 16 comb_teeth = 16
N_cps_max = 32 N_cps_max = 64
gen_per_cp = (N_det_generators / N_cps_max) + 1 gen_per_cp = (N_det_generators / N_cps_max) + 1
N_cps_max += 1 N_cps_max += 1
END_PROVIDER 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 if (perturbative_triples) then
PROVIDE one_anhil fock_virt_total fock_core_inactive_total one_creat PROVIDE one_anhil fock_virt_total fock_core_inactive_total one_creat
endif endif
canbediamond = 0 canbediamond = 0
do l_sd=1,n_minilist do l_sd=1,n_minilist
call get_excitation(det_minilist(1,1,l_sd),alpha,exc,degree1,phase,N_int) 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))) E0 = E0 + mrcc_detail(1, first_det_of_teeth(cp_first_tooth(cur_cp))) * (1d0-fractage(cp_first_tooth(cur_cp)))
end if 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 ((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 if (zmq_abort(zmq_to_qp_run_socket) == -1) then