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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,124905131f269735 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-09-26 06:44:47 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!195.54.122.107!newsfeed1.bredband.com!bredband!newsfeed.sovam.com!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!behemoth.dreo.dnd.ca!marinier Newsgroups: comp.lang.ada From: Claude Marinier X-X-Sender: Reply-To: Subject: Re: gnat and heap size In-Reply-To: <3BB10E2C.8C57FFE1@linuxchip.demon.co.uk> Message-ID: References: <1001442590.557811@news.drenet.dnd.ca> <3BB10E2C.8C57FFE1@linuxchip.demon.co.uk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cache-Post-Path: news.drenet.dnd.ca!unknown@behemoth.dreo.dnd.ca X-Cache: nntpcache 2.3.3 (see http://www.nntpcache.org/) Date: Wed, 26 Sep 2001 09:44:41 -0400 NNTP-Posting-Host: 131.136.242.1 X-Complaints-To: abuse@sympatico.ca X-Trace: news20.bellglobal.com 1001511608 131.136.242.1 (Wed, 26 Sep 2001 09:40:08 EDT) NNTP-Posting-Date: Wed, 26 Sep 2001 09:40:08 EDT Organization: Bell Sympatico Xref: archiver1.google.com comp.lang.ada:13394 Date: 2001-09-26T09:44:41-04:00 List-Id: The application is an electromagnetic simulation. Yes, we could use sparse matrix techniques but part of the program requires a full matrix. Perhaps we are hitting a low level limit (is that what Adrian is saying?). Here is a test program. procedure matrix is type matrix is array ( integer range <>, integer range <> ) of float; type matrix_a is access matrix; A: matrix_a := New matrix( 1..9000, 1..9000 ); i : integer; begin i := 1; while i <= 9000 loop A(i,i) := 1.0; i := i + 1; end loop; end matrix; On Tue, 25 Sep 2001, Dr Adrian Wrigley wrote: > Claude Marinier wrote: > > We want to use large arrays (well, large for us: 10000 x 10000 complex > > numbers). We are using gnat 3.13p on Solaris 7. We run out of heap (heap > > exhausted) and have not yet found a way to increase it. > Since Ada works in bits, the sizes can overflow (signed) 32-bit > representation. This makes handling data in excess of 256MB tricky, > since locations of record elements are wrong, as are size attributes > (eg a problem in generics). I solved this by calculating the sizes of > each element, multiplying by the number of elements, adding in each > record component's size. Nasty. But it was 10-100 times the speed of > more obvious solutions. > > I suspect you have a 64-bit architecture, and *may* not hit the 'size > problems I had with GNAT. If you stick to simple arrays, you might be > OK. I was using GNAT 3.12p on a '686 processor. > (by the way... what do you use such large matrices for?) -- Claude Marinier, Information Technology Group claude.marinier@dreo.dnd.ca Defence Research Establishment Ottawa (DREO) (613) 998-4901 FAX 998-2675 3701 Carling Avenue, Ottawa, Ontario K1A 0Z4 http://www.dreo.dnd.ca