From 937d75c752b0a4d574b550a53924102a0cff562d Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 17 Oct 2018 18:48:39 +0200 Subject: [PATCH] Broadcasts --- INSTALL.md | 24 ++++++++++++++++++++++++ Parallel/Parallel.ml | 6 ++++-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index e3ddcf0..f885fba 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -21,6 +21,14 @@ export LACAML_LIBS="-L${MKLROOT}/lib/intel64 -Wl,--no-as-needed -lmkl_rt -lpthr opam install lacaml ``` +# MPI + +MPI is the Message Passing Interface, required for distributed parallelism. + +```bash +opam install mpi +``` + To use Intel MPI ```bash @@ -42,3 +50,19 @@ cd odoc-ltxhtml make install ``` +# Alcotest + +Lightweight and colourful test framework + +```bash +opam install alcotest +``` + +# Zarith + +Implements arithmetic and logical operations over arbitrary-precision integer + +```bash +opam install zarith +``` + diff --git a/Parallel/Parallel.ml b/Parallel/Parallel.ml index d6db9e6..bd3ba17 100644 --- a/Parallel/Parallel.ml +++ b/Parallel/Parallel.ml @@ -32,7 +32,8 @@ let broadcast_int x = let broadcast_int_array x = - Mpi.broadcast_int_array x 0 Mpi.comm_world + Mpi.broadcast_int_array x 0 Mpi.comm_world; + x let broadcast_float x = @@ -40,7 +41,8 @@ let broadcast_float x = let broadcast_float_array x = - Mpi.broadcast_float_array x 0 Mpi.comm_world + Mpi.broadcast_float_array x 0 Mpi.comm_world; + x let broadcast_vec x =