mirror of
https://gitlab.com/scemama/qmcchem.git
synced 2025-01-03 01:55:39 +01:00
Read all EZFIO in memory before run starts
This commit is contained in:
parent
5deb4bef6b
commit
b12ac1be79
@ -587,12 +587,17 @@ let run ?(daemon=true) ezfio_filename =
|
|||||||
| None ->
|
| None ->
|
||||||
begin
|
begin
|
||||||
let result =
|
let result =
|
||||||
decode_ezfio_message msg
|
Qptypes.decode_ezfio_message msg
|
||||||
in
|
in
|
||||||
Hashtbl.add ezfio_cache msg result;
|
Hashtbl.add ezfio_cache msg result;
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
in
|
in
|
||||||
|
List.iter (fun x ->
|
||||||
|
if handle_ezfio ("has_"^x) = "T" then
|
||||||
|
try ignore @@ handle_ezfio ("get_"^x)
|
||||||
|
with Failure _ -> ())
|
||||||
|
Qptypes.all_ezfio_messages;
|
||||||
|
|
||||||
(** Pull socket for computed data *)
|
(** Pull socket for computed data *)
|
||||||
let pull_socket =
|
let pull_socket =
|
||||||
|
@ -54,7 +54,6 @@ let run ezfio_filename dataserver =
|
|||||||
| Unix.Unix_error _ ->
|
| Unix.Unix_error _ ->
|
||||||
begin
|
begin
|
||||||
Unix.chdir tmpdir;
|
Unix.chdir tmpdir;
|
||||||
Unix.sleepf 0.1 ;
|
|
||||||
if Sys.file_exists "PID" then
|
if Sys.file_exists "PID" then
|
||||||
begin
|
begin
|
||||||
let pid =
|
let pid =
|
||||||
|
@ -341,7 +341,14 @@ match msg with " ] @
|
|||||||
List.map (fun (x,_,_,_) ->
|
List.map (fun (x,_,_,_) ->
|
||||||
Printf.sprintf " | \"%s\" -> if (Ezfio.%s ()) then \"T\" else \"F\"" x x
|
Printf.sprintf " | \"%s\" -> if (Ezfio.%s ()) then \"T\" else \"F\"" x x
|
||||||
) has_functions
|
) has_functions
|
||||||
) @ [" | x -> failwith (x^\" : Unknown EZFIO function\")\n;;"]
|
)
|
||||||
|
@ [" | x -> failwith (x^\" : Unknown EZFIO function\")\n;;" ;
|
||||||
|
"" ; "let all_ezfio_messages = [ " ] @
|
||||||
|
(
|
||||||
|
List.rev_map (fun (x,_,_,_) ->
|
||||||
|
Printf.sprintf " \"%s\" ; " (String.sub x 4 ((String.length x)-4))
|
||||||
|
) has_functions
|
||||||
|
) @ ["]"]
|
||||||
in
|
in
|
||||||
String.concat "\n" result
|
String.concat "\n" result
|
||||||
|> print_endline
|
|> print_endline
|
||||||
|
Loading…
Reference in New Issue
Block a user