mirror of
https://gitlab.com/scemama/qmcchem.git
synced 2024-11-07 14:43:39 +01:00
Merge branch 'develop' of github.com:scemama/qmcchem into develop
Conflicts: ocaml/Qmcchem_dataserver.ml
This commit is contained in:
commit
05f69be159
@ -18,6 +18,7 @@ let initialization_timeout = 600.
|
||||
let bind_socket ~socket_type ~socket ~address =
|
||||
try
|
||||
ZMQ.Socket.bind socket address
|
||||
|
||||
with
|
||||
| Unix.Unix_error (_, message, f) ->
|
||||
failwith @@ Printf.sprintf
|
||||
@ -42,7 +43,6 @@ let run ?(daemon=true) ezfio_filename =
|
||||
end ;
|
||||
in
|
||||
|
||||
|
||||
(** Measures the time difference between [t0] and [Time.now ()] *)
|
||||
let delta_t t0 =
|
||||
let t1 =
|
||||
|
@ -11,7 +11,6 @@ subroutine reconfigure(ipos,w)
|
||||
|
||||
tmp = 0.d0
|
||||
do k=1,walk_num
|
||||
ipos(k) = k
|
||||
tmp = tmp + w(k)
|
||||
enddo
|
||||
dwalk_num = dble(walk_num)/tmp
|
||||
|
@ -286,6 +286,10 @@ END_SHELL
|
||||
! Reconfiguration
|
||||
integer :: ipos(walk_num)
|
||||
|
||||
do k=1,walk_num
|
||||
ipos(k) = k
|
||||
enddo
|
||||
call dsort(srmc_weight,ipos,walk_num)
|
||||
call reconfigure(ipos,srmc_weight)
|
||||
|
||||
do k=1,walk_num
|
||||
|
@ -67,13 +67,14 @@ BEGIN_PROVIDER [ integer(ZMQ_PTR), zmq_to_dataserver_socket ]
|
||||
if (rc /= 0) then
|
||||
call abrt(irp_here, 'Unable to connect zmq_to_dataserver_socket')
|
||||
endif
|
||||
integer :: i
|
||||
integer :: i,j
|
||||
i=4
|
||||
rc = f77_zmq_setsockopt(zmq_to_dataserver_socket, ZMQ_SNDTIMEO, 600000, i)
|
||||
j=600000
|
||||
rc = f77_zmq_setsockopt(zmq_to_dataserver_socket, ZMQ_SNDTIMEO, j, i)
|
||||
if (rc /= 0) then
|
||||
call abrt(irp_here, 'Unable to set send timout in zmq_to_dataserver_socket')
|
||||
endif
|
||||
rc = f77_zmq_setsockopt(zmq_to_dataserver_socket, ZMQ_RCVTIMEO, 600000, i)
|
||||
rc = f77_zmq_setsockopt(zmq_to_dataserver_socket, ZMQ_RCVTIMEO, j, i)
|
||||
if (rc /= 0) then
|
||||
call abrt(irp_here, 'Unable to set recv timout in zmq_to_dataserver_socket')
|
||||
endif
|
||||
@ -103,12 +104,13 @@ BEGIN_PROVIDER [ integer(ZMQ_PTR), zmq_socket_push ]
|
||||
BEGIN_DOC
|
||||
! Socket on which to push the results
|
||||
END_DOC
|
||||
integer :: rc
|
||||
integer :: rc,j
|
||||
character*(64) :: address
|
||||
character*(8), external :: zmq_port
|
||||
zmq_socket_push = f77_zmq_socket(zmq_context, ZMQ_PUSH)
|
||||
address = trim(dataserver_address)//':'//zmq_port(2)
|
||||
rc = f77_zmq_setsockopt(zmq_socket_push,ZMQ_LINGER,600000,4)
|
||||
j=600000
|
||||
rc = f77_zmq_setsockopt(zmq_socket_push,ZMQ_LINGER,j,4)
|
||||
rc = f77_zmq_connect(zmq_socket_push, trim(address))
|
||||
if (rc /= 0) then
|
||||
call abrt(irp_here, 'Unable to connect zmq_socket_push')
|
||||
|
Loading…
Reference in New Issue
Block a user