Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Francois BERENGER <berenger@bioreg.kyushu-u.ac.jp>
To: caml-list@inria.fr
Subject: [Caml-list] parany: a minimalistic library to parallelize any kind of computation
Date: Tue, 4 Jul 2017 17:55:47 +0900	[thread overview]
Message-ID: <978f88e8-6e9c-9f54-5988-0933a4cac833@bioreg.kyushu-u.ac.jp> (raw)
In-Reply-To: <20170703140437.8FFD7121499@mcclellan.cs.miami.edu>

Dear caml riders,

I am pleased to announce parany, a kind of minimalistic and more generic 
version of parmap.

Yes, a minimalistic version of parmap is possible! :D

Parany can be found here:

https://github.com/UnixJunkie/parany

The super simple interface is:
---
(* the demux function must throw End_of_input once it's done *)
exception End_of_input

val run: nprocs:int ->
          demux:(unit -> 'a) ->
          work:('a -> 'b) ->
          mux:('b -> unit) -> unit
---

This is a beta release, so please don't expect excellent performance and 
rock stability. Also, maybe it can crash in some cases (tell me).

The difference with parmap is that parany is supposed to be able
to work with very large files (that you cannot load in memory at once)
or infinite streams of things to process.

Managing such cases is doable with parmap but requires some programming
and is not optimal in terms of parallelization performance (you have to 
stop all work when loading in memory a part of your file and
fork all your workers again after that).

Parany relies on the shared data structure Netmcore_queue from
Gerd Stolpmann's excellent ocamlnet library to take care of all the magic.

Contributions are welcome to improve performance and stability, while 
not degrading code quality.

Also, since this is a minimalistic library, I am not sure
new features will be accepted. ;)

If there is some interest, I can put it into opam, let me know.

Regards,
F.


  reply	other threads:[~2017-07-04  8:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-03 14:04 [Caml-list] GCAI 2017 in Miami - Deadline extension Geoff Sutcliffe
2017-07-04  8:55 ` Francois BERENGER [this message]
2017-07-10  8:00   ` [Caml-list] [ANN] first release of cpm: the Classification Performance Metrics library Francois BERENGER
2017-07-27  1:07   ` [Caml-list] new release of parany (1.0.2): a minimalistic OCaml library to parallelize any kind of computation Francois BERENGER

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=978f88e8-6e9c-9f54-5988-0933a4cac833@bioreg.kyushu-u.ac.jp \
    --to=berenger@bioreg.kyushu-u.ac.jp \
    --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