Changes for Theta

This commit is contained in:
Anthony Scemama 2017-11-29 19:48:28 +01:00
parent 2e0370822d
commit 550c180cb4
3 changed files with 14 additions and 11 deletions

View File

@ -83,7 +83,7 @@ let hostname = lazy (
try
Unix.gethostname ()
with
| _ -> "localhost"
| _ -> "127.0.0.1"
)

View File

@ -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

View File

@ -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;