10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-07-25 12:17:25 +02:00

Optimized parallel ERI

This commit is contained in:
Anthony Scemama 2018-10-23 14:37:02 +02:00
parent 1d4560418e
commit 56c8737019
2 changed files with 4 additions and 5 deletions

View File

@ -300,8 +300,8 @@ let of_basis_parallel basis =
result := (store_class_parallel ~cutoff cspc cls) :: !result; result := (store_class_parallel ~cutoff cspc cls) :: !result;
| None -> () | None -> ()
) shell_pairs; ) shell_pairs;
List.concat !result raise Exit
with Exit -> List.concat !result with Exit -> List.concat !result |> Array.of_list
in in
(* (*
@ -319,9 +319,9 @@ let of_basis_parallel basis =
else else
Fis.create ~size:0 `Dense Fis.create ~size:0 `Dense
in in
Farm.run f input_stream Farm.run ~ordered:false ~f input_stream
|> Stream.iter (fun l -> |> Stream.iter (fun l ->
List.iter (fun (i_c,j_c,k_c,l_c,value) -> Array.iter (fun (i_c,j_c,k_c,l_c,value) ->
set_chem eri_array i_c j_c k_c l_c value) l); set_chem eri_array i_c j_c k_c l_c value) l);
if not Parallel.master then if not Parallel.master then
exit 0; exit 0;

View File

@ -13,7 +13,6 @@ let make ?cartesian:(cartesian=false)
~nuclei ~nuclei
basis basis
= =
Printf.eprintf "Evaluating Simulation\n%!";
(* Tune Garbage Collector *) (* Tune Garbage Collector *)
let gc = Gc.get () in let gc = Gc.get () in