mirror of
https://github.com/LCPQ/quantum_package
synced 2024-12-22 20:35:19 +01:00
Added delay in ZMQ
This commit is contained in:
parent
e00a631641
commit
a9f225ef89
@ -1254,7 +1254,7 @@ subroutine ZMQ_selection(N_in, pt2)
|
|||||||
if (i==0) then
|
if (i==0) then
|
||||||
call selection_collector(b, pt2)
|
call selection_collector(b, pt2)
|
||||||
else
|
else
|
||||||
call sleep(.1)
|
call sleep(1)
|
||||||
call selection_slave_inproc(i)
|
call selection_slave_inproc(i)
|
||||||
endif
|
endif
|
||||||
!$OMP END PARALLEL
|
!$OMP END PARALLEL
|
||||||
|
@ -1,11 +1,8 @@
|
|||||||
use f77_zmq
|
use f77_zmq
|
||||||
use omp_lib
|
use omp_lib
|
||||||
|
|
||||||
integer, pointer :: thread_id
|
|
||||||
integer(omp_lock_kind) :: zmq_lock
|
|
||||||
|
|
||||||
|
|
||||||
BEGIN_PROVIDER [ integer(ZMQ_PTR), zmq_context ]
|
BEGIN_PROVIDER [ integer(ZMQ_PTR), zmq_context ]
|
||||||
|
&BEGIN_PROVIDER [ integer(omp_lock_kind), zmq_lock ]
|
||||||
use f77_zmq
|
use f77_zmq
|
||||||
implicit none
|
implicit none
|
||||||
BEGIN_DOC
|
BEGIN_DOC
|
||||||
@ -407,7 +404,6 @@ subroutine end_zmq_sub_socket(zmq_socket_sub)
|
|||||||
integer(ZMQ_PTR), intent(in) :: zmq_socket_sub
|
integer(ZMQ_PTR), intent(in) :: zmq_socket_sub
|
||||||
integer :: rc
|
integer :: rc
|
||||||
|
|
||||||
PROVIDE zmq_context
|
|
||||||
call omp_set_lock(zmq_lock)
|
call omp_set_lock(zmq_lock)
|
||||||
rc = f77_zmq_close(zmq_socket_sub)
|
rc = f77_zmq_close(zmq_socket_sub)
|
||||||
call omp_unset_lock(zmq_lock)
|
call omp_unset_lock(zmq_lock)
|
||||||
@ -429,7 +425,6 @@ subroutine end_zmq_pair_socket(zmq_socket_pair)
|
|||||||
integer :: rc
|
integer :: rc
|
||||||
character*(8), external :: zmq_port
|
character*(8), external :: zmq_port
|
||||||
|
|
||||||
PROVIDE zmq_context
|
|
||||||
call omp_set_lock(zmq_lock)
|
call omp_set_lock(zmq_lock)
|
||||||
rc = f77_zmq_close(zmq_socket_pair)
|
rc = f77_zmq_close(zmq_socket_pair)
|
||||||
call omp_unset_lock(zmq_lock)
|
call omp_unset_lock(zmq_lock)
|
||||||
@ -450,7 +445,6 @@ subroutine end_zmq_pull_socket(zmq_socket_pull)
|
|||||||
integer :: rc
|
integer :: rc
|
||||||
character*(8), external :: zmq_port
|
character*(8), external :: zmq_port
|
||||||
|
|
||||||
PROVIDE zmq_context
|
|
||||||
call omp_set_lock(zmq_lock)
|
call omp_set_lock(zmq_lock)
|
||||||
rc = f77_zmq_close(zmq_socket_pull)
|
rc = f77_zmq_close(zmq_socket_pull)
|
||||||
call omp_unset_lock(zmq_lock)
|
call omp_unset_lock(zmq_lock)
|
||||||
@ -478,7 +472,6 @@ subroutine end_zmq_push_socket(zmq_socket_push,thread)
|
|||||||
stop 'Unable to set ZMQ_LINGER on push socket'
|
stop 'Unable to set ZMQ_LINGER on push socket'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
PROVIDE zmq_context
|
|
||||||
call omp_set_lock(zmq_lock)
|
call omp_set_lock(zmq_lock)
|
||||||
rc = f77_zmq_close(zmq_socket_push)
|
rc = f77_zmq_close(zmq_socket_push)
|
||||||
call omp_unset_lock(zmq_lock)
|
call omp_unset_lock(zmq_lock)
|
||||||
@ -514,10 +507,10 @@ subroutine new_parallel_job(zmq_to_qp_run_socket,name_in)
|
|||||||
|
|
||||||
call omp_set_lock(zmq_lock)
|
call omp_set_lock(zmq_lock)
|
||||||
zmq_context = f77_zmq_ctx_new ()
|
zmq_context = f77_zmq_ctx_new ()
|
||||||
|
call omp_unset_lock(zmq_lock)
|
||||||
if (zmq_context == 0_ZMQ_PTR) then
|
if (zmq_context == 0_ZMQ_PTR) then
|
||||||
stop 'ZMQ_PTR is null'
|
stop 'ZMQ_PTR is null'
|
||||||
endif
|
endif
|
||||||
call omp_unset_lock(zmq_lock)
|
|
||||||
! rc = f77_zmq_ctx_set(zmq_context, ZMQ_IO_THREADS, nproc)
|
! rc = f77_zmq_ctx_set(zmq_context, ZMQ_IO_THREADS, nproc)
|
||||||
! if (rc /= 0) then
|
! if (rc /= 0) then
|
||||||
! print *, 'Unable to set the number of ZMQ IO threads to', nproc
|
! print *, 'Unable to set the number of ZMQ IO threads to', nproc
|
||||||
|
Loading…
Reference in New Issue
Block a user