[erlang-questions] Erlang and/or MPI

Richard A. O'Keefe <>
Thu Jun 27 03:26:52 CEST 2013

On 27/06/2013, at 5:20 AM, Jesper Louis Andersen wrote:

> On Wed, Jun 26, 2013 at 4:19 PM, Ivan Uemlianin <> wrote:
> http://jlouisramblings.blogspot.co.uk/2011/07/erlangs-parallelism-is-not-parallelism.html
> First, it is the kind of work where you have a small computational kernel which has to run as fast as possible. This is exactly the kind of problems where Erlang usually does not shine, due to the language being interpreted and not focused on fast floating point calculations.

Except for commands typed at the shell, Erlang is compiled, not interpreted.
And there is a native code generator; c(File, [native]) does the trick if
native code generation was enabled at build time.
And the native code generator exploits -spec declarations (and some type
inference) to avoid boxing floats some of the time.

So Erlang might well make good sense as a language for prototyping an
application, even a floating-point one, to the point where you can do
some benchmarking and find out where the time is really going.

> Erlang would be good as a higher-level coordinator in such systems, but the low-level code is probably better written in a compiled language with good FP performance: C, Common Lisp, Haskell, Ocaml, and so on.

My experience has been that Fortran is *still* the King if you want
serious floating-point performance, and modern Fortran is a serious
modular programming language.  GNU Fortran has _nearly_ caught up
with the 2003 standard, which saw some serious additions to the language.
Coarrays are part of the 2008 standard, and gfortran support for them is
still incomplete, which is a pity, because they look extremely useful
for this kind of problem.  I haven't personally used the Intel Fortran
compiler, but I've used the Intel C compiler, and Intel's Parallel
Studio _looks_ impressive.  I see the HPCWales systems have the Intel

What's often an issue in floating-point calculations is algorithm design,
and good facilities for managing abstractions may be more important than
raw floating-point speed.  Haskell is pretty good here, and there are
some interesting libraries, like the beginnings of support for Geometric
Algebra.  There's certainly an HMM library (version 0.04, so be warned).

> Second, you would need to get to Infiniband from within Erlang.


There's another idea which has often been applied in Haskell,
and that's writing a program in a high level language that _generates_
low level code.

More information about the erlang-questions mailing list