Version française
Home     About     Download     Resources     Contact us    
Browse thread
We should all be forking
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Chris King <colanderman@g...>
Subject: Re: [Caml-list] We should all be forking
On 6/5/07, Jon Harrop <jon@ffconsultancy.com> wrote:
> Following on from our "why not fork" discussion, here is my most elegant
> concurrent ray tracer written in vanilla OCaml.
>
> This program simply runs four processes (forking off three) in parallel to
> improve performance when 2-4 CPUs are available (increase "d" if you have >4
> CPUs).

I'm curious, have you considered trying camlp3l [1] to parallelize
your raytracer?  It uses high-level constructs ("skeletons") to
describe parallelizable functions, e.g. for a raytracer you can
essentially just say "farm out each row to a different computing
node".  It uses marshalling over TCP/IP sockets, so can be distributed
if you like.  The forking you just do beforehand in a shell script
(though it gives an example where you do it in O'Caml too).

[1] http://camlp3l.inria.fr/