mirror of
https://gitlab.com/scemama/QCaml.git
synced 2024-12-22 12:23:31 +01:00
Debugging Farm
This commit is contained in:
parent
937d75c752
commit
5195c28950
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
let () =
|
let pouet () =
|
||||||
Printf.printf "Hello from rank %d of %d.\n" Parallel.rank Parallel.size;
|
Printf.printf "Hello from rank %d of %d.\n" Parallel.rank Parallel.size;
|
||||||
let () = Parallel.barrier () in
|
let () = Parallel.barrier () in
|
||||||
(*
|
(*
|
||||||
@ -18,5 +18,14 @@ let v = Parallel.Vec.init 47 (fun i -> float_of_int i) in
|
|||||||
Format.printf "@[%a@]@;" (Lacaml.Io.pp_lfvec ()) w;
|
Format.printf "@[%a@]@;" (Lacaml.Io.pp_lfvec ()) w;
|
||||||
*)
|
*)
|
||||||
Printf.printf "%f %f\n" d1 d2;
|
Printf.printf "%f %f\n" d1 d2;
|
||||||
print_newline ();
|
print_newline ()
|
||||||
|
|
||||||
|
|
||||||
|
let () =
|
||||||
|
let f (a,b) = (Parallel.rank, a+b) in
|
||||||
|
let input = Stream.of_list
|
||||||
|
[ (1,2) ; (3,4) ; (5,6) ; (7,8) ; (9,10) ]
|
||||||
|
in
|
||||||
|
Farm.run_parallel f input
|
||||||
|
|> Stream.iter (fun (x,y) -> Printf.printf "%d %d\n" x y)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user