English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Thinking about ICFP'98 programming contest...
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 1998-07-27 (17:52)
From: Xavier Leroy <Xavier.Leroy@i...>
Subject: Re: Thinking about ICFP'98 programming contest...
> 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
> utilize.

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