From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 33C837EEF8 for ; Fri, 17 Jul 2015 20:57:10 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of kennethadammiller@gmail.com) identity=pra; client-ip=209.85.218.51; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="kennethadammiller@gmail.com"; x-sender="kennethadammiller@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of kennethadammiller@gmail.com designates 209.85.218.51 as permitted sender) identity=mailfrom; client-ip=209.85.218.51; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="kennethadammiller@gmail.com"; x-sender="kennethadammiller@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-oi0-f51.google.com) identity=helo; client-ip=209.85.218.51; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="kennethadammiller@gmail.com"; x-sender="postmaster@mail-oi0-f51.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BDAgBST6lVlDPaVdFagkaBIVoPBoMduBaCJIV7AoFCB0wBAQEBAQESAQEBAQcLCwkfMIQjAQEBAwESER0BGxcGAQMBCwYFCw0qAgIhAQERAQUBHAYTCBqHdgEDCggNrEuBLD4xiz+BbIJ5iyYKGScNV4RXAQEBAQEBBAEBAQEBAQEVAQUOiz6CTYFnAQFQB4JogUMFlEyHT4JpgWeBQ5AZg0aCFxIjgRURBoIcHIFvIjEBAYELgT4BAQE X-IPAS-Result: A0BDAgBST6lVlDPaVdFagkaBIVoPBoMduBaCJIV7AoFCB0wBAQEBAQESAQEBAQcLCwkfMIQjAQEBAwESER0BGxcGAQMBCwYFCw0qAgIhAQERAQUBHAYTCBqHdgEDCggNrEuBLD4xiz+BbIJ5iyYKGScNV4RXAQEBAQEBBAEBAQEBAQEVAQUOiz6CTYFnAQFQB4JogUMFlEyHT4JpgWeBQ5AZg0aCFxIjgRURBoIcHIFvIjEBAYELgT4BAQE X-IronPort-AV: E=Sophos;i="5.15,497,1432591200"; d="scan'208";a="170665921" Received: from mail-oi0-f51.google.com ([209.85.218.51]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 17 Jul 2015 20:57:09 +0200 Received: by oibn4 with SMTP id n4so76356747oib.3 for ; Fri, 17 Jul 2015 11:57:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=AZ3H8F3evKjkPefZRzCLhH7ygeYcF0Q9lyrrd7CdFOs=; b=IAKfguK2UVlg5Ffq9zNQB4i4pb0H3VnBw31/6B7tj50XVmJfyktvDqiP5BKjOV5EJ9 1pagsOtV+hJ4hRRkkqjqECkBAHhOe5a6FSpnRfYhmYhP0EdXFAkweOOt+bd/Kk7KX56x xIzXkHNP2qwKaKdu2wB7Hq3/LRw1iCX0P0u1Q9djVWRGzYUxSbrylBHJ9cJ2TaBgpXfj vL8Yrn8ZapyZ82sB4TDiFtphvaly3IrJKrbhLerVCwgS6Muz40TpsnYKkpzgY0DevryC fzocXXCLhPj1xKTGjHTdrS8jj0YVEzSnHJ9vEA2mmSoWNJ/nuV1aWNU0P5XxYBCQ3/Y8 gINQ== MIME-Version: 1.0 X-Received: by 10.182.114.138 with SMTP id jg10mr15470401obb.55.1437159427986; Fri, 17 Jul 2015 11:57:07 -0700 (PDT) Received: by 10.202.191.8 with HTTP; Fri, 17 Jul 2015 11:57:07 -0700 (PDT) In-Reply-To: References: Date: Fri, 17 Jul 2015 14:57:07 -0400 Message-ID: From: Kenneth Adam Miller To: Shuai Wang Cc: caml users Content-Type: multipart/alternative; boundary=001a11c2e0d030db0a051b16c1ae Subject: Re: [Caml-list] Cannot execute "main" function --001a11c2e0d030db0a051b16c1ae Content-Type: text/plain; charset=UTF-8 Right, I was wondering if I should tell you that. That means: let _ = my main definition... or let () = my main definition... each get evaluated very similarly to how a main function would. Is there code that you can post in order that I/we can help you? On Fri, Jul 17, 2015 at 2:53 PM, Shuai Wang wrote: > Here is my compilation script. > > ocamlbuild -use-ocamlfind XXX1.native XXX2.native ... init.native > -ocamlopt "-inline 20" -ocamlopt -nodynlink > > And our tool always execute init.native. > > > > > On Fri, Jul 17, 2015 at 2:50 PM, Kenneth Adam Miller < > kennethadammiller@gmail.com> wrote: > >> Can you post your build specification? >> >> On Fri, Jul 17, 2015 at 2:35 PM, Shuai Wang >> wrote: >> >>> Dear list, >>> >>> >>> I am working on some tools written in OCaml (compiled by OCaml version >>> 4.01.0). >>> >>> This morning I changed some code, compiled it and let it processing some >>> large data (~ 4G), it never stops after over 2 hours. >>> >>> I feed the tool with a tiny input which took less than 1 second to >>> process before, and I figured out that now it takes around 2.5 minutes >>> before entering into "main" function! >>> >>> I tried to clean the whole codebase, and recompile it ( I use ocamlbuild >>> 4.01.0), but the same wired situation still happens.. >>> >>> I did this: >>> >>> ltrace ./init.native input >>> >>> and I got this output flushing out for a very long time (sorry mail list >>> blocks my large image.. ): >>> >>> http://i.stack.imgur.com/sEkKk.png >>> >>> >>> >>> Is anyone aware this kind of issue before..? Am I messed up something..? >>> I have been working on OCaml for a relatively long time and I didn't >>> encounter this kind of stuff before... >>> >>> >>> Sincerely, >>> Shuai >>> >> >> > --001a11c2e0d030db0a051b16c1ae Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Right, I was wondering if I should tell you that. That mea= ns:

