[Xposted to ghc-users haskell mailing lists]
Hi!
I'd like to announce (finally!) the first OFFICIAL PRE-release :) of
hMPI, a Haskell binding for a message passing interface conforming to
the MPI 1.1/1.2 standard.
It's available from
http://www-i2.informatik.rwth-aachen.de/Software/Haskell/libs/hmpi-0.9.0.tar.gz
or
http://www-i2.informatik.rwth-aachen.de/Software/Haskell/
(click on the "Haskell libraries" section)
hMPI is an acronym for HaskellMPI.
It enables programmers to write distributed Haskell applications which
run on a cluster of workstations, with taking full advantage of all
MPI features (like fast communication interfaces, different cluster
topologies, etc.), and of course all the neat Haskell stuff (e.g. type
safety, blah, ...)
The license is LGPL-2.1 .
hMPI is compatible with LAM and MPICH, but by far not all functions
are implemented. However, basic MPI needs 6 functions and currently
there are about 50 functions available (not all are tested
thoroughly). Others will be supported in future releases.
Installation should be fairly easy (undoubtedly, someone will prove me
wrong... :-p), since the package is AUTOMAKE'ed and AUTOCONF'ed, and
should detect Haskell compiler, MPI C libraries, flags, headers,
available MPI functions etc automatically [if not, it's a bug, so
please report it]
There are three interfaces, which permit access to MPI from Haskell:
* [MPI_CCalls.hs] the raw C function call interface
(you DON'T want this one...)
* [MPI.hs] everything marshalled into nice Haskell datatypes, except
that you are still able to fiddle with memory chunks when
sending/receiving data. Reasons to choose this interface are
efficiency (although you pay with less safety) and that you have a
completely different idea of data marshalling than I have ;) ...
* [HaskellMPI.hs] (nearly) full support for basic Haskell types like
Chars, Ints, Floats, Doubles, and lists of them. You don't have to
worry about memory allocation, even for immediate (== non-blocking)
send and receive requests. There is also a marshalling interface to
provide your own datatypes (however, there are only few helper
functions available, currently).
More powerful communication abstractions will follow very likely in a
future release.
Currently, documentation is nearly non-existant, so you should be
somewhat familiar with MPI. I tried to model the binding as close as
possible (and useful) to C interface. Otherwise, `fptags' and `M-x
grep' are your friends... ;)
There are also some example programs included (mostly tiny tests, and
a distributed mandelbrot thingy).
Help and comments welcome, as usual. This library is an open-source,
free-software project, so Free Software Rule #1 applies here:
contribute nothing, expect nothing... ;)
-
Changes since the previous (inofficial) release:
* removed ALL occurrences of `litlit's. They've always been an ugly
hack and caused quite some trouble (with -O2, for example). Now, the
binding should be quite portable to other Haskell compilers (modulo
some GHC extensions)
* MPE was nuked for now (it may be resurrected in the future, however)
* EasyMPI nuked, for now (I have some other ideas, which I have to
sort out a bit first)
* TerminationCheck nuked, will be reimplemented in near future
* `Intracomm' has been renamed to `Comm'
-- Prerequesites
Architecture: i386-linux, sun-sparc-solaris2
Build-Depends: mpich (= 1.1.2) | lam, ghc4 (= 4.08), make (= 3.77),
autoconf (= 2.12)
lam:
LAM (http://www.mpi.nd.edu/lam/) is a freely available implementation
of the MPI (Message Passing Interface) standard for Linux. I highly
recommend it in favour of MPICH!
mpich:
MPICH is a freely available, portable implementation of the MPI
(Message Passing Interface) standard
(http://www-unix.mcs.anl.gov/mpi/). It can be found at
http://www.mcs.anl.gov/mpi/mpich/. I tested with MPICH 1.1.2
(Solaris2, Linux) and MPICH 1.2.0 (Linux). Note, that I found some
bugs and non-compliances to the MPI standard at least in MPICH =
1.2.0.
ghc4:
You need the Glasgow Haskell Compiler GHC (version 4.08 or above,
tested with 4.08). Since the hMPI binding uses quite some GHC
extensions (FFI interface, ...), I'm afraid, you are stuck with it.
However, if you manage to get it compiled with some other Haskell
compiler (nhc98 is THE candidate), I'd like to hear about that.
make:
Because of some really nice makefile features (includes, make
variables, conditions), you need GNU make (tested with 3.78.1)
autoconf:
tested with 2.13
--
Cheers,
Michael
--
/~\ ASCII ribbon | "The sendmail configuration file is one of those files
\ / campaign | that looks like someone beat their head on the keyboard.
X against | After working with it... I