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=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 6EEBDBBCA for ; Tue, 13 May 2008 02:41:39 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmwAAD6AKEjU4363mmdsb2JhbACBU5A+AQEBAQEIBQgHEQOZdQE X-IronPort-AV: E=Sophos;i="4.27,476,1204498800"; d="scan'208";a="10641498" Received: from concorde.inria.fr ([192.93.2.39]) by mail2-smtp-roc.national.inria.fr with ESMTP; 13 May 2008 02:41:39 +0200 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m4D0fcZe008718 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Tue, 13 May 2008 02:41:39 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmwAAD6AKEjU4363mmdsb2JhbACBU5A+AQEBAQEIBQgHEQOZdQE X-IronPort-AV: E=Sophos;i="4.27,476,1204498800"; d="scan'208";a="10641497" Received: from moutng.kundenserver.de ([212.227.126.183]) by mail2-smtp-roc.national.inria.fr with ESMTP; 13 May 2008 02:41:38 +0200 Received: from gate.lan.gerd-stolpmann.de (dslb-088-068-204-195.pools.arcor-ip.net [88.68.204.195]) by mrelayeu.kundenserver.de (node=mrelayeu6) with ESMTP (Nemesis) id 0ML29c-1Jvia628iH-0004sR; Tue, 13 May 2008 02:41:31 +0200 Received: from [192.168.0.32] (fw.lan.gerd-stolpmann.de [192.168.1.1]) by gate.lan.gerd-stolpmann.de (Postfix) with ESMTP id 2DF3FC144; Tue, 13 May 2008 02:41:26 +0200 (CEST) Subject: Re: [Caml-list] Re: Why OCaml rocks From: Gerd Stolpmann To: Richard Jones Cc: caml-list@inria.fr In-Reply-To: <20080512132223.GA24858@annexia.org> References: <200805090139.54870.jon@ffconsultancy.com> <200805091910.41381.jon@ffconsultancy.com> <1210371949.6399.62.camel@Blefuscu> <200805102059.54856.jon@ffconsultancy.com> <20080512132223.GA24858@annexia.org> Content-Type: text/plain Date: Tue, 13 May 2008 02:42:42 +0200 Message-Id: <1210639362.478.6.camel@flake.lan.gerd-stolpmann.de> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX18OIfSpp+Uqxh8/PRd+IIktfycgBsla2EfYsqM 1kcdaa1vrDmEC40QzVEeVKE+/WOK9Ur5g0XCodUS/TmA7E0XPc uYQdlo12An62Wxxllm9e9oO4vMfxAOa X-Miltered: at concorde with ID 4828E3C3.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 gerd:01 stolpmann:01 ocaml:01 unoptimized:01 runtime:01 speedup:01 gerd:01 lapack:01 model:01 stolpmann:01 viktoriastr:01 64293:01 darmstadt:01 6151:01 Am Montag, den 12.05.2008, 14:22 +0100 schrieb Richard Jones: > This is just barely faster than Jon's OCaml version using message > passing (12% faster on my test machine[0]). Which just seems to show > that the overhead of message passing _isn't_ the problem here[1]. I've just written my own distributed version. You find my comments and timings here: http://blog.camlcity.org/blog/parallelmm.html The code is here: https://godirepo.camlcity.org/svn/lib-ocamlnet2/trunk/code/examples/rpc/matrixmult/ In this (very unoptimized) multiplier message passing accounts for ~25% of the runtime. Even for 2 cores there is already a speedup. 10 cores (over a network) are about 4 times faster than a single core without message passing. Gerd > Perhaps it's the bounds checking in the assignment back to the matrix? > > Anyhow, in real life situations we'd all be using a super-optimized > hand-coded-in-assembly matrix multiplication library (LAPACK?), so > this is all very academic. > > Rich. > > [0] Quad core Intel hardware: > model name : Intel(R) Core(TM)2 Quad CPU Q9450 @ 2.66GHz > > [1] Creation of the result matrix and copying it to shared memory is > almost instantaneous in my tests. > -- ------------------------------------------------------------ Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany gerd@gerd-stolpmann.de http://www.gerd-stolpmann.de Phone: +49-6151-153855 Fax: +49-6151-997714 ------------------------------------------------------------