mirror of
https://gitlab.com/scemama/qmcchem.git
synced 2024-08-29 22:33:41 +02: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,9 +226,6 @@ 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
|
||||
@ -238,8 +235,11 @@ let run ?(daemon=true) ezfio_filename =
|
||||
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