Re: [Caml-list] Re: Possible ocamlmpi finalization error?

2010-09-08 Thread Mark Shinwell
On Wed, Sep 08, 2010 at 01:31:29PM +0300, Eray Ozkural wrote: > On Wed, Sep 8, 2010 at 10:51 AM, Sylvain Le Gall wrote: > > > On 08-09-2010, Eray Ozkural wrote: > > > I'm recently getting errors that are past MPI_Finalize. Since both > > > init/final and communicator allocation is managed by ocam

Re: [Caml-list] Segfaults with Dynlink with OCaml 3.11

2010-08-23 Thread Mark Shinwell
On Mon, Aug 23, 2010 at 09:47:43PM +1000, Paul Steckler wrote: > On Mon, Aug 23, 2010 at 9:06 PM, Stéphane Glondu wrote: > > Does your real large program use C bindings? Are you able to reproduce > > the segfaults with pure OCaml code? > > Yes, the large program has C bindings, including calls in

Re: [Caml-list] Native code stack overflow detection guarantees - followup

2010-07-09 Thread Mark Shinwell
On Fri, Jul 09, 2010 at 09:39:06AM +0100, Mark Shinwell wrote: > On Thu, Jul 08, 2010 at 08:59:30PM -0400, Michael Ekstrand wrote: > > Therefore, I am wondering: are there documented guarantees on which the > > native code stack overflow behavior rests? Linux processes usuall

Re: [Caml-list] Native code stack overflow detection guarantees

2010-07-09 Thread Mark Shinwell
On Thu, Jul 08, 2010 at 08:59:30PM -0400, Michael Ekstrand wrote: > Therefore, I am wondering: are there documented guarantees on which the > native code stack overflow behavior rests? Linux processes usually > receive a segmentation fault when they run out of stack space; is that > guaranteed, or

Re: [Caml-list] Static exception analysis or alternative to using exceptions

