Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Eray Ozkural <examachine@gmail.com>
To: Caml List <caml-list@inria.fr>
Subject: [Caml-list] Using threads for overlapping communication/computation
Date: Thu, 27 Jan 2011 21:10:42 +0200	[thread overview]
Message-ID: <AANLkTimWTV5UKjfv-m3B3UQoTyEd0LwqZXv5rzPy+67F@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1339 bytes --]

Hi there,

Has anybody used OcamlMPI in conjunction with multi-threading to overlap
computation and communication?

During the writing of a parallel information-retrieval code, I have
implemented such a feature spawning a new thread for the communications
routines that correspond to a block of computation. While that proceeds, I
start processing the next block (and I yield the main thread so that some
context switching occurs). I think this would not meet any problems had I
used a single blocking call in the spawned threads. However, this is not the
case. My program performs a quite non-trivial kind of collective
communication: a multi-node accumulation with a complex reduction operator,
and another complex collective communication with output-partitioning.
Naturally, I have to invoke several MPI calls (at least 2*logp presently).
And no matter where I yield, my code slows down compared to the
single-threaded version. I am suspecting this is partially due to the
single-physical-thread feature of the ocaml runtime (and partially due to
stress on the local memory). Do you have any recommendations on handling
such scenarios? It occurred to me that I might be missing a known solution.

Best Regards,

-- 
Eray Ozkural, PhD candidate.  Comp. Sci. Dept., Bilkent University, Ankara
http://groups.yahoo.com/group/ai-philosophy

[-- Attachment #2: Type: text/html, Size: 1508 bytes --]

                 reply	other threads:[~2011-01-27 19:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=AANLkTimWTV5UKjfv-m3B3UQoTyEd0LwqZXv5rzPy+67F@mail.gmail.com \
    --to=examachine@gmail.com \
    --cc=caml-list@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