caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jonathan T Bryant <jtbryant@valdosta.edu>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Regarding SMP computing
Date: Mon, 25 Sep 2006 21:41:31 -0400 (EDT)	[thread overview]
Message-ID: <6561332.1159234891447.JavaMail.jtbryant@valdosta.edu> (raw)




Yoann Padioleau wrote:


>Richard Jones <rich@annexia.org> writes:
>
>> On Mon, Sep 25, 2006 at 08:13:50AM -0400, Jacques Carette wrote:
>>> Over on Haskell-cafe, Simon Peyton-Jones says:
>>> "GHC 6.6 (release candidate available) supports parallel execution on 
>>> SMP machines.
>>> 
>>> Garbage collection is not parallelised yet, something we plan to fix
>>> this autumn."
>>> 
>>> A bit of competition is a good thing, isn't it?
>>
>> Can someone explain how/if this is better than using MPI for
>> parallelism?  The reason I ask is that we are starting to use MPI for
>> real on SMP machines to process our larger datasets.
>
>I guess that with a working shared-memory SMP support, you
>don't pay the communication cost you have with MPI. 
>

Again, if you are using MPI, look at the Event module.  It's a set of 
message passing concurrency primitives and operations.  Reasoning about 
message passing concurrency (for correctness and such) is typically 
much simpler than shared memory concurrency, and it fits very cleanly 
into the functional paradigm.  The only thing the Event module lacks 
(as compared to MPI) are a) collective channels/operations, b) 
inter-(heavyweight)-process comunnication, c) asynchronous 
communications.

Two of these (a and c) are almost trivial to write extensions while (b) 
is harder (but very doable).  Note that (b) is only needed because the 
OCaml GC won't allow you to use multiple processors, so to take emulate 
this on an SMP system, a small library has to be written to communicate 
over sockets (UNIX or INET) and a few heavyweight processes can be 
forked.

Fortunately, it is possible to wrap the Event module with these 
extensions so that it is backwards compatible, which is very 
convenient. :).

--Jonathan Bryant


             reply	other threads:[~2006-09-26  1:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-26  1:41 Jonathan T Bryant [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-09-25 12:13 Jacques Carette
2006-09-25 13:40 ` [Caml-list] " skaller
2006-09-25 19:41 ` Richard Jones
2006-09-25 19:57   ` Yoann Padioleau
2006-09-26 11:57   ` Damien Doligez
2006-09-26 14:37     ` Markus Mottl
2006-09-26 14:52       ` Christophe TROESTLER
2006-09-26 15:46         ` Markus Mottl
2006-09-26 15:01       ` Gerd Stolpmann
2006-09-26 18:56       ` Richard Jones
2006-09-27 12:14         ` Richard Jones
2006-09-27 16:05           ` Richard Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6561332.1159234891447.JavaMail.jtbryant@valdosta.edu \
    --to=jtbryant@valdosta.edu \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).