mirror of
https://gitlab.com/scemama/qmcchem.git
synced 2024-08-29 22:33:41 +02: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 ->
|
||||
begin
|
||||
let result =
|
||||
decode_ezfio_message msg
|
||||
Qptypes.decode_ezfio_message msg
|
||||
in
|
||||
Hashtbl.add ezfio_cache msg result;
|
||||
result
|
||||
end
|
||||
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 *)
|
||||
let pull_socket =
|
||||
|
@ -54,7 +54,6 @@ let run ezfio_filename dataserver =
|
||||
| Unix.Unix_error _ ->
|
||||
begin
|
||||
Unix.chdir tmpdir;
|
||||
Unix.sleepf 0.1 ;
|
||||
if Sys.file_exists "PID" then
|
||||
begin
|
||||
let pid =
|
||||
|
@ -341,7 +341,14 @@ match msg with " ] @
|
||||
List.map (fun (x,_,_,_) ->
|
||||
Printf.sprintf " | \"%s\" -> if (Ezfio.%s ()) then \"T\" else \"F\"" x x
|
||||
) 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
|
||||
String.concat "\n" result
|
||||
|> print_endline
|
||||
|
Loading…
Reference in New Issue
Block a user