caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Thomas Fischbacher <tf@functionality.de>
To: Raj <rajb@rice.edu>
Cc: Xavier Leroy <Xavier.Leroy@inria.fr>, caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Disabling the OCaml garbage collector
Date: Wed, 28 Nov 2007 20:00:26 +0000	[thread overview]
Message-ID: <474DC8DA.8070806@functionality.de> (raw)
In-Reply-To: <474DC28D.1060605@rice.edu>


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


  reply	other threads:[~2007-11-28 19:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-27 16:28 Raj Bandyopadhyay
2007-11-27 16:41 ` [Caml-list] " Basile STARYNKEVITCH
2007-11-28 18:05   ` Raj
2007-11-28 18:15     ` Alain Frisch
2007-11-28 18:31       ` Thomas Fischbacher
2007-11-28 19:30         ` Raj
2007-11-28 18:25     ` Thomas Fischbacher
2007-11-28 18:32     ` Xavier Leroy
2007-11-28 19:33       ` Raj
2007-11-28 20:00         ` Thomas Fischbacher [this message]
2007-12-04 20:14           ` Raj Bandyopadhyay
2007-12-05  4:07             ` Jon Harrop
2007-11-29  8:54     ` Frédéric van der Plancke
2007-11-27 17:05 ` [Caml-list] Python and Caml (was: Disabling the OCaml garbage collector) Thomas Fischbacher
2011-08-04 13:10   ` [Caml-list] Python and Caml Stéphane Glondu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=474DC8DA.8070806@functionality.de \
    --to=tf@functionality.de \
    --cc=Xavier.Leroy@inria.fr \
    --cc=caml-list@yquem.inria.fr \
    --cc=rajb@rice.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).