From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,419864ed91cc937d X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news4.google.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: heap size exceeded for large matrices Date: Sun, 29 Aug 2010 11:42:02 +0100 Organization: A noiseless patient Spider Message-ID: References: <14007b1b-c290-4c73-a0ec-d3c5195b83d4@t20g2000yqa.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Sun, 29 Aug 2010 10:42:05 +0000 (UTC) Injection-Info: mx03.eternal-september.org; posting-host="KCXegvZb5vh43D+f3BR6Ew"; logging-data="5934"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18DoN4ctF4HmQP4kOYvKhlaITBUEk8kveY=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (darwin) Cancel-Lock: sha1:0oO/DFFiZ+SAijV2w3jrBpnE4Tw= sha1:C2d/j15A++OGAAB3KvN59ugZpY8= Xref: g2news1.google.com comp.lang.ada:13797 Date: 2010-08-29T11:42:02+01:00 List-Id: "Yannick DuchĂȘne (Hibou57)" writes: > Le Sun, 29 Aug 2010 10:50:39 +0200, John Raymond Dore > a Ă©crit: >> I have no difficulty in increasing the storage size of a task. >> I cannot do the same for matrices within a procedure > Forgive my question is this ever happens to looks stupid: is your > matrix allocated as a local object of that procedure ? > If so, the stack may have a maximum limit which cannot be exceeded, > and dynamic allocation may solve the case. > If not, an excerpt from the source could help to see. > > Do you use Ada.Numerics.Generic_Real_Arrays.Real_Matrix ? (that is > what I supposed, may need to be confirmed). The implementation of the Ada.Numerics.Generic*Arrays in GNAT (and in https://sourceforge.net/projects/gnat-math-extn/) allocates temporary arrays on the stack, which will be of similar sizes to the original. Can you call the matrix operations from a task with a large stack? I'm not sure that generalized algorithms are going to meet your needs (you're going to be perilously close to your 8GB of real memory, when you consider temporary space, which is going to risk much swapping; and won't you need a 64-bit OS?) Are there any sparse matrix algorithms?