10
1
mirror of https://gitlab.com/scemama/qmcchem.git synced 2024-12-22 04:13:31 +01:00

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 try
Unix.gethostname () Unix.gethostname ()
with with
| _ -> "localhost" | _ -> "127.0.0.1"
) )

View File

@ -100,7 +100,7 @@ let run ?(daemon=true) ezfio_filename =
ZMQ.Socket.bind socket address; ZMQ.Socket.bind socket address;
accu accu
with with
| _ -> false; | _ -> false
in in
ZMQ.Socket.close socket; ZMQ.Socket.close socket;
result result

View File

@ -12,13 +12,16 @@ let full_run ?(start_dataserver=true) ezfio_filename =
(* Create the node file *) (* Create the node file *)
let server_file = (*
Filename.concat ezfio_filename "nodefile" let () =
in let server_file =
Out_channel.with_file server_file ~f:(fun out_channel -> Filename.concat ezfio_filename "nodefile"
Launcher.create_nodefile () in
|> Out_channel.output_string out_channel Out_channel.with_file server_file ~f:(fun out_channel ->
) ; Launcher.create_nodefile ()
|> Out_channel.output_string out_channel
)
*)
(* Get the configuration of executables *) (* Get the configuration of executables *)
@ -32,7 +35,7 @@ let full_run ?(start_dataserver=true) ezfio_filename =
if (start_dataserver) then if (start_dataserver) then
begin begin
(* Reset socket address in EZFIO *) (* 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 *) (* 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.send socket (Message.(to_string Test));
ZMQ.Socket.recv socket ZMQ.Socket.recv socket
) with ) with
| Unix.Unix_error _ -> | Unix.Unix_error (_,_,_) ->
begin begin
ZMQ.Socket.set_linger_period socket 1 ; ZMQ.Socket.set_linger_period socket 1 ;
ZMQ.Socket.close socket; ZMQ.Socket.close socket;