mirror of
https://gitlab.com/scemama/qmcchem.git
synced 2024-11-07 06:33:38 +01:00
Merge branch 'master' into develop
This commit is contained in:
commit
08d112070b
@ -83,7 +83,7 @@ let hostname = lazy (
|
||||
try
|
||||
Unix.gethostname ()
|
||||
with
|
||||
| _ -> "localhost"
|
||||
| _ -> "127.0.0.1"
|
||||
)
|
||||
|
||||
|
||||
|
@ -100,7 +100,7 @@ let run ?(daemon=true) ezfio_filename =
|
||||
ZMQ.Socket.bind socket address;
|
||||
accu
|
||||
with
|
||||
| _ -> false;
|
||||
| _ -> false
|
||||
in
|
||||
ZMQ.Socket.close socket;
|
||||
result
|
||||
|
@ -12,13 +12,16 @@ let full_run ?(start_dataserver=true) ezfio_filename =
|
||||
|
||||
|
||||
(* Create the node file *)
|
||||
let server_file =
|
||||
Filename.concat ezfio_filename "nodefile"
|
||||
in
|
||||
Out_channel.with_file server_file ~f:(fun out_channel ->
|
||||
Launcher.create_nodefile ()
|
||||
|> Out_channel.output_string out_channel
|
||||
) ;
|
||||
(*
|
||||
let () =
|
||||
let server_file =
|
||||
Filename.concat ezfio_filename "nodefile"
|
||||
in
|
||||
Out_channel.with_file server_file ~f:(fun out_channel ->
|
||||
Launcher.create_nodefile ()
|
||||
|> Out_channel.output_string out_channel
|
||||
)
|
||||
*)
|
||||
|
||||
|
||||
(* Get the configuration of executables *)
|
||||
@ -32,7 +35,7 @@ let full_run ?(start_dataserver=true) ezfio_filename =
|
||||
if (start_dataserver) then
|
||||
begin
|
||||
(* Reset socket address in EZFIO *)
|
||||
Ezfio.set_simulation_http_server "tcp://localhost:65534";
|
||||
Ezfio.set_simulation_http_server "tcp://127.0.0.1:65534";
|
||||
|
||||
|
||||
(* Start the data server *)
|
||||
@ -64,7 +67,7 @@ let full_run ?(start_dataserver=true) ezfio_filename =
|
||||
ZMQ.Socket.send socket (Message.(to_string Test));
|
||||
ZMQ.Socket.recv socket
|
||||
) with
|
||||
| Unix.Unix_error _ ->
|
||||
| Unix.Unix_error (_,_,_) ->
|
||||
begin
|
||||
ZMQ.Socket.set_linger_period socket 1 ;
|
||||
ZMQ.Socket.close socket;
|
||||
|
@ -67,14 +67,13 @@ 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,j
|
||||
integer :: i
|
||||
i=4
|
||||
j=600000
|
||||
rc = f77_zmq_setsockopt(zmq_to_dataserver_socket, ZMQ_SNDTIMEO, j, i)
|
||||
rc = f77_zmq_setsockopt(zmq_to_dataserver_socket, ZMQ_SNDTIMEO, 600000, 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, j, i)
|
||||
rc = f77_zmq_setsockopt(zmq_to_dataserver_socket, ZMQ_RCVTIMEO, 600000, i)
|
||||
if (rc /= 0) then
|
||||
call abrt(irp_here, 'Unable to set recv timout in zmq_to_dataserver_socket')
|
||||
endif
|
||||
@ -104,13 +103,12 @@ BEGIN_PROVIDER [ integer(ZMQ_PTR), zmq_socket_push ]
|
||||
BEGIN_DOC
|
||||
! Socket on which to push the results
|
||||
END_DOC
|
||||
integer :: rc,j
|
||||
integer :: rc
|
||||
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)
|
||||
j=600000
|
||||
rc = f77_zmq_setsockopt(zmq_socket_push,ZMQ_LINGER,j,4)
|
||||
rc = f77_zmq_setsockopt(zmq_socket_push,ZMQ_LINGER,600000,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