caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* OCaml and PETSc
@ 2009-01-22 19:09 Dr. Thomas Fischbacher
  2009-01-22 23:45 ` [Caml-list] " Alexy Khrabrov
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Dr. Thomas Fischbacher @ 2009-01-22 19:09 UTC (permalink / raw)
  To: Caml-list List


We, that is, the authors of the ocaml-based nsim continuum field
theory simulator and the nmag micromagnetic application
(http://nmag.soton.ac.uk/), keep on receiving quite some feedback
on two specific modules contained in that project. One is an
extended (and mm-bugfixed) version of Art Yerkes' "Pycaml" module,
the other one is our (rudimentary yet useful) interface to the
PETSc library for MPI-parallelizable sparse/dense matrix linear
algebra (plus linear solvers, etc.).

So, we are considering forking that off in order to distribute it
separately. But as this would involve some amount of work that keeps
us from doing other important things, we would like to hear feedback
from people out there on who might have specific applications or
plans for code that could benefit from this. So, who would like to
use PETSc from within OCaml, and what are your applications?

-- 
best regards,
Dr. Thomas Fischbacher
t.fischbacher@soton.ac.uk




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] OCaml and PETSc
  2009-01-22 19:09 OCaml and PETSc Dr. Thomas Fischbacher
@ 2009-01-22 23:45 ` Alexy Khrabrov
  2009-01-23 13:20 ` Richard Jones
  2009-01-26  9:17 ` RABIH.ELCHAAR
  2 siblings, 0 replies; 6+ messages in thread
From: Alexy Khrabrov @ 2009-01-22 23:45 UTC (permalink / raw)
  To: Dr.Thomas Fischbacher; +Cc: OCaml

On Jan 22, 2009, at 2:09 PM, Dr. Thomas Fischbacher wrote:

> So, we are considering forking that off in order to distribute it
> separately. But as this would involve some amount of work that keeps
> us from doing other important things, we would like to hear feedback
> from people out there on who might have specific applications or
> plans for code that could benefit from this. So, who would like to
> use PETSc from within OCaml, and what are your applications?

I work with various graphical models for AI, which often require  
optimization.  For example, the C++ version of Conditional Random  
Fields (CRFs) enhanced with Virtual Evidence Boosting (VEB) use PETSc  
optimization (TAO).  Having PETSc callable from OCaml would definitely  
bring these methods closer to natural OCaml workflow.

Cheers,
Alexy


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] OCaml and PETSc
  2009-01-22 19:09 OCaml and PETSc Dr. Thomas Fischbacher
  2009-01-22 23:45 ` [Caml-list] " Alexy Khrabrov
@ 2009-01-23 13:20 ` Richard Jones
  2009-01-23 14:09   ` Dr. Thomas Fischbacher
  2009-01-26  9:17 ` RABIH.ELCHAAR
  2 siblings, 1 reply; 6+ messages in thread
From: Richard Jones @ 2009-01-23 13:20 UTC (permalink / raw)
  To: Dr. Thomas Fischbacher; +Cc: Caml-list List

