mirror of
https://github.com/LCPQ/quantum_package
synced 2024-11-04 13:13:57 +01:00
relative error 1d-5
This commit is contained in:
parent
aae9d203ec
commit
bac039bdf1
@ -353,7 +353,7 @@ subroutine dress_collector(zmq_socket_pull, E, relative_error, delta, delta_s2,
|
|||||||
integer(ZMQ_PTR),external :: new_zmq_to_qp_run_socket
|
integer(ZMQ_PTR),external :: new_zmq_to_qp_run_socket
|
||||||
integer(ZMQ_PTR) :: zmq_to_qp_run_socket
|
integer(ZMQ_PTR) :: zmq_to_qp_run_socket
|
||||||
|
|
||||||
integer(ZMQ_PTR), external :: new_zmq_pull_socket
|
integer(ZMQ_PTR), external :: new_zmq_pull_socket, zmq_abort
|
||||||
integer :: more
|
integer :: more
|
||||||
integer :: i, c, j, k, f, t, m, p, m_task
|
integer :: i, c, j, k, f, t, m, p, m_task
|
||||||
integer :: task_id, n_tasks
|
integer :: task_id, n_tasks
|
||||||
@ -382,7 +382,8 @@ subroutine dress_collector(zmq_socket_pull, E, relative_error, delta, delta_s2,
|
|||||||
S(:) = 0d0
|
S(:) = 0d0
|
||||||
S2(:) = 0d0
|
S2(:) = 0d0
|
||||||
time0 = omp_get_wtime()
|
time0 = omp_get_wtime()
|
||||||
do while (m <= dress_N_cp)
|
more = 1
|
||||||
|
do while (m <= dress_N_cp .and. more == 1)
|
||||||
if(dot_f(m) == 0) then
|
if(dot_f(m) == 0) then
|
||||||
E0 = 0
|
E0 = 0
|
||||||
do i=dress_dot_n_0(m),1,-1
|
do i=dress_dot_n_0(m),1,-1
|
||||||
@ -406,8 +407,15 @@ subroutine dress_collector(zmq_socket_pull, E, relative_error, delta, delta_s2,
|
|||||||
error = eqt
|
error = eqt
|
||||||
time = omp_get_wtime()
|
time = omp_get_wtime()
|
||||||
print '(G10.3, 2X, F16.10, 2X, G16.3, 2X, F16.4, A20)', c, avg+E0+E(dress_stoch_istate), eqt, time-time0, ''
|
print '(G10.3, 2X, F16.10, 2X, G16.3, 2X, F16.4, A20)', c, avg+E0+E(dress_stoch_istate), eqt, time-time0, ''
|
||||||
!end do
|
|
||||||
m += 1
|
m += 1
|
||||||
|
if(eqt < relative_error) then
|
||||||
|
if (zmq_abort(zmq_to_qp_run_socket) == -1) then
|
||||||
|
call sleep(1)
|
||||||
|
if (zmq_abort(zmq_to_qp_run_socket) == -1) then
|
||||||
|
print *, irp_here, ': Error in sending abort signal (2)'
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
end if
|
||||||
else
|
else
|
||||||
task_id = 0
|
task_id = 0
|
||||||
do
|
do
|
||||||
@ -429,7 +437,6 @@ subroutine dress_collector(zmq_socket_pull, E, relative_error, delta, delta_s2,
|
|||||||
|
|
||||||
delta(:,:) = cp(:,:,m-1,1)
|
delta(:,:) = cp(:,:,m-1,1)
|
||||||
delta_s2(:,:) = cp(:,:,m-1,2)
|
delta_s2(:,:) = cp(:,:,m-1,2)
|
||||||
|
|
||||||
dress(istate) = E(istate)+E0+avg
|
dress(istate) = E(istate)+E0+avg
|
||||||
call end_zmq_to_qp_run_socket(zmq_to_qp_run_socket)
|
call end_zmq_to_qp_run_socket(zmq_to_qp_run_socket)
|
||||||
end subroutine
|
end subroutine
|
||||||
|
@ -100,7 +100,7 @@ BEGIN_PROVIDER [ double precision, delta_ij_tmp, (N_states,N_det_delta_ij,2) ]
|
|||||||
! else
|
! else
|
||||||
! errr = 1d-4
|
! errr = 1d-4
|
||||||
! end if
|
! end if
|
||||||
relative_error = 0d0 ! 5.d-5
|
relative_error = 1.d-5
|
||||||
|
|
||||||
call write_double(6,relative_error,"Convergence of the stochastic algorithm")
|
call write_double(6,relative_error,"Convergence of the stochastic algorithm")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user