mirror of
https://gitlab.com/scemama/QCaml.git
synced 2025-04-19 06:50:07 +02:00
16 lines
479 B
OCaml
16 lines
479 B
OCaml
|
|
let () =
|
|
Printf.printf "Hello from rank %d of %d.\n" Parallel.rank Parallel.size;
|
|
let () = Parallel.barrier () in
|
|
(*
|
|
let v = Parallel.Vec.init 47 (fun i -> float_of_int i) in
|
|
*)
|
|
let a = Array.init 6 (fun i -> float_of_int (i+1)) |> Lacaml.D.Vec.of_array in
|
|
let v = Parallel.Vec.of_vec a in
|
|
Format.printf "%a" Parallel.Vec.pp v;
|
|
let w = Parallel.Vec.to_vec v in
|
|
if Parallel.master then
|
|
Format.printf "@[%a@]@;" (Lacaml.Io.pp_lfvec ()) w;
|
|
print_newline ();
|
|
|