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.3 required=5.0 tests=AWL 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 79523BC54 for ; Thu, 24 Sep 2009 01:09:57 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsYCAONHukrUnwcki2dsb2JhbACCIJhfAQEBCA0KBxEGu2GEGwWBWA X-IronPort-AV: E=Sophos;i="4.44,440,1249250400"; d="scan'208";a="36699224" Received: from relay.ptn-ipout02.plus.net ([212.159.7.36]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 24 Sep 2009 01:09:35 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqgFAPJGukrUnw6R/2dsb2JhbACCINUPhBsFgVg Received: from ptb-relay01.plus.net ([212.159.14.145]) by relay.ptn-ipout02.plus.net with ESMTP; 24 Sep 2009 00:09:34 +0100 Received: from [87.114.87.187] (helo=leper.local) by ptb-relay01.plus.net with esmtp (Exim) id 1Mqaxq-00026M-Ia for caml-list@yquem.inria.fr; Thu, 24 Sep 2009 00:09:34 +0100 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] OC4MC : OCaml for Multicore architectures Date: Thu, 24 Sep 2009 01:21:02 +0100 User-Agent: KMail/1.9.9 References: <87fxaex78q.fsf@frosties.localdomain> In-Reply-To: <87fxaex78q.fsf@frosties.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200909240121.02123.jon@ffconsultancy.com> X-Plusnet-Relay: 3d579a48fdca5e50ef66815a2c733310 X-Spam: no; 0.00; ocaml:01 patched:01 ocaml:01 ocamlopt:01 native-code:01 compiler:01 ocaml-:01 lib:01 ocamlopt:01 -thread:01 cmxa:01 cmxa:01 utime:01 2009:98 26,:98 On Wednesday 23 September 2009 11:53:09 Goswin von Brederlow wrote: > Has anyone tested this yet? Any success stories? Well, I've used the build.sh script to build a patched OCaml 3.10.2 that identifies itself as: $ ocamlopt -v The Objective Caml native-code compiler, version 3.10.2+patch-ocaml4multicore-20090823 Standard library directory: /home/jdh30/src/ocaml/parallel/oc4mc-20090823/ocaml-3.10.2/../out/lib/ocaml and I've built their tests: $ cd tests $ make matmul.nc ocamlopt -o "matmul.nc" -thread unix.cmxa threads.cmxa graphics.cmxa "matmul.ml" File "matmul.ml", line 25, characters 8-13: Warning Y: unused variable count. File "matmul.ml", line 26, characters 8-16: Warning Y: unused variable last_col. and run them: $ time ./matmul.nc 1000 8 Temp de calcul: utime 38.930433, stime 0.012000, rtime 38.943138 Fatal error: exception Invalid_argument("index out of bounds") real 0m38.974s user 0m38.942s sys 0m0.028s Note the exception that (I think) should have been caught and handled silently. But I cannot get anything to run in parallel. None of the tests use more than one core and my own busy-wait-loops-on-two-threads test also runs only on one core. Any idea what I'm doing wrong? Is there a flag to enable it or something? One possible cause: I'm running in a 64-bit chroot. -- Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/?e