Version française
Home     About     Download     Resources     Contact us    
Browse thread
Ocaml for Scientific computing
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Hezekiah M. Carty <hcarty@a...>
Subject: Re: [Caml-list] Ocaml for Scientific computing
On Tue, 25 Sep 2007, Alex Mikhalev wrote:

> Dear all,
> I am wondering is anyone using Ocaml for scientific computing? I didn't
> mean parsing, but for number crunching applications, like signal/image
> analysis. Is it suitable for this kind of tasks in general? I would like
> to hear from someone practically using it, not just theoretical
> possibility.
> 
> I have read "Ocaml for Scientists" and although it gave me some very
> good ideas, I didn't manage to repeat a number of examples with modules
> from this book. I had a problem compiling or using scientific modules
> (lacaml, fftw, some others) on linux and macosx and since some of these
> modules look like someones graduate project, I would like to hear from
> people practically using ocaml for mathematical simulations or analysis.
> Preferable with OS, modules, problems encountered. 

I am using OCaml for atmospheric/meteorological research.  I started
using it about a year ago, and feel that it has been the right tool
for the job.  My work so far has involved manipulating and analyzing
satellite data sets.  OCaml has been quite fast computationally, and
the strict type checking and type inference have helped to eliminate
several sources of error.

I've used the OCaml GSL bindings and toyed around with some of the
plotting modules available (gnuplot, mlgrace, OVT, plplot,
camlimages, the included Graphics module).  The code has been used
and developed under Ubuntu, Debian and CentOS.  I currently use Godi
for my OCaml installation because it makes it easier to keep things
in my home directory if I don't have root access to a system.

The biggest problem I've faced with OCaml has been missing
libraries.  The data I'm working with is (almost) all in HDF format,
so I had to write my own library bindings for OCaml.  The other is
a library for plotting data - but that is largely due to a lack of
time spent on my part.  That said, I've found writing bindings to C
libraries in OCaml much nicer than other languages I've tried.

An example of an older number crunching/scientific tool using OCaml
is Psilab - http://psilab.sourceforge.net/
However, it does not seem to be maintained by its author any more.
I have updated the code slightly so that it builds with newer GCC
versions if you have any interest in that.

Good luck with your work!  I highly recommend OCaml, both for
selfish reasons - to bring more number-crunching oriented users in
to the community - and because it is an excellent tool for the job.

Hez