mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-07-27 12:57:24 +02:00
Restored ocaml changes present in dev
This commit is contained in:
parent
f2f82d3f0a
commit
febf89f301
@ -1,3 +1,5 @@
|
|||||||
|
exception Error of string
|
||||||
|
|
||||||
type short_opt = char
|
type short_opt = char
|
||||||
type long_opt = string
|
type long_opt = string
|
||||||
type optional = Mandatory | Optional
|
type optional = Mandatory | Optional
|
||||||
@ -181,15 +183,16 @@ let set_specs specs_in =
|
|||||||
Getopt.parse_cmdline cmd_specs (fun x -> anon_args := !anon_args @ [x]);
|
Getopt.parse_cmdline cmd_specs (fun x -> anon_args := !anon_args @ [x]);
|
||||||
|
|
||||||
if show_help () then
|
if show_help () then
|
||||||
(help () ; exit 0);
|
help ()
|
||||||
|
else
|
||||||
|
(* Check that all mandatory arguments are set *)
|
||||||
|
List.filter (fun x -> x.short <> ' ' && x.opt = Mandatory) !specs
|
||||||
|
|> List.iter (fun x ->
|
||||||
|
match get x.long with
|
||||||
|
| Some _ -> ()
|
||||||
|
| None -> raise (Error ("--"^x.long^" option is missing."))
|
||||||
|
)
|
||||||
|
|
||||||
(* Check that all mandatory arguments are set *)
|
|
||||||
List.filter (fun x -> x.short <> ' ' && x.opt = Mandatory) !specs
|
|
||||||
|> List.iter (fun x ->
|
|
||||||
match get x.long with
|
|
||||||
| Some _ -> ()
|
|
||||||
| None -> failwith ("Error: --"^x.long^" option is missing.")
|
|
||||||
)
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
||||||
|
@ -59,6 +59,8 @@ let () =
|
|||||||
*)
|
*)
|
||||||
|
|
||||||
|
|
||||||
|
exception Error of string
|
||||||
|
|
||||||
type short_opt = char
|
type short_opt = char
|
||||||
|
|
||||||
type long_opt = string
|
type long_opt = string
|
||||||
|
@ -101,7 +101,7 @@ let to_string_general ~f m =
|
|||||||
|> String.concat "\n"
|
|> String.concat "\n"
|
||||||
|
|
||||||
let to_string =
|
let to_string =
|
||||||
to_string_general ~f:(fun x -> Atom.to_string Units.Angstrom x)
|
to_string_general ~f:(fun x -> Atom.to_string ~units:Units.Angstrom x)
|
||||||
|
|
||||||
let to_xyz =
|
let to_xyz =
|
||||||
to_string_general ~f:Atom.to_xyz
|
to_string_general ~f:Atom.to_xyz
|
||||||
@ -113,7 +113,7 @@ let of_xyz_string
|
|||||||
s =
|
s =
|
||||||
let l = String_ext.split s ~on:'\n'
|
let l = String_ext.split s ~on:'\n'
|
||||||
|> List.filter (fun x -> x <> "")
|
|> List.filter (fun x -> x <> "")
|
||||||
|> list_map (fun x -> Atom.of_string units x)
|
|> list_map (fun x -> Atom.of_string ~units x)
|
||||||
in
|
in
|
||||||
let ne = ( get_charge {
|
let ne = ( get_charge {
|
||||||
nuclei=l ;
|
nuclei=l ;
|
||||||
|
@ -56,3 +56,7 @@ let string_of_string s = s
|
|||||||
let list_map f l =
|
let list_map f l =
|
||||||
List.rev_map f l
|
List.rev_map f l
|
||||||
|> List.rev
|
|> List.rev
|
||||||
|
|
||||||
|
let socket_convert socket =
|
||||||
|
((Obj.magic (Obj.repr socket)) : [ `Xsub ] Zmq.Socket.t )
|
||||||
|
|
||||||
|
@ -677,12 +677,15 @@ let run ?o b au c d m p cart xyz_file =
|
|||||||
|
|
||||||
let () =
|
let () =
|
||||||
|
|
||||||
|
try (
|
||||||
|
|
||||||
let open Command_line in
|
let open Command_line in
|
||||||
begin
|
begin
|
||||||
"Creates an EZFIO directory from a standard xyz file or from a z-matrix file in Gaussian format. The basis set is defined as a single string if all the atoms are taken from the same basis set, otherwise specific elements can be defined as follows:
|
"Creates an EZFIO directory from a standard xyz file or from a z-matrix file in Gaussian format. The basis set is defined as a single string if all the atoms are taken from the same basis set, otherwise specific elements can be defined as follows:
|
||||||
|
|
||||||
-b \"cc-pcvdz | H:cc-pvdz | C:6-31g\"
|
-b \"cc-pcvdz | H:cc-pvdz | C:6-31g\"
|
||||||
-b \"cc-pvtz | 1,H:sto-3g | 3,H:6-31g\"
|
-b \"cc-pvtz | 1,H:sto-3g | 3,H:6-31g\"
|
||||||
|
|
||||||
If a file with the same name as the basis set exists, this file will be read. Otherwise, the basis set is obtained from the database.
|
If a file with the same name as the basis set exists, this file will be read. Otherwise, the basis set is obtained from the database.
|
||||||
" |> set_description_doc ;
|
" |> set_description_doc ;
|
||||||
set_header_doc (Sys.argv.(0) ^ " - Quantum Package command");
|
set_header_doc (Sys.argv.(0) ^ " - Quantum Package command");
|
||||||
@ -732,7 +735,7 @@ If a file with the same name as the basis set exists, this file will be read. O
|
|||||||
|
|
||||||
let basis =
|
let basis =
|
||||||
match Command_line.get "basis" with
|
match Command_line.get "basis" with
|
||||||
| None -> assert false
|
| None -> ""
|
||||||
| Some x -> x
|
| Some x -> x
|
||||||
in
|
in
|
||||||
|
|
||||||
@ -771,10 +774,14 @@ If a file with the same name as the basis set exists, this file will be read. O
|
|||||||
|
|
||||||
let xyz_filename =
|
let xyz_filename =
|
||||||
match Command_line.anon_args () with
|
match Command_line.anon_args () with
|
||||||
| [x] -> x
|
| [] -> failwith "input file is missing"
|
||||||
| _ -> (Command_line.help () ; failwith "input file is missing")
|
| x::_ -> x
|
||||||
in
|
in
|
||||||
|
|
||||||
run ?o:output basis au charge dummy multiplicity pseudo cart xyz_filename
|
run ?o:output basis au charge dummy multiplicity pseudo cart xyz_filename
|
||||||
|
)
|
||||||
|
with
|
||||||
|
| Failure txt -> Printf.eprintf "Fatal error: %s\n%!" txt
|
||||||
|
| Command_line.Error txt -> Printf.eprintf "Command line error: %s\n%!" txt
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ open Qputils
|
|||||||
open Qptypes
|
open Qptypes
|
||||||
|
|
||||||
type ezfio_or_address = EZFIO of string | ADDRESS of string
|
type ezfio_or_address = EZFIO of string | ADDRESS of string
|
||||||
type req_or_sub = REQ | SUB
|
type req_or_sub = REQ | SUB
|
||||||
|
|
||||||
let localport = 42379
|
let localport = 42379
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ let () =
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
let arg =
|
let arg =
|
||||||
let x =
|
let x =
|
||||||
match Command_line.anon_args () with
|
match Command_line.anon_args () with
|
||||||
| [x] -> x
|
| [x] -> x
|
||||||
| _ -> begin
|
| _ -> begin
|
||||||
@ -44,7 +44,7 @@ let () =
|
|||||||
in
|
in
|
||||||
|
|
||||||
|
|
||||||
let localhost =
|
let localhost =
|
||||||
Lazy.force TaskServer.ip_address
|
Lazy.force TaskServer.ip_address
|
||||||
in
|
in
|
||||||
|
|
||||||
@ -52,28 +52,28 @@ let () =
|
|||||||
let long_address =
|
let long_address =
|
||||||
match arg with
|
match arg with
|
||||||
| ADDRESS x -> x
|
| ADDRESS x -> x
|
||||||
| EZFIO x ->
|
| EZFIO x ->
|
||||||
let ic =
|
let ic =
|
||||||
Filename.concat (Qpackage.ezfio_work x) "qp_run_address"
|
Filename.concat (Qpackage.ezfio_work x) "qp_run_address"
|
||||||
|> open_in
|
|> open_in
|
||||||
in
|
in
|
||||||
let result =
|
let result =
|
||||||
input_line ic
|
input_line ic
|
||||||
|> String.trim
|
|> String.trim
|
||||||
in
|
in
|
||||||
close_in ic;
|
close_in ic;
|
||||||
result
|
result
|
||||||
in
|
in
|
||||||
|
|
||||||
let protocol, address, port =
|
let protocol, address, port =
|
||||||
match String.split_on_char ':' long_address with
|
match String.split_on_char ':' long_address with
|
||||||
| t :: a :: p :: [] -> t, a, int_of_string p
|
| t :: a :: p :: [] -> t, a, int_of_string p
|
||||||
| _ -> failwith @@
|
| _ -> failwith @@
|
||||||
Printf.sprintf "%s : Malformed address" long_address
|
Printf.sprintf "%s : Malformed address" long_address
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|
||||||
let zmq_context =
|
let zmq_context =
|
||||||
Zmq.Context.create ()
|
Zmq.Context.create ()
|
||||||
in
|
in
|
||||||
|
|
||||||
@ -105,10 +105,10 @@ let () =
|
|||||||
|
|
||||||
|
|
||||||
let create_socket sock_type bind_or_connect addr =
|
let create_socket sock_type bind_or_connect addr =
|
||||||
let socket =
|
let socket =
|
||||||
Zmq.Socket.create zmq_context sock_type
|
Zmq.Socket.create zmq_context sock_type
|
||||||
in
|
in
|
||||||
let () =
|
let () =
|
||||||
try
|
try
|
||||||
bind_or_connect socket addr
|
bind_or_connect socket addr
|
||||||
with
|
with
|
||||||
@ -131,37 +131,64 @@ let () =
|
|||||||
Sys.set_signal Sys.sigint handler;
|
Sys.set_signal Sys.sigint handler;
|
||||||
|
|
||||||
|
|
||||||
let new_thread req_or_sub addr_in addr_out =
|
let new_thread_req addr_in addr_out =
|
||||||
let socket_in, socket_out =
|
let socket_in, socket_out =
|
||||||
match req_or_sub with
|
|
||||||
| REQ ->
|
|
||||||
create_socket Zmq.Socket.router Zmq.Socket.bind addr_in,
|
create_socket Zmq.Socket.router Zmq.Socket.bind addr_in,
|
||||||
create_socket Zmq.Socket.dealer Zmq.Socket.connect addr_out
|
create_socket Zmq.Socket.dealer Zmq.Socket.connect addr_out
|
||||||
| SUB ->
|
|
||||||
create_socket Zmq.Socket.sub Zmq.Socket.connect addr_in,
|
|
||||||
create_socket Zmq.Socket.pub Zmq.Socket.bind addr_out
|
|
||||||
in
|
in
|
||||||
|
|
||||||
if req_or_sub = SUB then
|
|
||||||
Zmq.Socket.subscribe socket_in "";
|
|
||||||
|
|
||||||
|
let action_in =
|
||||||
|
fun () -> Zmq.Socket.recv_all socket_in |> Zmq.Socket.send_all socket_out
|
||||||
let action_in =
|
|
||||||
match req_or_sub with
|
|
||||||
| REQ -> (fun () -> Zmq.Socket.recv_all socket_in |> Zmq.Socket.send_all socket_out)
|
|
||||||
| SUB -> (fun () -> Zmq.Socket.recv_all socket_in |> Zmq.Socket.send_all socket_out)
|
|
||||||
in
|
in
|
||||||
|
|
||||||
let action_out =
|
let action_out =
|
||||||
match req_or_sub with
|
fun () -> Zmq.Socket.recv_all socket_out |> Zmq.Socket.send_all socket_in
|
||||||
| REQ -> (fun () -> Zmq.Socket.recv_all socket_out |> Zmq.Socket.send_all socket_in )
|
|
||||||
| SUB -> (fun () -> () )
|
|
||||||
in
|
in
|
||||||
|
|
||||||
let pollitem =
|
let pollitem =
|
||||||
Zmq.Poll.mask_of
|
Zmq.Poll.mask_of
|
||||||
[| (socket_in, Zmq.Poll.In) ; (socket_out, Zmq.Poll.In) |]
|
[| (socket_convert socket_in, Zmq.Poll.In) ; (socket_convert socket_out, Zmq.Poll.In) |]
|
||||||
|
in
|
||||||
|
|
||||||
|
while !run_status do
|
||||||
|
|
||||||
|
let polling =
|
||||||
|
Zmq.Poll.poll ~timeout:1000 pollitem
|
||||||
|
in
|
||||||
|
|
||||||
|
match polling with
|
||||||
|
| [| Some Zmq.Poll.In ; Some Zmq.Poll.In |] -> ( action_out () ; action_in () )
|
||||||
|
| [| _ ; Some Zmq.Poll.In |] -> action_out ()
|
||||||
|
| [| Some Zmq.Poll.In ; _ |] -> action_in ()
|
||||||
|
| _ -> ()
|
||||||
|
done;
|
||||||
|
|
||||||
|
Zmq.Socket.close socket_in;
|
||||||
|
Zmq.Socket.close socket_out;
|
||||||
|
in
|
||||||
|
|
||||||
|
let new_thread_sub addr_in addr_out =
|
||||||
|
let socket_in, socket_out =
|
||||||
|
create_socket Zmq.Socket.sub Zmq.Socket.connect addr_in,
|
||||||
|
create_socket Zmq.Socket.pub Zmq.Socket.bind addr_out
|
||||||
|
in
|
||||||
|
|
||||||
|
Zmq.Socket.subscribe socket_in "";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
let action_in =
|
||||||
|
fun () -> Zmq.Socket.recv_all socket_in |> Zmq.Socket.send_all socket_out
|
||||||
|
in
|
||||||
|
|
||||||
|
let action_out =
|
||||||
|
fun () -> ()
|
||||||
|
in
|
||||||
|
|
||||||
|
let pollitem =
|
||||||
|
Zmq.Poll.mask_of
|
||||||
|
[| (socket_convert socket_in, Zmq.Poll.In) ; (socket_convert socket_out, Zmq.Poll.In) |]
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|
||||||
@ -173,8 +200,8 @@ let () =
|
|||||||
|
|
||||||
match polling with
|
match polling with
|
||||||
| [| Some Zmq.Poll.In ; Some Zmq.Poll.In |] -> ( action_out () ; action_in () )
|
| [| Some Zmq.Poll.In ; Some Zmq.Poll.In |] -> ( action_out () ; action_in () )
|
||||||
| [| _ ; Some Zmq.Poll.In |] -> action_out ()
|
| [| _ ; Some Zmq.Poll.In |] -> action_out ()
|
||||||
| [| Some Zmq.Poll.In ; _ |] -> action_in ()
|
| [| Some Zmq.Poll.In ; _ |] -> action_in ()
|
||||||
| _ -> ()
|
| _ -> ()
|
||||||
done;
|
done;
|
||||||
|
|
||||||
@ -193,8 +220,8 @@ let () =
|
|||||||
Printf.sprintf "tcp://*:%d" localport
|
Printf.sprintf "tcp://*:%d" localport
|
||||||
in
|
in
|
||||||
|
|
||||||
let f () =
|
let f () =
|
||||||
new_thread REQ addr_in addr_out
|
new_thread_req addr_in addr_out
|
||||||
in
|
in
|
||||||
|
|
||||||
(Thread.create f) ()
|
(Thread.create f) ()
|
||||||
@ -211,8 +238,8 @@ let () =
|
|||||||
Printf.sprintf "tcp://*:%d" (localport+2)
|
Printf.sprintf "tcp://*:%d" (localport+2)
|
||||||
in
|
in
|
||||||
|
|
||||||
let f () =
|
let f () =
|
||||||
new_thread REQ addr_in addr_out
|
new_thread_req addr_in addr_out
|
||||||
in
|
in
|
||||||
(Thread.create f) ()
|
(Thread.create f) ()
|
||||||
in
|
in
|
||||||
@ -227,8 +254,8 @@ let () =
|
|||||||
Printf.sprintf "tcp://*:%d" (localport+1)
|
Printf.sprintf "tcp://*:%d" (localport+1)
|
||||||
in
|
in
|
||||||
|
|
||||||
let f () =
|
let f () =
|
||||||
new_thread SUB addr_in addr_out
|
new_thread_sub addr_in addr_out
|
||||||
in
|
in
|
||||||
(Thread.create f) ()
|
(Thread.create f) ()
|
||||||
in
|
in
|
||||||
@ -236,7 +263,7 @@ let () =
|
|||||||
|
|
||||||
|
|
||||||
let input_thread =
|
let input_thread =
|
||||||
let f () =
|
let f () =
|
||||||
let addr_out =
|
let addr_out =
|
||||||
match arg with
|
match arg with
|
||||||
| EZFIO _ -> None
|
| EZFIO _ -> None
|
||||||
@ -248,22 +275,22 @@ let () =
|
|||||||
Printf.sprintf "tcp://*:%d" (localport+9)
|
Printf.sprintf "tcp://*:%d" (localport+9)
|
||||||
in
|
in
|
||||||
|
|
||||||
let socket_in =
|
let socket_in =
|
||||||
create_socket Zmq.Socket.rep Zmq.Socket.bind addr_in
|
create_socket Zmq.Socket.rep Zmq.Socket.bind addr_in
|
||||||
in
|
in
|
||||||
|
|
||||||
let socket_out =
|
let socket_out =
|
||||||
match addr_out with
|
match addr_out with
|
||||||
| Some addr_out -> Some (
|
| Some addr_out -> Some (
|
||||||
create_socket Zmq.Socket.req Zmq.Socket.connect addr_out)
|
create_socket Zmq.Socket.req Zmq.Socket.connect addr_out)
|
||||||
| None -> None
|
| None -> None
|
||||||
in
|
in
|
||||||
|
|
||||||
let temp_file =
|
let temp_file =
|
||||||
Filename.temp_file "qp_tunnel" ".tar.gz"
|
Filename.temp_file "qp_tunnel" ".tar.gz"
|
||||||
in
|
in
|
||||||
|
|
||||||
let get_ezfio_filename () =
|
let get_ezfio_filename () =
|
||||||
match arg with
|
match arg with
|
||||||
| EZFIO x -> x
|
| EZFIO x -> x
|
||||||
| ADDRESS _ ->
|
| ADDRESS _ ->
|
||||||
@ -277,9 +304,9 @@ let () =
|
|||||||
end
|
end
|
||||||
in
|
in
|
||||||
|
|
||||||
let get_input () =
|
let get_input () =
|
||||||
match arg with
|
match arg with
|
||||||
| EZFIO x ->
|
| EZFIO x ->
|
||||||
begin
|
begin
|
||||||
Printf.sprintf "tar --exclude=\"*.gz.*\" -zcf %s %s" temp_file x
|
Printf.sprintf "tar --exclude=\"*.gz.*\" -zcf %s %s" temp_file x
|
||||||
|> Sys.command |> ignore;
|
|> Sys.command |> ignore;
|
||||||
@ -291,11 +318,11 @@ let () =
|
|||||||
in
|
in
|
||||||
ignore @@ Unix.lseek fd 0 Unix.SEEK_SET ;
|
ignore @@ Unix.lseek fd 0 Unix.SEEK_SET ;
|
||||||
let bstr =
|
let bstr =
|
||||||
Unix.map_file fd Bigarray.char
|
Unix.map_file fd Bigarray.char
|
||||||
Bigarray.c_layout false [| len |]
|
Bigarray.c_layout false [| len |]
|
||||||
|> Bigarray.array1_of_genarray
|
|> Bigarray.array1_of_genarray
|
||||||
in
|
in
|
||||||
let result =
|
let result =
|
||||||
String.init len (fun i -> bstr.{i}) ;
|
String.init len (fun i -> bstr.{i}) ;
|
||||||
in
|
in
|
||||||
Unix.close fd;
|
Unix.close fd;
|
||||||
@ -313,7 +340,7 @@ let () =
|
|||||||
end
|
end
|
||||||
in
|
in
|
||||||
|
|
||||||
let () =
|
let () =
|
||||||
match socket_out with
|
match socket_out with
|
||||||
| None -> ()
|
| None -> ()
|
||||||
| Some socket_out ->
|
| Some socket_out ->
|
||||||
@ -329,7 +356,7 @@ let () =
|
|||||||
| ADDRESS _ ->
|
| ADDRESS _ ->
|
||||||
begin
|
begin
|
||||||
Printf.printf "Getting input... %!";
|
Printf.printf "Getting input... %!";
|
||||||
let ezfio_filename =
|
let ezfio_filename =
|
||||||
get_ezfio_filename ()
|
get_ezfio_filename ()
|
||||||
in
|
in
|
||||||
Printf.printf "%s%!" ezfio_filename;
|
Printf.printf "%s%!" ezfio_filename;
|
||||||
@ -343,7 +370,7 @@ let () =
|
|||||||
|> Sys.command |> ignore ;
|
|> Sys.command |> ignore ;
|
||||||
let oc =
|
let oc =
|
||||||
Filename.concat (Qpackage.ezfio_work ezfio_filename) "qp_run_address"
|
Filename.concat (Qpackage.ezfio_work ezfio_filename) "qp_run_address"
|
||||||
|> open_out
|
|> open_out
|
||||||
in
|
in
|
||||||
Printf.fprintf oc "tcp://%s:%d\n" localhost localport;
|
Printf.fprintf oc "tcp://%s:%d\n" localhost localport;
|
||||||
close_out oc;
|
close_out oc;
|
||||||
@ -359,9 +386,9 @@ let () =
|
|||||||
let action () =
|
let action () =
|
||||||
match Zmq.Socket.recv socket_in with
|
match Zmq.Socket.recv socket_in with
|
||||||
| "get_input" -> get_input ()
|
| "get_input" -> get_input ()
|
||||||
|> Zmq.Socket.send socket_in
|
|> Zmq.Socket.send socket_in
|
||||||
| "get_ezfio_filename" -> get_ezfio_filename ()
|
| "get_ezfio_filename" -> get_ezfio_filename ()
|
||||||
|> Zmq.Socket.send socket_in
|
|> Zmq.Socket.send socket_in
|
||||||
| "test" -> Zmq.Socket.send socket_in "OK"
|
| "test" -> Zmq.Socket.send socket_in "OK"
|
||||||
| x -> Printf.sprintf "Message '%s' not understood" x
|
| x -> Printf.sprintf "Message '%s' not understood" x
|
||||||
|> Zmq.Socket.send socket_in
|
|> Zmq.Socket.send socket_in
|
||||||
@ -372,7 +399,7 @@ On remote hosts, create ssh tunnel using:
|
|||||||
ssh -L %d:%s:%d -L %d:%s:%d -L %d:%s:%d -L %d:%s:%d %s &
|
ssh -L %d:%s:%d -L %d:%s:%d -L %d:%s:%d -L %d:%s:%d %s &
|
||||||
Or from this host connect to clients using:
|
Or from this host connect to clients using:
|
||||||
ssh -R %d:localhost:%d -R %d:localhost:%d -R %d:localhost:%d -R %d:localhost:%d <host> &
|
ssh -R %d:localhost:%d -R %d:localhost:%d -R %d:localhost:%d -R %d:localhost:%d <host> &
|
||||||
%!"
|
%!"
|
||||||
(port ) localhost (localport )
|
(port ) localhost (localport )
|
||||||
(port+1) localhost (localport+1)
|
(port+1) localhost (localport+1)
|
||||||
(port+2) localhost (localport+2)
|
(port+2) localhost (localport+2)
|
||||||
@ -392,12 +419,12 @@ Or from this host connect to clients using:
|
|||||||
match polling.(0) with
|
match polling.(0) with
|
||||||
| Some Zmq.Poll.In -> action ()
|
| Some Zmq.Poll.In -> action ()
|
||||||
| None -> ()
|
| None -> ()
|
||||||
| Some Zmq.Poll.In_out
|
| Some Zmq.Poll.In_out
|
||||||
| Some Zmq.Poll.Out -> ()
|
| Some Zmq.Poll.Out -> ()
|
||||||
|
|
||||||
done;
|
done;
|
||||||
|
|
||||||
let () =
|
let () =
|
||||||
match socket_out with
|
match socket_out with
|
||||||
| Some socket_out -> Zmq.Socket.close socket_out
|
| Some socket_out -> Zmq.Socket.close socket_out
|
||||||
| None -> ()
|
| None -> ()
|
||||||
@ -415,7 +442,7 @@ Or from this host connect to clients using:
|
|||||||
Thread.join ocaml_thread;
|
Thread.join ocaml_thread;
|
||||||
Zmq.Context.terminate zmq_context;
|
Zmq.Context.terminate zmq_context;
|
||||||
Printf.printf "qp_tunnel exited properly.\n"
|
Printf.printf "qp_tunnel exited properly.\n"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user