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=2.8 required=5.0 tests=DNS_FROM_RFC_POST,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 1FCD5BBC4 for ; Fri, 20 Feb 2009 18:01:49 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkMCAOFwnknRVcbik2dsb2JhbACNC4cNPwEBAQEJCQoJEQOwITGGd4hFAQMBA4QMBoRJ X-IronPort-AV: E=Sophos;i="4.38,242,1233529200"; d="scan'208";a="24446875" Received: from rv-out-0506.google.com ([209.85.198.226]) by mail1-smtp-roc.national.inria.fr with ESMTP; 20 Feb 2009 18:01:48 +0100 Received: by rv-out-0506.google.com with SMTP id l9so1009999rvb.3 for ; Fri, 20 Feb 2009 09:01:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=uFh3x5T0tBEu/zyqMDJTndk0BnacfPtB2k8xEpHoWhM=; b=BaTfkhL3JXhwKOq6TN0ioy6SrczLesvmw37S+3jsxPtmaOb/iRQ0QBnx0m4Sj3az+d vtp37ICUN/B/sziFxocWdnILJrIAr9mRY8QWtWEeqqV6pC5qwtO8xCigt6vlMWoY9g5E HG9RPNFX19F4FhfBYNcQHlye4TPRsDjd/1RKs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=vHJVzb4rUzteIaVHnnDrIVGfQUdS3+U2AI+Ja9aJYWaFYG3A4MyyD6aJ1TV8ygnN/S AbOGJypj2VtqTZCsd2R/TedsRH/056Ep10RH1gsRFLD5tnm73c2hBsQE5x7H6+TEiRh7 yDnm/64bsVBONaqV1xVPm+6NdUgJR0CQFDQxU= MIME-Version: 1.0 Sender: wmfarr@gmail.com Received: by 10.141.196.8 with SMTP id y8mr512978rvp.101.1235149306932; Fri, 20 Feb 2009 09:01:46 -0800 (PST) In-Reply-To: <167d0c900902200840n3b236bb7p411e054c49381486@mail.gmail.com> References: <167d0c900902200840n3b236bb7p411e054c49381486@mail.gmail.com> Date: Fri, 20 Feb 2009 12:01:46 -0500 X-Google-Sender-Auth: 0f440d810cf42645 Message-ID: Subject: Re: [Caml-list] true parallelism / threads From: "Will M. Farr" To: Atmam Ta Cc: caml-list@yquem.inria.fr Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; parallelism:01 ocaml:01 ocamlmpi:01 contrib:01 ocaml:01 arrays:01 arrays:01 cheers:01 beginner's:01 bug:01 2009:98 threads:01 beginners:01 caml-list:01 caml-list:01 Atmam, I've had some luck using OCaml with MPI (using the OCamlMPI library at http://caml.inria.fr/cgi-bin/hump.en.cgi?contrib=401 ). That may not satisfy your needs as far as multi-core goes, but perhaps it will. I can't speak to the speed of the interface (my operations were compute-bound on the individual processors, not communication bound, so any OCaml overhead on the MPI communication was lost in the noise), but it was definitely easy to use. At the extreme easy-to-use end, you can simply send arbitrary OCaml values over the MPI channels; for more performance, you can use the functions specific to common types (float arrays, int arrays, etc) to speed up the operations. As far as single-core OCaml speed goes, I find that it is always within a factor of 2 of C for straight-line loops (i.e. matrix-vector multiply, etc), and usually *much* faster whenever more complicated data structures are involved (maps, binary trees, etc), unless you really sweat blood with the C implementation. Hope this helps! Will 2009/2/20 Atmam Ta : > Hi, > > I am trying to evaluate ocaml for a project involving large scale numerical > calculations. We would need parallel processing, i.e. a library that > distributes jobs accross multiple processors within a machine and accross > multiple PCs. > Speed and easy programability are important. I have tried to search this > issue first, but the postings I found were usually negative and 4-5 years > old. On the other hand, I see a number of libraries in the Hump that by now > might be taking care of these things. > > My question is: is ocaml good for parallel processing / hreaded computation, > are there (mature) libraries or tools that let developers make use of > multicore and multimachine environments? > > cheers, > Atmam > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > >