mirror of
https://gitlab.com/scemama/QCaml.git
synced 2025-01-03 01:55:40 +01:00
Parallel and single-core give exact same result
This commit is contained in:
parent
e56e01197d
commit
e64e6c73dc
@ -235,7 +235,7 @@ module Make(Zero_m : Zero_mType) = struct
|
||||
let t0 = Unix.gettimeofday () in
|
||||
let ishell = ref max_int in
|
||||
|
||||
let input_stream = Stream.of_list (List.rev shell_pairs) in
|
||||
let input_stream = Stream.of_list shell_pairs in
|
||||
|
||||
let f shell_p =
|
||||
let () =
|
||||
@ -248,31 +248,33 @@ module Make(Zero_m : Zero_mType) = struct
|
||||
in
|
||||
|
||||
let result = ref [] in
|
||||
try
|
||||
List.iter (fun shell_q ->
|
||||
let () =
|
||||
if Cs.index (Csp.shell_a shell_q) >
|
||||
Cs.index (Csp.shell_a shell_p) then
|
||||
raise Exit
|
||||
in
|
||||
let sq = Csp.shell_pairs shell_q in
|
||||
let cspc =
|
||||
if Array.length sp < Array.length sq then
|
||||
Cspc.make ~cutoff shell_p shell_q
|
||||
else
|
||||
Cspc.make ~cutoff shell_q shell_p
|
||||
in
|
||||
|
||||
match cspc with
|
||||
| Some cspc ->
|
||||
let cls =
|
||||
class_of_contracted_shell_pair_couple cspc
|
||||
let () =
|
||||
try
|
||||
List.iter (fun shell_q ->
|
||||
let () =
|
||||
if Cs.index (Csp.shell_a shell_q) >
|
||||
Cs.index (Csp.shell_a shell_p) then
|
||||
raise Exit
|
||||
in
|
||||
result := (store_class_parallel ~cutoff cspc cls) :: !result;
|
||||
| None -> ()
|
||||
) shell_pairs;
|
||||
raise Exit
|
||||
with Exit -> List.concat !result |> Array.of_list
|
||||
let sq = Csp.shell_pairs shell_q in
|
||||
let cspc =
|
||||
if Array.length sp < Array.length sq then
|
||||
Cspc.make ~cutoff shell_p shell_q
|
||||
else
|
||||
Cspc.make ~cutoff shell_q shell_p
|
||||
in
|
||||
|
||||
match cspc with
|
||||
| Some cspc ->
|
||||
let cls =
|
||||
class_of_contracted_shell_pair_couple cspc
|
||||
in
|
||||
result := (store_class_parallel ~cutoff cspc cls) :: !result;
|
||||
| None -> ()
|
||||
) shell_pairs;
|
||||
with Exit -> ()
|
||||
in
|
||||
List.concat !result |> Array.of_list
|
||||
in
|
||||
|
||||
let eri_array =
|
||||
|
Loading…
Reference in New Issue
Block a user