10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-06-20 12:12:13 +02:00
This commit is contained in:
Yann Garniron 2016-08-01 17:15:03 +02:00
parent 8da0509c5e
commit 3bd401513d
3 changed files with 10 additions and 14 deletions

View File

@ -62,9 +62,9 @@ subroutine selection_slaved(thread,iproc)
!print *, "psi_selectors_coef ", psi_selectors_coef(N_det_selectors-5:N_det_selectors, 1)
!call debug_det(psi_selectors(1,1,N_det_selectors), N_int)
call select_connected(i_generator,ci_electronic_energy,pt2,buf)
end if
if(done) ctask = ctask - 1
else
ctask = ctask - 1
endif
if(done .or. ctask == size(task_id)) then
if(buf%N == 0 .and. ctask > 0) stop "uninitialized selection_buffer"
@ -77,7 +77,6 @@ subroutine selection_slaved(thread,iproc)
buf%cur = 0
end if
ctask = 0
end if

View File

@ -31,17 +31,14 @@ subroutine run_wf
call provide_everything
zmq_context = f77_zmq_ctx_new ()
zmq_state = 'selection'
state = 'Waiting'
zmq_to_qp_run_socket = new_zmq_to_qp_run_socket()
do
call wait_for_state("selection", zmq_state)
if(trim(zmq_state) /= "selection") exit
if(oki < 0) then
oki += 1
cycle
end if
oki = 0
call wait_for_state(zmq_state,state)
if(trim(state) /= 'selection') exit
print *, 'Getting wave function'
call zmq_get_psi(zmq_to_qp_run_socket,1,energy,size(energy))
integer :: j,k
@ -59,7 +56,6 @@ subroutine run_wf
endif
call write_double(6,ci_energy,'Energy')
!zmq_state = 'selection'
integer :: rc, i

View File

@ -872,8 +872,8 @@ subroutine wait_for_state(state_wait,state)
integer :: rc
zmq_socket_sub = new_zmq_sub_socket()
state = "Waiting"
do while (trim(state) /= trim(state_wait) .and. trim(state) /= "Stopped")
state = 'Waiting'
do while (trim(state) /= trim(state_wait) .and. trim(state) /= 'Stopped')
rc = f77_zmq_recv( zmq_socket_sub, state, 64, 0)
if (rc > 0) then
state = trim(state(1:rc))
@ -881,6 +881,7 @@ subroutine wait_for_state(state_wait,state)
print *, 'Timeout reached. Stopping'
state = "Stopped"
endif
print *, '|'//trim(state(1:rc))//'|'//trim(state_wait)//'|'
end do
call end_zmq_sub_socket(zmq_socket_sub)
end