public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: David Ronis <ronis@ronispc.chem.mcgill.ca>
To: "Dr. Juergen Schnack" <jschnack@uos.de>
Cc: gcc@gcc.gnu.org, ronis@ronispc.chem.mcgill.ca
Subject: Re: g77 and array limits
Date: Tue, 08 Apr 2003 18:32:00 -0000	[thread overview]
Message-ID: <16018.65162.797851.825184@ronispc.chem.mcgill.ca> (raw)
In-Reply-To: <3E92EAAF.3080907@uos.de>

Hi Jurgen

Here's a simple test program (that fails)

      complex*16 foo(10000,10000)
      integer i,j
      save foo

      do i=1,10000
         do j=1,10000
            foo(i,j)=i+j
         end do
      end do
      write(*,*)foo(1,1),foo(10000,10000)
      stop
      end


with g77 3.2.2

I get:

g77 -static -O0 -Wall test.f
test.f: In program `MAIN__':
test.f:1: 
         complex*16 foo(10000,10000)
                    ^
Array `foo' at (^) is too large to handle

The info pages have the following:

 * `g77' used to reject the following program on 32-bit targets:
          PROGRAM PROG
          DIMENSION A(140 000 000)
          END
     with the message:
          prog.f: In program `prog':
          prog.f:2:
                   DIMENSION A(140 000 000)
                             ^
          Array `a' at (^) is too large to handle
     because 140 000 000 REALs is larger than the largest bit-extent
     that can be expressed in 32 bits.  However, bit-sizes never play a
     role after offsets have been converted to byte addresses.
     Therefore this check has been removed, and the limit is now 2
     Gbyte of memory (around 530 000 000 REALs).  Note: On GNU/Linux
     systems one has to compile programs that occupy more than 1 Gbyte
     statically, i.e. `g77 -static ...'.

In terms of complex*16, this limit is reduced by 4 and hence the
maximum length of an array is 134 217 728 (or roughly, 11585 for a
square array), which should have worked.  

I've played with the size of the array, and found that it fails for a
square array with a dimension > 5792, corresponding to a maximum
offest that is 1/4 the limit described in the manual.

I'll post this to the gcc list and see what answers I get

David

       reply	other threads:[~2003-04-08 16:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3E92CBB5.6020401@uos.de>
     [not found] ` <16018.53885.323179.591400@ronispc.chem.mcgill.ca>
     [not found]   ` <3E92D431.8010009@uos.de>
     [not found]     ` <16018.59703.503137.174360@ronispc.chem.mcgill.ca>
     [not found]       ` <3E92EAAF.3080907@uos.de>
2003-04-08 18:32         ` David Ronis [this message]
2003-04-19 18:26           ` Toon Moene
2003-04-22 19:39             ` David Ronis
2003-04-22 23:14               ` Toon Moene

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16018.65162.797851.825184@ronispc.chem.mcgill.ca \
    --to=ronis@ronispc.chem.mcgill.ca \
    --cc=gcc@gcc.gnu.org \
    --cc=jschnack@uos.de \
    --cc=ronis@onsager.chem.mcgill.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).