Date: Sun, 26 Jul 1998 18:19:00 +0200
From: Xavier Leroy <Xavier.Leroy@inria.fr>
To: Norman Davis <email@example.com>, firstname.lastname@example.org
Subject: Re: Thinking about ICFP'98 programming contest...
In-Reply-To: <BMSMTP9009611062a0384552@dpcmail.itg.ti.com>; from Norman Davis on Mon, Jul 20, 1998 at 12:22:10PM -0700
> I've been thinking about the ICFP'98 programming contest which will be judged
> on a "four-processor 150MHz Pentium-Pro box with 128 mbytes of memory running
> Linux SMP". I'm wondering if anyone can tell me:
> 1) Do I need to do anything in particular or organize my program in
> a certain way for me to take advantage of the multiple processors?
> Do I need to seperate my program into multiple threads or processes?
> Are there any special calls I must invoke or libraries I must
The threads library in OCaml cannot exploit more than one processor
(due to GC and runtime system issues). So, you need to split your
program in several processes communicating via e.g. pipes or sockets.
There are several functionalities that makes this realtively easy: one
is output_value/input_value, which let you transfer almost any data
structure between two Caml processes in one call. You might also look
at the Caml-MPI and Caml-PVM interfaces that have been announced on
this mailing list a while back. These will provide a higher-level
communication layer than pipes and sockets.
> 2) Beyond that, what do I need to do to take advantage of parallelism.
I don't know what to answer except the obvious "parallelize your program"...
Good luck for the contest,
- Xavier Leroy
This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:15 MET