10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-11-03 20:54:00 +01:00

Corrected linger bug

This commit is contained in:
Anthony Scemama 2016-08-01 20:31:23 +02:00
parent 36a6bd01c6
commit 2dd38c0bdb
2 changed files with 15 additions and 15 deletions

View File

@ -19,7 +19,7 @@ subroutine selection_slaved(thread,iproc)
integer, intent(in) :: thread, iproc integer, intent(in) :: thread, iproc
integer :: rc, i integer :: rc, i
integer :: worker_id, task_id(1), ctask, ltask integer :: worker_id, task_id(10), ctask, ltask
character*(512) :: task character*(512) :: task
integer(ZMQ_PTR),external :: new_zmq_to_qp_run_socket integer(ZMQ_PTR),external :: new_zmq_to_qp_run_socket
@ -293,7 +293,7 @@ subroutine selection_collector(b, pt2)
end do end do
do i=1, ntask do i=1, ntask
if(task_id(i) == 0) stop "collector" if(task_id(i) == 0) stop "Error in collector"
call zmq_delete_task(zmq_to_qp_run_socket,zmq_socket_pull,task_id(i),more) call zmq_delete_task(zmq_to_qp_run_socket,zmq_socket_pull,task_id(i),more)
end do end do
done += ntask done += ntask

View File

@ -394,10 +394,10 @@ subroutine end_zmq_pair_socket(zmq_socket_pair)
! stop 'error' ! stop 'error'
! endif ! endif
rc = f77_zmq_setsockopt(zmq_socket_pair,ZMQ_LINGER,0,4) ! rc = f77_zmq_setsockopt(zmq_socket_pair,0ZMQ_LINGER,1000,4)
if (rc /= 0) then ! if (rc /= 0) then
stop 'Unable to set ZMQ_LINGER on zmq_socket_pair' ! stop 'Unable to set ZMQ_LINGER on zmq_socket_pair'
endif ! endif
rc = f77_zmq_close(zmq_socket_pair) rc = f77_zmq_close(zmq_socket_pair)
if (rc /= 0) then if (rc /= 0) then
@ -433,10 +433,10 @@ subroutine end_zmq_pull_socket(zmq_socket_pull)
call sleep(1) ! see https://github.com/zeromq/libzmq/issues/1922 call sleep(1) ! see https://github.com/zeromq/libzmq/issues/1922
rc = f77_zmq_setsockopt(zmq_socket_pull,ZMQ_LINGER,0,4) ! rc = f77_zmq_setsockopt(zmq_socket_pull,ZMQ_LINGER,10000,4)
if (rc /= 0) then ! if (rc /= 0) then
stop 'Unable to set ZMQ_LINGER on zmq_socket_pull' ! stop 'Unable to set ZMQ_LINGER on zmq_socket_pull'
endif ! endif
rc = f77_zmq_close(zmq_socket_pull) rc = f77_zmq_close(zmq_socket_pull)
if (rc /= 0) then if (rc /= 0) then
@ -473,10 +473,10 @@ subroutine end_zmq_push_socket(zmq_socket_push,thread)
endif endif
rc = f77_zmq_setsockopt(zmq_socket_push,ZMQ_LINGER,0,4) ! rc = f77_zmq_setsockopt(zmq_socket_push,ZMQ_LINGER,20000,4)
if (rc /= 0) then ! if (rc /= 0) then
stop 'Unable to set ZMQ_LINGER on push socket' ! stop 'Unable to set ZMQ_LINGER on push socket'
endif ! endif
rc = f77_zmq_close(zmq_socket_push) rc = f77_zmq_close(zmq_socket_push)
if (rc /= 0) then if (rc /= 0) then
@ -805,7 +805,7 @@ subroutine end_zmq_to_qp_run_socket(zmq_to_qp_run_socket)
! stop 'error' ! stop 'error'
! endif ! endif
rc = f77_zmq_setsockopt(zmq_to_qp_run_socket,ZMQ_LINGER,0,4) rc = f77_zmq_setsockopt(zmq_to_qp_run_socket,ZMQ_LINGER,1000,4)
if (rc /= 0) then if (rc /= 0) then
stop 'Unable to set ZMQ_LINGER on zmq_to_qp_run_socket' stop 'Unable to set ZMQ_LINGER on zmq_to_qp_run_socket'
endif endif