From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA17044 for caml-redistribution; Mon, 27 Jul 1998 19:52:29 +0200 (MET DST) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA02364 for ; Sun, 26 Jul 1998 18:19:04 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.8.7/8.8.7) with ESMTP id SAA27754; Sun, 26 Jul 1998 18:19:01 +0200 (MET DST) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA02432; Sun, 26 Jul 1998 18:19:01 +0200 (MET DST) Message-ID: <19980726181900.08467@pauillac.inria.fr> Date: Sun, 26 Jul 1998 18:19:00 +0200 From: Xavier Leroy To: Norman Davis , caml-list@inria.fr Subject: Re: Thinking about ICFP'98 programming contest... References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89.1 In-Reply-To: ; from Norman Davis on Mon, Jul 20, 1998 at 12:22:10PM -0700 Sender: weis > 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