diff --git a/run_parallel.ml b/run_parallel.ml index afb24cc..ca60d5b 100644 --- a/run_parallel.ml +++ b/run_parallel.ml @@ -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)