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=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 3410BBC6C for ; Wed, 28 Nov 2007 20:53:02 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAN9VTUfU436znmdsb2JhbACPPgEBAQEHAggRGA X-IronPort-AV: E=Sophos;i="4.23,225,1194217200"; d="scan'208";a="5032066" Received: from moutng.kundenserver.de ([212.227.126.179]) by mail1-smtp-roc.national.inria.fr with ESMTP; 28 Nov 2007 20:53:00 +0100 Received: from [152.78.96.56] (babylon.cip.physik.uni-muenchen.de [141.84.136.30]) by mrelayeu.kundenserver.de (node=mrelayeu1) with ESMTP (Nemesis) id 0MKwpI-1IxSxw1z4m-0004R6; Wed, 28 Nov 2007 20:53:01 +0100 Message-ID: <474DC8DA.8070806@functionality.de> Date: Wed, 28 Nov 2007 20:00:26 +0000 From: Thomas Fischbacher User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20060607 Debian/1.7.12-1.2 X-Accept-Language: en MIME-Version: 1.0 To: Raj Cc: Xavier Leroy , caml-list@yquem.inria.fr Subject: Re: [Caml-list] Disabling the OCaml garbage collector References: <474C48C5.708@starynkevitch.net> <474DADF7.5020204@rice.edu> <474DB454.9060507@inria.fr> <474DC28D.1060605@rice.edu> In-Reply-To: <474DC28D.1060605@rice.edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX19FG1+0LPJ0JcNLGt4KumqGOaeEmQrcC/5o7Er Xf5zwWAFtalyOBtRksOcx9i8C11R3tVSB5xEWm87opjOXKUaLT i97kss2f9VQZzrGaLfqXQ== X-Spam: no; 0.00; ocaml:01 pointers:01 stubs:01 ocaml:01 algebra:01 xavier's:01 bigarray:01 bigarray:01 garbage:01 opaque:01 caml-list:01 functions:01 tar:01 interfaces:01 linear:02 Raj, > I would highly appreciate any pointers to existing code that does the > 'register_global_roots()' thing. Examples would definitely help me code > it correctly. I would suggest you download the nsim sources from: http://nmag.soton.ac.uk/nmag/current/download/nmag-0.1-core.tar.gz and study the nsim/mpi_petsc/petsc.ml and petsc_stubs.c files. (Actually, the code quality of these functions varies a bit. Most of the module is reasonably good style, but not everything.) Basically, this is an OCaml interface to the PETSc "parallel sparse linear algebra" library. (It also assimilated Xavier's old MPI interface for OCaml. Had to do that, sorry.) Of particular interest should be the function with_petsc_vector_as_bigarray, which will take an opaque petsc vector and a function that takes a double-float bigarray and calls that function from C in such a way that it can address the Petsc vector as if it were a bigarray. Also, you might be interested in the "sundials" module, which interfaces the CVODE time integrator from libsundials to OCaml. -- best regards, Thomas Fischbacher tf@functionality.de