mirror of
https://gitlab.com/scemama/qmcchem.git
synced 2024-12-22 04:13:31 +01:00
Fixing walkers
This commit is contained in:
parent
2cc2d713bc
commit
0485afda6f
@ -218,7 +218,7 @@ let run ?(daemon=true) ezfio_filename =
|
||||
|
||||
(** Last time when the walkers were saved to disk. *)
|
||||
let last_save_walkers =
|
||||
ref (Unix.gettimeofday ())
|
||||
ref 0.
|
||||
in
|
||||
|
||||
|
||||
@ -226,20 +226,20 @@ let run ?(daemon=true) ezfio_filename =
|
||||
let save_walkers () =
|
||||
if (delta_t !last_save_walkers > 10. ) then
|
||||
begin
|
||||
let t0 =
|
||||
Unix.gettimeofday ()
|
||||
in
|
||||
Ezfio.set_electrons_elec_coord_pool_size walk_num_tot ;
|
||||
let walkers_list =
|
||||
Array.map Array.to_list walkers_array
|
||||
Array.map Array.to_list walkers_array
|
||||
|> Array.to_list
|
||||
|> List.concat
|
||||
|> List.map float_of_string
|
||||
in
|
||||
Ezfio.set_electrons_elec_coord_pool (Ezfio.ezfio_array_of_list
|
||||
~rank:3 ~dim:[| elec_num+1 ; 3 ; walk_num_tot |] ~data:walkers_list);
|
||||
let t0 =
|
||||
Unix.gettimeofday ()
|
||||
in
|
||||
send_log "status" walk_num_tot t0 "Saved walkers";
|
||||
last_save_walkers := Unix.gettimeofday ();
|
||||
last_save_walkers := t0 ;
|
||||
end
|
||||
in
|
||||
|
||||
@ -737,10 +737,6 @@ let run ?(daemon=true) ezfio_filename =
|
||||
recv_log log_msg ;
|
||||
for i=0 to ((Array.length w)-1)
|
||||
do
|
||||
(*
|
||||
Array.replace walkers_array (!last_walker) (fun _ -> Array.map
|
||||
string_of_float w.(i));
|
||||
*)
|
||||
walkers_array.(!last_walker) <- Array.map string_of_float w.(i);
|
||||
increment_last_walker ();
|
||||
done;
|
||||
@ -776,6 +772,7 @@ let run ?(daemon=true) ezfio_filename =
|
||||
in handle msg
|
||||
in
|
||||
|
||||
save_walkers ();
|
||||
(* Main loop *)
|
||||
while (!status <> Status.Stopped)
|
||||
do
|
||||
|
Loading…
Reference in New Issue
Block a user