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.7 required=5.0 tests=AWL,SPF_FAIL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr 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 9FF3BBB84 for ; Mon, 14 Jul 2008 19:16:56 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAHQme0hQRFuw/2dsb2JhbACrCg X-IronPort-AV: E=Sophos;i="4.30,360,1212357600"; d="scan'208";a="13103398" Received: from furbychan.cocan.org ([80.68.91.176]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES256-SHA; 14 Jul 2008 19:16:56 +0200 Received: from rich by furbychan.cocan.org with local (Exim 4.63) (envelope-from ) id 1KIRfT-0006Im-Jh; Mon, 14 Jul 2008 18:16:55 +0100 Date: Mon, 14 Jul 2008 18:16:55 +0100 To: Jon Harrop Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] thousands of CPU cores Message-ID: <20080714171655.GA23579@annexia.org> References: <200807101235.42602.jon@ffconsultancy.com> <200807141308.23474.jon@ffconsultancy.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200807141308.23474.jon@ffconsultancy.com> User-Agent: Mutt/1.5.13 (2006-08-11) From: Richard Jones X-Spam: no; 0.00; 0100,:01 openmp:01 ocaml:01 ocaml:01 openmp:01 drepper:01 garbage:01 wrote:01 preprocessor:01 caml-list:01 unsafe:01 fortran:02 ulrich:03 library:03 concurrent:04 On Mon, Jul 14, 2008 at 01:08:23PM +0100, Jon Harrop wrote: > I believe you are correct. Moreover, I suspect that adding support for OpenMP > to OCaml would be difficult because the current OCaml implementation is > thread unsafe. OpenMP isn't your typical library. It's a set of wierd preprocessor directives which are added directly into C/C++ code (and I believe FORTRAN too). Things like: #pragma omp parallel for for (i = 0; i < 100; i++) { a[i] = k * b[i]; } The, erm, feature here is that the code still gives the same result (just more slowly) if the #pragmas are simply ignored. I recently saw Ulrich Drepper giving a talk about OpenMP and it was interesting in a 'what are the C programmers smoking nowadays' kind of way. The barriers to porting OpenMP to OCaml go far beyond lack or otherwise of concurrent garbage collection. Rich. -- Richard Jones Red Hat