mpi-hs: MPI bindings for Haskell

[ apache, distributed-computing, library, program ] [ Propose Tags ]

MPI (the Message Passing Interface) is widely used standard for distributed-memory programming on HPC (High Performance Computing) systems. MPI allows exchanging data (_messages_) between programs running in parallel. There are several high-quality open source MPI implementations (e.g. MPICH, MVAPICH, OpenMPI) as well as a variety of closed-source implementations. These libraries can typically make use of high-bandwidth low-latency communication hardware such as InfiniBand.

This library mpi-hs provides Haskell bindings for MPI. It is based on ideas taken from haskell-mpi, Boost.MPI, and MPI for Python.

mpi-hs provides two API levels: A low-level API gives rather direct access to the MPI API, apart from certain "reasonable" mappings from C to Haskell (e.g. output arguments that are in C stored to a pointer are in Haskell regular return values). A high-level API simplifies exchanging arbitrary values that can be serialized.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.1, 0.3.0.0, 0.3.1.0, 0.4.0.0, 0.4.1.0, 0.5.1.1, 0.5.1.2, 0.5.2.0, 0.5.3.0, 0.6.0.0, 0.7.0.0, 0.7.1.0, 0.7.1.2, 0.7.2.0, 0.7.3.0
Dependencies base (>=4.11 && <4.12), mpi-hs [details]
License Apache-2.0
Author Erik Schnetter
Maintainer Erik Schnetter
Category Distributed Computing
Home page https://github.com/eschnett/mpi-hs#readme
Bug tracker https://github.com/eschnett/mpi-hs/issues
Source repo head: git clone https://github.com/eschnett/mpi-hs
Uploaded by eschnett at 2018-10-16T20:10:05Z
Distributions LTSHaskell:0.7.2.0, Stackage:0.7.3.0
Reverse Dependencies 3 direct, 0 indirect [details]
Executables mpi-hs
Downloads 5609 total (50 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user [build log]
All reported builds failed as of 2018-10-16 [all 3 reports]

Readme for mpi-hs-0.1.0.1

[back to package description]

mpi-hs

MPI bindings for Haskell

CircleCI

Overview

MPI (the Message Passing Interface) is widely used standard for distributed-memory programming on HPC (High Performance Computing) systems. MPI allows exchanging data (messages) between programs running in parallel. There are several high-quality open source MPI implementations (e.g. MPICH, MVAPICH, OpenMPI) as well as a variety of closed-source implementations. These libraries can typically make use of high-bandwidth low-latency communication hardware such as InfiniBand.

This library mpi-hs provides Haskell bindings for MPI. It is based on ideas taken from haskell-mpi, Boost.MPI, and MPI for Python.

mpi-hs provides two API levels: A low-level API gives rather direct access to the MPI API, apart from certain "reasonable" mappings from C to Haskell (e.g. output arguments that are in C stored to a pointer are in Haskell regular return values). A high-level API simplifies exchanging arbitrary values that can be serialized.

Example

This is a typical MPI C code:

#include <stdio.h>
#include <mpi.h>

int main(int argc, char** argv) {
  MPI_Init(&argc, &argv);
  int rank, size;
  MPI_Comm_rank(MPI_COMM_WORLD, &rank);
  MPI_Comm_size(MPI_COMM_WORLD, &size);
  printf("This is process %d of %d\n", rank, size);
  MPI_Finalize();
  return 0;
}

The Haskell equivalent looks like this:

import Control.Distributed.MPI as MPI

main :: IO ()
main =
  do MPI.init
     rank <- MPI.commRank MPI.commWorld
     size <- MPI.commSize MPI.commWorld
     putStrLn $ "This is process " ++ show rank ++ " of " ++ show size
     MPI.finalize