caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Will M. Farr" <farr@mit.edu>
To: Atmam Ta <atmamta2@gmail.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] true parallelism / threads
Date: Fri, 20 Feb 2009 12:01:46 -0500	[thread overview]
Message-ID: <ef6818c20902200901r3dcbd134xad876600e71084bb@mail.gmail.com> (raw)
In-Reply-To: <167d0c900902200840n3b236bb7p411e054c49381486@mail.gmail.com>

Atmam,

I've had some luck using OCaml with MPI (using the OCamlMPI library at
http://caml.inria.fr/cgi-bin/hump.en.cgi?contrib=401 ).  That may not
satisfy your needs as far as multi-core goes, but perhaps it will.  I
can't speak to the speed of the interface (my operations were
compute-bound on the individual processors, not communication bound,
so any OCaml overhead on the MPI communication was lost in the noise),
but it was definitely easy to use.  At the extreme easy-to-use end,
you can simply send arbitrary OCaml values over the MPI channels; for
more performance, you can use the functions specific to common types
(float arrays, int arrays, etc) to speed up the operations.

As far as single-core OCaml speed goes, I find that it is always
within a factor of 2 of C for straight-line loops (i.e. matrix-vector
multiply, etc), and usually *much* faster whenever more complicated
data structures are involved (maps, binary trees, etc), unless you
really sweat blood with the C implementation.

Hope this helps!

Will

2009/2/20 Atmam Ta <atmamta2@gmail.com>:
> Hi,
>
> I am trying to evaluate ocaml for a project involving large scale numerical
> calculations. We would need parallel processing, i.e. a library that
> distributes jobs accross multiple processors within a machine and accross
> multiple PCs.
> Speed and easy programability are important. I have tried to search this
> issue first, but the postings I found were usually negative and 4-5 years
> old. On the other hand, I see a number of libraries in the Hump that by now
> might be taking care of these things.
>
> My question is: is ocaml good for parallel processing / hreaded computation,
> are there (mature) libraries or tools that let developers make use of
> multicore and multimachine environments?
>
> cheers,
> Atmam
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
>


  parent reply	other threads:[~2009-02-20 17:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-20 16:40 Atmam Ta
2009-02-20 16:57 ` [Caml-list] " Yoann Padioleau
2009-02-20 16:59 ` Hezekiah M. Carty
2009-02-20 17:01 ` Will M. Farr [this message]
2009-02-20 17:35 ` Markus Mottl
2009-02-20 19:03 ` Gerd Stolpmann

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=ef6818c20902200901r3dcbd134xad876600e71084bb@mail.gmail.com \
    --to=farr@mit.edu \
    --cc=atmamta2@gmail.com \
    --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).