let _ =3D=C2=A0
=C2=A0 my main definition.= ..

or=C2=A0

let () =3D
=C2=A0 my main definition...

each get eval= uated very similarly to how a main function would. Is there code that you c= an post in order that I/we can help you?

On Fri, Jul 17, 2015 at 2:53 PM, Shuai W= ang <wangshuai901@gmail.com> wrote:
Here is my compilation script.=C2=A0<= /div>

ocamlbuild -use-ocamlfind =C2=A0XXX1.native XXX2.n= ative ... init.native =C2=A0-ocamlopt "-inline 20" -ocamlopt -nod= ynlink

And our tool always execute init.native.=C2= =A0




On Fri, Jul 17, 2015 at 2:50 PM, Kenneth Adam Miller <ke= nnethadammiller@gmail.com> wrote:
Can you post your build specification?

On Fri, Jul 17= , 2015 at 2:35 PM, Shuai Wang <wangshuai901@gmail.com> = wrote:
Dear list,


I am working on some tools w= ritten in OCaml (compiled by OCaml version 4.01.0).=C2=A0

This morning I changed some code, compiled it and let it proce= ssing some large data (~ 4G), it never stops after over 2 hours.=C2=A0

I feed the tool with a tiny input which took less t= han 1 second to process before, and =C2=A0I figured out that now it takes a= round 2.5 minutes before entering into "main" function!

I tried to clean the whole codebase, and recompile it ( = I use ocamlbuild 4.01.0), but the same wired situation still happens..=C2= =A0

I did this:

= =C2=A0 =C2=A0 ltrace ./init.native input

and I = got this output flushing out for a very long time (sorry mail list blocks m= y large image.. ):




Is anyone aware this kind o= f issue before..? Am I messed up something..?=C2=A0
I have been working on OCaml for a relatively lon= g time and I didn't encounter this kind of stuff before...


Since= rely,
Shuai



--001a11c2e0d030db0a051b16c1ae--