From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: ** X-Spam-Status: No, score=2.8 required=5.0 tests=DNS_FROM_RFC_POST,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 7799EBB84 for ; Wed, 16 Jul 2008 16:16:44 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqMBALyffUhC+VLteGdsb2JhbACRekMBCgUEBgcRA5Z7hwo X-IronPort-AV: E=Sophos;i="4.30,373,1212357600"; d="scan'208";a="27378742" Received: from wx-out-0506.google.com ([66.249.82.237]) by mail4-smtp-sop.national.inria.fr with ESMTP; 16 Jul 2008 16:16:19 +0200 Received: by wx-out-0506.google.com with SMTP id i30so3050352wxd.15 for ; Wed, 16 Jul 2008 07:16:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=kIpXnG7NP3jm+9sDZDCO9l26vgEbWhYiyFfoFk8Tzlk=; b=cHf6BZ0zC0f1KWv7rt5S304j7zTDuGjjwtar6mj8yiAPzxu188PfcdP1Mds5x00GCX n8IhkwZ0gprhGoE5FotaN/wzvtRteE8XcyAfi0H9ebeGPjBTIF1v86XknwG0zz+5uUA+ /vNG7N63DZ7pViKrVg6BYNpJGu3Zi3VOhz6fo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=lQOIhOik+s1vmOPJ/tRuukEb3zmjJCbVVHh+4iehENZA7nXR9FcRFhk9UBVzMYwoVu S8p8cDJlIgkbQO7rfl6CR+CLeOK4tARdCHhw3sDIJggT9w+RF5nYa7oW7gM014p1wHn1 bssHhduX6BrR13Ab4zPCasEIRHmOqR1PybTiI= Received: by 10.70.10.3 with SMTP id 3mr66066wxj.62.1216217778492; Wed, 16 Jul 2008 07:16:18 -0700 (PDT) Received: from ?10.0.1.3? ( [151.205.96.71]) by mx.google.com with ESMTPS id h16sm8734974wxd.15.2008.07.16.07.16.17 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 16 Jul 2008 07:16:17 -0700 (PDT) Cc: caml-list@yquem.inria.fr Message-Id: <00C7FEE1-8DA2-42BC-AC47-8626BFA16850@gmail.com> From: Andres Varon To: Jean Krivine In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v926) Subject: Re: [Caml-list] memory usage Date: Wed, 16 Jul 2008 10:16:16 -0400 References: <20080711220106.GA16853@annexia.org> <5A27A5ED-C5A2-47E4-9C90-E7F72DB07891@gmail.com> X-Mailer: Apple Mail (2.926) X-Spam: no; 0.00; krivine:01 amnh:01 ocaml:01 ocaml:01 compiler:01 findlib:01 compiler:01 patching:01 -prefix:01 krivine:01 ocamlopt:01 malloc:01 malloc:01 bug:01 beginner's:01 On Jul 15, 2008, at 3:38 PM, Jean Krivine wrote: > I'd be glad to try the patch if you could post it somewhere! I have posted it in: http://research.amnh.org/~avaron/ocaml/ best, Andres > > J > > On Tue, Jul 15, 2008 at 3:31 PM, Andres Varon > wrote: >> Hello Jean, >> >> There is no 64-bit native OCaml compiler for Mac OS X intel. I >> have a patch >> that works in Leopard, but did not compile opt.opt in Tiger, >> meaning that >> something is not OK, so I did not offer it to the community. The >> bootstrap >> went fine, findlib and godi compiled OK too. I can post the patches >> somewhere if you want to give it a shot. >> >> My memory intensive application runs fine in Leopard with this >> compiler. But >> the binaries do not execute in Tiger (I found that other people had >> the same >> trouble copying a 64 bit apps from Leopard to Tiger and the other way >> around, but didn't look into it). >> >> If you want it ... I can post it, maybe someone can cleanup my job? >> All that >> would be needed after patching is: >> >> ./configure -host x86_64-apple-darwin -prefix /opt/ocaml/experimental >> >> (The prefix I always add for my ocaml-modified comilers). >> >> best, >> >> Andres >> >> On Jul 15, 2008, at 1:06 PM, Jean Krivine wrote: >> >>> Dear all >>> >>> I downloaded the last version of ocaml (3.10.2) but I must confess I >>> don't know what option I should pass to the compiler to make a >>> binary >>> that uses 64 bits. >>> I tried naively ocamlopt -ccopt -arch -ccopt x86_64 but that doesn't >>> work. Any idea? >>> >>> >>> >>> On Fri, Jul 11, 2008 at 6:01 PM, Richard Jones >>> wrote: >>>> >>>> On Fri, Jul 11, 2008 at 03:49:26PM -0400, Jean Krivine wrote: >>>>> >>>>> I am trying to run a stochastic simulator (written in ocaml) on >>>>> a huge >>>>> data set and I have the following error message: >>>> >>>> I can confirm that OCaml works fine with huge datasets, on 64 bit >>>> platforms anyway. >>>> >>>>> sim(9595) malloc: *** mmap(size=1048576) failed (error code=12) >>>>> *** error: can't allocate region >>>>> *** set a breakpoint in malloc_error_break to debug >>>>> Fatal error: out of memory. >>>>> >>>>> My system: >>>>> >>>>> Mac Pro running OS X 10.5.4 >>>>> Processor: 2 x 2.8 GHz Quad-Core Intel Xeon >>>>> Memory: 10 GB 800 MHz DDR2 FB-DIMM >>>>> >>>>> Does someone know what happened? Do you have any idea of any >>>>> parameter >>>>> I could tune in order to avoid that? >>>> >>>> Is the compiler 32 bits or 64 bits on this machine? Try doing: >>>> >>>> $ ocaml >>>> # Sys.word_size ;; >>>> >>>> It should print out either '32' or '64'. >>>> >>>> Also run your program under whatever the OS X equivalent of >>>> 'strace' >>>> is (ktrace?) to find out exactly why the mmap call fails. >>>> >>>> OCaml <= 3.10.2 on Linux suffers a nasty problem with its use of >>>> mmap >>>> and randomized address spaces >>>> (https://bugzilla.redhat.com/show_bug.cgi?id=445545#c9) but it >>>> doesn't >>>> seem like this is the same issue. >>>> >>>> Rich. >>>> >>>> -- >>>> Richard Jones >>>> Red Hat >>>> >>>> _______________________________________________ >>>> 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 >>>> >>> >>> _______________________________________________ >>> 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 >> >>