10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-12-22 04:13:33 +01:00

Debugging Farm

This commit is contained in:
Anthony Scemama 2018-10-21 23:52:41 +02:00
parent 937d75c752
commit 5195c28950

View File

@ -1,5 +1,5 @@
let () =
let pouet () =
Printf.printf "Hello from rank %d of %d.\n" Parallel.rank Parallel.size;
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;
*)
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)