Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #3304

MPI-style message passing in pure Mathematica

From Oleksandr Rasputinov <oleksandr_rasputinov@hmamail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject MPI-style message passing in pure Mathematica
Date 2011-06-26 10:26 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <iu71gi$19g$1@smc.vnet.net> (permalink)

Show all headers | View raw


Dear group,

Some time ago I thought I would try implementing MPI-style message
passing between kernels using MathLink. In contrast to the Parallel`
package, which currently offers only the master/slave or map/reduce
paradigm with its quite limited expressivity, the message passing
approach can be helpful when constructing more complex parallel
algorithms. It turns out that, despite some suggestions in the
Parallel`
documentation that slave kernels are not capable of direct
communication with one another, the implementation is actually
fairly easy (though it does rely on undocumented behaviour of the
MathLink functions).

Having satisfied my curiosity about whether or not it is possible, I
have not been motivated to develop this beyond a proof-of-concept,
so it seemed like a good idea to comment on this here in case it is
of interest to others. To be useful, a receive queue would probably
need to be implemented and higher-level collective communication
functions written to wrap LinkSend and LinkReceive, although this
would not be very difficult to achieve.

Also, now that Mathematica 7 and 8 integrate the Parallel` package,
there would seem to be no remaining limitation on its using
undocumented functions, so possibly WRI may like to take this as
a suggestion for future improvements to Mathematica's parallel
computing capabilities.

A notebook containing the code (which, to be clear, I am releasing into
the public domain for anyone to do with as they wish) is available from
the following address:

https://rapidshare.com/files/1923999609/Message_passing_in_Mathematica.nb

Best,

O. R.

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

MPI-style message passing in pure Mathematica Oleksandr Rasputinov <oleksandr_rasputinov@hmamail.com> - 2011-06-26 10:26 +0000

csiph-web