[comp.sys.mips] f77 large arrays

laporte@sobmips.UUCP (p.laporte) (11/29/89)

When compiling the following program i get an error in  as1

      dimension i(800000)
      data i/800000*0/
      stop
      end


f77 -c big.f

as1: Error: , line 0: Not enough space
Fatal error in: /usr/lib/cmplrs/f77/as1 - core dumped
Signal 139

If i remove the data line all is ok.

Has anyone faced the same problem and found a solution.


Pierre Laporte
{attcan,mcgill-vision,telly}!sobeco!laporte

rogerk@mips.COM (Roger B.A. Klorese) (11/30/89)

In article <1989Nov29.155110.2672@sobmips.UUCP> laporte@sobmips.UUCP (p.laporte) writes:
>When compiling the following program i get an error in  as1
>
>      dimension i(800000)
>      data i/800000*0/
>      stop
>      end
>
>f77 -c big.f
>
>as1: Error: , line 0: Not enough space
>Fatal error in: /usr/lib/cmplrs/f77/as1 - core dumped
>Signal 139
>
>If i remove the data line all is ok.
>
>Has anyone faced the same problem and found a solution.

It shouldn't coredump, but does because as1 is growing too big for your
swap space. 
-- 
ROGER B.A. KLORESE      MIPS Computer Systems, Inc.      phone: +1 408 720-2939
928 E. Arques Ave.  Sunnyvale, CA  94086                        rogerk@mips.COM
{ames,decwrl,pyramid}!mips!rogerk
"I want to live where it's always Saturday."  -- Guadalcanal Diary

roe@sobmips.UUCP (r.peterson) (12/04/89)

From article <32418@servitude.mips.COM>, by rogerk@mips.COM (Roger B.A. Klorese):
> In article <1989Nov29.155110.2672@sobmips.UUCP> laporte@sobmips.UUCP (p.laporte) writes:
>>When compiling the following program i get an error in  as1
>>
>>      dimension i(800000)
>>      data i/800000*0/
>>      stop
>>      end
>>
>>f77 -c big.f
>>
>>as1: Error: , line 0: Not enough space
>>Fatal error in: /usr/lib/cmplrs/f77/as1 - core dumped
>>Signal 139
>>
>>If i remove the data line all is ok.
>>
>>Has anyone faced the same problem and found a solution.
> 
> It shouldn't coredump, but does because as1 is growing too big for your
> swap space. 

This is an unlikely explanation.  The M-120 in question is running with
100MB of swap space - two 40M partitions and 1 20MB, on three different
spindles.

Also, max user process size is set to 8MB - however, 800000*(4 bytes/int)=
(about) 3.2 MB.  No way is the assembler taking the other 4.8 MB.

Also, an error message like:
	as1: Error: , line 0: Not enough space
		   ^^^^^^^^^
is not useful.

-- 
One makes strong assumptions delving	       Roe Peterson
into the beginning of the universe...	       {uunet,mcgill-vision}!sobeco!roe
	- Stephen Hawking, Cambridge

calvin@dinkum.wpd.sgi.com (Calvin H. Vu) (12/05/89)

> >>When compiling the following program i get an error in  as1
> >>
> >>      dimension i(800000)
> >>      data i/800000*0/
> >>      stop
> >>      end
> >>

Another possible explaination is that you run out of space in the default 
temporary directory /tmp which is used by the compiler to write out all
the intermediate files (ucode, assembler code, symbol table, etc.). 
Personally, I don't have any problem compiling your test case on my machine
which is an SGI 4D/70 with 50M of swap space and 6M of available disk space
in the /tmp file system and the MIPS 1.31 Fortran release.

If you have very little space left in the /tmp file system you can try:
	setenv TMPDIR /usr/tmp
to tell the F77 driver to use /usr/tmp for the intermediate files (assuming
you have more space in /usr/lib or whatever directory that gives you more
room).   I'm fairly certain that the MIPS driver allows the same environment
variable.

Some people have run into the limit where the array size is bigger than the
value that can be represented in a 32-bit integer but for anything smaller
than that there shouldn't be any problem in the compiler itself (I've seen
many arrays which are a LOT bigger than the one in your example).  The only
limitation must be in the hardware configuration somewhere...  Hmmm....

Calvin Vu