From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 4B250BC69 for ; Wed, 30 May 2007 10:40:57 +0200 (CEST) Received: from yquem.inria.fr (yquem.inria.fr [128.93.8.37]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l4U8eubV001831; Wed, 30 May 2007 10:40:56 +0200 Received: by yquem.inria.fr (Postfix, from userid 18041) id AF1A5BC69; Wed, 30 May 2007 10:40:56 +0200 (CEST) Date: Wed, 30 May 2007 10:40:56 +0200 To: Jon Harrop Cc: caml-list@inria.fr Subject: Re: [Caml-list] Faking concurrency using Unix forks and pipes Message-ID: <20070530084056.GB6507@yquem.inria.fr> References: <200705300442.59906.jon@ffconsultancy.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200705300442.59906.jon@ffconsultancy.com> User-Agent: Mutt/1.5.9i From: luc.maranget@inria.fr (Luc Maranget) X-Miltered: at discorde with ID 465D3898.003 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; forks:01 maranget:01 maranget:01 ocaml:01 forks:01 marshalling:01 ocaml:01 jocaml:01 jocaml:01 computes:01 frog:98 luc:01 luc:01 unix:01 unix:01 > > Has anyone implemented a parallel map function in OCaml using Unix forks, > pipes and maybe marshalling? > > This seems like an easy way to get concurrency in OCaml... > > -- > Dr Jon D Harrop, Flying Frog Consultancy Ltd. > OCaml for Scientists > http://www.ffconsultancy.com/products/ocaml_for_scientists/?e This is what we did for a a few examples of using JoCaml, the soon-to-be-released extension of OCaml for concurrent programming. Fork/Exec is an easy way to get simultaneous execution. JoCaml is not released yet, (I am writting the doc and web site at the moment). The much incomplete web site is at One example of fork under jocaml control The example may not meet all your concerns (speed I guess), but you can replace the shell in the example by somme C or Ocaml program that computes something and refine the control to collect results. Hope it helps. -- Luc Maranget