mirror of
https://gitlab.com/scemama/QCaml.git
synced 2024-07-04 18:35:50 +02:00
Update configure
This commit is contained in:
parent
e6c597deeb
commit
2ffd82436d
|
@ -66,6 +66,7 @@ module Vec = struct
|
||||||
let make0 n =
|
let make0 n =
|
||||||
make n 0.
|
make n 0.
|
||||||
|
|
||||||
|
|
||||||
let init n f =
|
let init n f =
|
||||||
let result = create n in
|
let result = create n in
|
||||||
{ result with data =
|
{ result with data =
|
||||||
|
@ -76,22 +77,18 @@ module Vec = struct
|
||||||
|
|
||||||
|
|
||||||
let of_array a =
|
let of_array a =
|
||||||
let la = Array.length a in
|
let length_a = Array.length a in
|
||||||
let a =
|
let a =
|
||||||
let n = la mod size in
|
let n = length_a mod size in
|
||||||
if n > 0 then
|
if n > 0 then
|
||||||
Array.concat [ a ; Array.make (size-n) 0. ]
|
Array.concat [ a ; Array.make (size-n) 0. ]
|
||||||
else
|
else
|
||||||
a
|
a
|
||||||
in
|
in
|
||||||
let result = create la in
|
let result = create length_a in
|
||||||
let () = Mpi.barrier Mpi.comm_world in
|
|
||||||
Printf.printf "%d\n%!" rank;
|
|
||||||
let a_local = Array.make ((Array.length a)/size) 0. in
|
let a_local = Array.make ((Array.length a)/size) 0. in
|
||||||
Printf.printf "%d\n%!" (Array.length a_local);
|
|
||||||
let () = Mpi.scatter_float_array a a_local 0 Mpi.comm_world in
|
let () = Mpi.scatter_float_array a a_local 0 Mpi.comm_world in
|
||||||
{ result with data =
|
{ result with data = Lacaml.D.Vec.of_array a_local }
|
||||||
Lacaml.D.Vec.of_array a_local
|
|
||||||
}
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
2
configure
vendored
2
configure
vendored
|
@ -12,6 +12,7 @@ share='$(prefix)/share'
|
||||||
man='$(prefix)/man'
|
man='$(prefix)/man'
|
||||||
etc='$(prefix)/etc'
|
etc='$(prefix)/etc'
|
||||||
ocamlcflags='"-g -warn-error A"'
|
ocamlcflags='"-g -warn-error A"'
|
||||||
|
ocamllflags='"-g -warn-error A"'
|
||||||
ocamloptflags='"opt -O3 -nodynlink -remove-unused-arguments -rounds 16 -inline 100 -inline-max-unroll 100"'
|
ocamloptflags='"opt -O3 -nodynlink -remove-unused-arguments -rounds 16 -inline 100 -inline-max-unroll 100"'
|
||||||
ocamldocflags='-docflags "-g ltxhtml.cma -sort -css-style $(PWD)/style.css -colorize-code"'
|
ocamldocflags='-docflags "-g ltxhtml.cma -sort -css-style $(PWD)/style.css -colorize-code"'
|
||||||
|
|
||||||
|
@ -93,6 +94,7 @@ man=$man
|
||||||
etc=$etc
|
etc=$etc
|
||||||
|
|
||||||
ocamlcflags=$ocamlcflags
|
ocamlcflags=$ocamlcflags
|
||||||
|
ocamllflags=$ocamllflags
|
||||||
ocamloptflags=$ocamloptflags
|
ocamloptflags=$ocamloptflags
|
||||||
ocamldocflags=$ocamldocflags
|
ocamldocflags=$ocamldocflags
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ let () =
|
||||||
(*
|
(*
|
||||||
let v = Parallel.Vec.init 47 (fun i -> float_of_int i) 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)) in
|
let a = Array.init 47 (fun i -> float_of_int (i+1)) in
|
||||||
let v = Parallel.Vec.of_array a in
|
let v = Parallel.Vec.of_array a in
|
||||||
Format.printf "%a" Parallel.Vec.pp v;
|
Format.printf "%a" Parallel.Vec.pp v;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user