g77 large array

Susukita Ryutaro susukita@postman.riken.go.jp
Wed Oct 15 08:30:00 GMT 2003


> >       CALL A
> >       CALL B
> >       END
> > 
> >       SUBROUTINE A
> >       INTEGER I(33554432)
> >       I(33554432) = 0
> >       END
> > 
> >       SUBROUTINE B
> >       INTEGER I(8388608)
> >       END
> 
> Note that this program needs ~ 4 * (33.5 + 8.4) = 4 * 42 = 168 Mbyte of 
> RAM+SWAP.  What's the size of your machines' RAM + SWAP ?

In this case, two arrays do not need memory at the same time.
Cannot SUBROUTINE B use the same memory area as A in Fortran compiler,
even if I do not declare explicitly COMMON I?
I should write about the machine. The machine's RAM + SWAP = 48 M +
128 M = 176 M, so if two arrays need different memory areas, the
program will fail.

SUSUKITA, Ryutaro
The Institute of Physical and Chemical Research (RIKEN)
Computational Astrophysics Laboratory



More information about the Gcc mailing list