[-- Attachment #1: Type: text/plain, Size: 538 bytes --]

On Thu, Jan 22, 2009 at 07:09:56PM +0000, Dr. Thomas Fischbacher wrote:
> extended (and mm-bugfixed) version of Art Yerkes' "Pycaml" module,
> the other one is our (rudimentary yet useful) interface to the
> PETSc library for MPI-parallelizable sparse/dense matrix linear
> algebra (plus linear solvers, etc.).

Is there no maintained upstream source for Pycaml?  I noticed the
other day that Coccinelle is also shipping Pycaml, and their version
doesn't work with Python 2.6 (potential patch attached).

Rich.

-- 
Richard Jones
Red Hat

[-- Attachment #2: coccinelle-0.1.4-python26.patch --]
[-- Type: text/x-diff, Size: 920 bytes --]

diff -ur coccinelle-0.1.4.orig/pycaml/pycaml_ml.c coccinelle-0.1.4/pycaml/pycaml_ml.c
--- coccinelle-0.1.4.orig/pycaml/pycaml_ml.c	2008-03-29 20:25:26.000000000 +0000
+++ coccinelle-0.1.4/pycaml/pycaml_ml.c	2009-01-21 21:58:21.000000000 +0000
@@ -173,7 +173,7 @@
     int fd;
     int x;
     int ret_int;
-    char *rvs;
+    const char *rvs;
     int fmt = Int_val(Field(format,1));
     PyObject *ob1,*ob2,*ob3;
     void *func = getcustom(Field(format,0));
@@ -1184,7 +1184,12 @@
 { (void *)PyImport_AddModule, 28, "PyImport_AddModule" },
 { (void *)PyImport_ImportModule, 28, "PyImport_ImportModule" },
 /* 51 */
+#ifndef PyImport_ImportModuleEx
+    /* In Python 2.6, this because a #define so we cannot take
+     * the address of the function.  - RWMJ.
+     */
 { (void *)PyImport_ImportModuleEx, 51, "PyImport_ImportModuleEx" },
+#endif
 /* 28 */
 { (void *)PyImport_Import, 28, "PyImport_Import" },
 /* 14 */

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] OCaml and PETSc
  2009-01-23 13:20 ` Richard Jones
@ 2009-01-23 14:09   ` Dr. Thomas Fischbacher
  2009-01-23 14:42     ` Stefano Zacchiroli
  0 siblings, 1 reply; 6+ messages in thread
From: Dr. Thomas Fischbacher @ 2009-01-23 14:09 UTC (permalink / raw)
  To: Richard Jones; +Cc: Caml-list List


Richard Jones wrote:

>>extended (and mm-bugfixed) version of Art Yerkes' "Pycaml" module,
>>the other one is our (rudimentary yet useful) interface to the
>>PETSc library for MPI-parallelizable sparse/dense matrix linear
>>algebra (plus linear solvers, etc.).
> 
> Is there no maintained upstream source for Pycaml?  I noticed the
> other day that Coccinelle is also shipping Pycaml, and their version
> doesn't work with Python 2.6 (potential patch attached).

We repeatedly tried to contact the author (Art), but did not succeed.
So, in the end, we just adopted and extended it.

-- 
Thomas



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] OCaml and PETSc
  2009-01-23 14:09   ` Dr. Thomas Fischbacher
@ 2009-01-23 14:42     ` Stefano Zacchiroli
  0 siblings, 0 replies; 6+ messages in thread
From: Stefano Zacchiroli @ 2009-01-23 14:42 UTC (permalink / raw)
  To: Caml-list List

On Fri, Jan 23, 2009 at 02:09:23PM +0000, Dr. Thomas Fischbacher wrote:
>> Is there no maintained upstream source for Pycaml?  I noticed the
>> other day that Coccinelle is also shipping Pycaml, and their version
>> doesn't work with Python 2.6 (potential patch attached).
>
> We repeatedly tried to contact the author (Art), but did not succeed.
> So, in the end, we just adopted and extended it.

Thanks for that!

Still, instead of embedding your extensions within coccinelle, what
about maintaining it (or at least realising it once) as the separate
project it deserves to be?

I've kind of a deja-vu with this, with someone else in the past taking
care for a little while of pycaml, but never reaching the outcome of
making a new release taking over its maintenance.

Would you be so kind of going forward with that?

Cheers.

-- 
Stefano Zacchiroli -o- PhD in Computer Science \ PostDoc @ Univ. Paris 7
zack@{upsilon.cc,pps.jussieu.fr,debian.org} -<>- http://upsilon.cc/zack/
Dietro un grande uomo c'è ..|  .  |. Et ne m'en veux pas si je te tutoie
sempre uno zaino ...........| ..: |.... Je dis tu à tous ceux que j'aime


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [Caml-list] OCaml and PETSc
  2009-01-22 19:09 OCaml and PETSc Dr. Thomas Fischbacher
  2009-01-22 23:45 ` [Caml-list] " Alexy Khrabrov
  2009-01-23 13:20 ` Richard Jones
@ 2009-01-26  9:17 ` RABIH.ELCHAAR
  2 siblings, 0 replies; 6+ messages in thread
From: RABIH.ELCHAAR @ 2009-01-26  9:17 UTC (permalink / raw)
  To: t.fischbacher; +Cc: caml-list

We use ocaml based libraries for the pricing of some financial contracts. Some are simulation based and we use the MPI API to parallelize the simulation on our computation grid.

For the PDE part, our solvers and matrices are hand written, and aren't parallelizable. Being able to use petsc from OCAML would enable us to keep the pricing chain intact, have a richer set of solvers, matrices, and without much effort enable the use of the computation grid for our PDE pricing. We think that this will speed up the PDE pricing, and will enable us to get profit from the multi-core machines that we have.

Sincerely,
Rabih Chaar

-----Message d'origine-----
De : caml-list-bounces@yquem.inria.fr [mailto:caml-list-bounces@yquem.inria.fr] De la part de Dr. Thomas Fischbacher
Envoyé : jeudi 22 janvier 2009 20:10
À : Caml-list List
Objet : [Caml-list] OCaml and PETSc


We, that is, the authors of the ocaml-based nsim continuum field
theory simulator and the nmag micromagnetic application
(http://nmag.soton.ac.uk/), keep on receiving quite some feedback
on two specific modules contained in that project. One is an
extended (and mm-bugfixed) version of Art Yerkes' "Pycaml" module,
the other one is our (rudimentary yet useful) interface to the
PETSc library for MPI-parallelizable sparse/dense matrix linear
algebra (plus linear solvers, etc.).

So, we are considering forking that off in order to distribute it
separately. But as this would involve some amount of work that keeps
us from doing other important things, we would like to hear feedback
from people out there on who might have specific applications or
plans for code that could benefit from this. So, who would like to
use PETSc from within OCaml, and what are your applications?

-- 
best regards,
Dr. Thomas Fischbacher
t.fischbacher@soton.ac.uk



_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs
This message and any attachments (the "message") are confidential, intended solely for the addressee(s), and may contain legally privileged information. 
Any unauthorised use or dissemination is prohibited. 
E-mails are susceptible to alteration. 
Neither Societe Generale Asset Management nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or falsified. 
  
Find out more about Societe Generale Asset Management's proposal on www.sgam.com
  
                                ******** 
  
Ce message et toutes les pieces jointes (ci-apres le "message") sont confidentiels et susceptibles de contenir des informations couvertes par le secret professionnel.
Ce message est etabli a l'intention exclusive de ses destinataires.
Toute utilisation ou diffusion non autorisee est interdite. 
Tout message electronique est susceptible d'alteration. Societe Generale Asset Management et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, deforme ou falsifie. 

Decouvrez l'offre et les services de Societe Generale Asset Management sur le site www.sgam.fr


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-01-26  9:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-22 19:09 OCaml and PETSc Dr. Thomas Fischbacher
2009-01-22 23:45 ` [Caml-list] " Alexy Khrabrov
2009-01-23 13:20 ` Richard Jones
2009-01-23 14:09   ` Dr. Thomas Fischbacher
2009-01-23 14:42     ` Stefano Zacchiroli
2009-01-26  9:17 ` RABIH.ELCHAAR

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).