2010-05-27 Thread Mark Shinwell
On Thu, May 27, 2010 at 09:54:29AM +0100, David Allsopp wrote: > Florent Ouchet wrote: > > Same here, specially to avoid the Not_found exception. > > The optional return values gives the oportunity to have a clear view of > > what is being done if the result is not available. > > Agreed - though [

Re: [Caml-list] Rewriting the Digest module causes linking errors

2010-03-17 Thread Mark Shinwell
On Wed, Mar 17, 2010 at 09:27:30AM +0100, Goswin von Brederlow wrote: > I want to rewrite the Digest module to expose a more lowlevel interface > to the md5 digest and add support to digest Bigarrays. I've patched the > respective files involved and it all looks alright but when I try to > build oc

Re: [Caml-list] Debugging C and OCaml

2010-03-01 Thread Mark Shinwell
On Mon, Mar 01, 2010 at 07:48:56PM -0500, Jianzhou Zhao wrote: > On Mon, Mar 1, 2010 at 10:19 AM, Mark Shinwell > wrote: > I compiled OCaml code into *.o by 'ocamlc -custom -output-obj...', > and then linked it with *.o from C and C++ code. > I think this isnt a na

Re: [Caml-list] Debugging C and OCaml

2010-03-01 Thread Mark Shinwell
On Mon, Mar 01, 2010 at 07:52:01PM -0500, Jianzhou Zhao wrote: > > It seems that OCaml runtime is interpreting via 'caml_interprete' the > > OCaml function which C > > calls at runtime. If this is true, we cannot really debug that OCaml > > function, but we can > > see how it is interpreted. But I

Re: [Caml-list] Debugging C and OCaml

2010-03-01 Thread Mark Shinwell
On Mon, Mar 01, 2010 at 08:24:32PM +0100, ri...@happyleptic.org wrote: > -[ Mon, Mar 01, 2010 at 03:19:41PM +0000, Mark Shinwell ] > > That said, ocamlopt-compiled assembly code is fairly easy to > > read, and you should be able to get something resembling a backtrace u

Re: [Caml-list] Debugging C and OCaml

2010-03-01 Thread Mark Shinwell
On Mon, Mar 01, 2010 at 10:10:44AM -0500, Jianzhou Zhao wrote: > My main program is C++. It uses C functions to call > OCaml functions, and these OCaml functions also call > C functions and wrapped C++ functions sometimes. > > I can debug from C++, but it stops when it meets > an OCaml binding. Do

Re: [Caml-list] [newbie] miscellaneous on installation and web site

2010-03-01 Thread Mark Shinwell
On Mon, Mar 01, 2010 at 02:07:45PM +0100, Marco Maggi wrote: > I think I successfully compiled ocaml-3.11.2 on my > i686-pc-linux-gnu, but there seems to be no way to install > the package in a temporary location via the Linux de facto > standard DESTDIR environment variable; is ther

Re: [Caml-list] How to add a "non-standard" static c library to ocaml project

2009-12-29 Thread Mark Shinwell
On Tue, Dec 29, 2009 at 10:55:49AM -0500, lin hong wrote: > I'm struggling with this for few days. > > We have a static C library, instead of "libsomename.a", it's "somename.a", > so we could not link it in the usually way like "-lsomename". > In myocamlbuild.ml, I did try to add it's head files d

Re: [Caml-list] linking errors involving cpp files

2009-12-15 Thread Mark Shinwell
On Tue, Dec 15, 2009 at 08:50:33AM -0500, Aaron Bohannon wrote: > On Tue, Dec 15, 2009 at 1:59 AM, Robert Roessler wrote: > > Aaron Bohannon wrote: > >> > >> How do I link C++ code with OCaml? > > > You might try (when mixing C++ and OCaml) wrapping the whole thing in an > > 'extern "C" {...}' bl

Re: [Caml-list] annotations and type-checking

2009-07-29 Thread Mark Shinwell
On Tue, Jul 28, 2009 at 05:47:25PM -0400, Aaron Bohannon wrote: > Why do the first two programs type-check but the thrid one does not? Dark corners of the type system. > let f (x : 'a) : 'a = x in (f true, f 3);; Explicit type variables in this situation are considered "global". They are not g

Re: [Caml-list] ocamlopt debugging options

2009-06-18 Thread Mark Shinwell
On Thu, Jun 18, 2009 at 03:52:46PM +0200, Alexey Rodriguez wrote: > I used objdump as you suggested and I do not mind reading assembler > but I have the same problem as with cmm, namely that symbolic names > are gone. Exactly what form of symbolic name are you referring to? Function names are pre

Re: [Caml-list] ocamlopt debugging options

2009-04-23 Thread Mark Shinwell
On Thu, Apr 23, 2009 at 12:30:31PM +0200, Alexey Rodriguez wrote: > Sometimes it is useful to see what is the code produced by ocamlopt in > order to assess the performance of programming constructs. It is > possible to use -dcmm, but it is difficult to relate ocaml functions > to their compiled fo

Re: [Caml-list] Threads?

2009-04-23 Thread Mark Shinwell
On Thu, Apr 23, 2009 at 12:37:14AM -0700, David McClain wrote: > It's been about 5 years since I faced this situation. I'm trying to link > my program against the Thread module. Things go well until I do the > ocamlopt compilation, then it aborts the make with the message: > > ocamlfind ocamlopt

Re: [Caml-list] Re: Threads performance issue.

2009-02-17 Thread Mark Shinwell
On Tue, Feb 17, 2009 at 11:50:44AM +0100, Rémi Dewitte wrote: > Hello ! > > Many thanks all for your answers ! > > Managing to have the almost same performance whether in mutithreaded > environment or not (even not using threads for this particular task) is > something I would like to have anyway

Re: [Caml-list] Re: Threads performance issue.

2009-02-17 Thread Mark Shinwell
On Tue, Feb 17, 2009 at 10:07:05AM +, Sylvain Le Gall wrote: > On 17-02-2009, Rémi Dewitte wrote: > You are using input_char and standard IO channel. This is a good choice > for non-threaded program. But in your case, I will use Unix.read with a > big buffer (32KB to 4MB) and change your progr

Re: [Caml-list] Threads performance issue.

2009-02-17 Thread Mark Shinwell
On Tue, Feb 17, 2009 at 08:40:11AM +0100, Rémi Dewitte wrote: > I have made some further experiments. > I have a functional version of the reading algorithm. I have the original > imperative version of the algorithm. > Either it is linked to thread (T) or not (X). Either it uses extlib (E) or > not

Re: [Caml-list] Caml implementation of the relaxed value restriction

2009-01-14 Thread Mark Shinwell
On Wed, Jan 14, 2009 at 04:31:24PM +0100, Julien SIGNOLES wrote: > In the article "Many Holes in Hindley-Milner" [1], Sam Lindley claims > that the type of x is ('a * 'a s, int) NList.t in the following ocaml > program because of Garrigue's relaxed value restriction [2]. > == > type 'a s >

Re: [Caml-list] problem installing janestreet core through godi

2008-10-22 Thread Mark Shinwell
On Tue, Oct 21, 2008 at 04:22:09PM -0400, Markus Mottl wrote: > 2008/10/21 Ashish Agarwal <[EMAIL PROTECTED]>: > > I am having trouble installing JaneStreet's Core library through godi. > > On Mac OS X, it fails while installing the prerequisite bin-prot: > > ... > >> ocamlfind ocamlc -package type

Re: [Caml-list] What does Jane Street use/want for an IDE? What about you?

2008-10-20 Thread Mark Shinwell
On Mon, Oct 20, 2008 at 09:19:40AM -0400, Kuba Ober wrote: > I have questions to the kind folks at Jane Street, > and others who use OCaml for commercial/non-research > development: what do you guys use for your development > environment? vim in an xterm for me :) > What are killer features you d

Re: [Caml-list] Could not get a file descriptor referring to the console

2008-08-21 Thread Mark Shinwell
On Thu, Aug 21, 2008 at 02:42:43PM +0200, Luc Maranget wrote: > /usr/bin/open (?) ...which exists on Mac OS X. Mark ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inri

Re: [Caml-list] file_desc

2008-07-01 Thread Mark Shinwell
On Tue, Jul 01, 2008 at 09:35:53AM -0500, Robert Fischer wrote: > Is there a way to convert a file_descr to/from an int in OCaml? The type is > abstract, and there doesn't seem to be an obvious answer. > > Alternatively, is there a way to get at an inherited file_descr from a > process I execv'd

Re: [Caml-list] surprising type error with labels

2008-06-20 Thread Mark Shinwell
On Thu, Jun 19, 2008 at 10:58:59PM +0100, Jeremy Yallop wrote: > Jake Donham wrote: > >Why does > > > > ListLabels.find (fun _ -> true) [];; > > > >produce > > > > Characters 16-31: > > ListLabels.find (fun _ -> true) [];; > > ^^^ > > This expression should not be a

Re: [Caml-list] Segfault in Garbage collector code: any ideas?

2008-06-19 Thread Mark Shinwell
On Thu, Jun 19, 2008 at 04:45:27PM -0500, Raj Bandyopadhyay wrote: > 1) From past experience, this sort of thing seems to occur when > I forget to use a CAMLparam/local/return macro somewhere. However, I > have looked over my C code several times and can't find any such > problem. Is t

[Caml-list] Type checker (ex-)bug

2008-06-18 Thread Mark Shinwell
The following program: type 'a s = 'a type 'a t = unit let g (_ : 'a s -> unit) (_ : 'a t) = () let f t = g (fun x -> x; ()) t fails to typecheck using ocamlc 3.10.0 but succeeds (as would surely be expected) under 3.10.1 and 3.10.2. The 3.10.0 compiler complains: File