Subject: Re: f90 and f77 differ when compiling large array ?

From: Wang Xiaogang <[email-masked]>
Date: Tue, 7 Mar 2000 11:59:49 -0500

Dear CCLers,
I just found out a solution to my question,
I can use allocatable array to solve this problem in f90.

use something like
      DOUBLE COMPLEX, allocatable::AA(:,:,:)

      allocate(aa(256,256,256))

Is this the only way to handle large arrays in f90?

Xiaogang

On Tue, 7 Mar 2000, Wang Xiaogang wrote:

> Dear CCLers,
> Concerning the same question asked recently on CCL (compile a large array
> in fortran), I found a strange thing,
> 
> When I use f77, the suggested prescriptions all work. (use 'common' 
> or 'save' or '-static' compiler option)
> But when I use f90, all of them fail. I get the error message
> 
>       DOUBLE COMPLEX AA(256,256,256)
>                      ^               
> f90-1435 f90: ERROR TEST, File = fft.f, Line = 4, Column = 22 
>   The storage size needed for "AA" exceeds 268,435,455 bytes, the maximum
> storage size available.
> 
> f90: MIPSpro Fortran 90 Version 7.3  (f52) Tue Mar  7, 2000  11:31:58
> 
> 
> My question is why f90 compiler cannot allocate large array to data
> segment while f77 compiler can?
> 
> My stacksize limit is about 500 megabytes.
> I met this problem on SGI origin 2000, irix 6.5.
> 
> Thanks.
> 
> Xiaogang
> 
> On Tue, 22 Feb 2000, Y Z wrote:
> 
> > After I asked the question for 3D-FFT,
> > I got a lot of  responses. Thanks a lot for
> > their helps , my problem have been solved.
> > 
> > 
> > Here is the summary
> > 
> > My original question is:
> > 
> > Hi,
> > 
> > Are there any way to calculate a (256,256,256) order
> > DOUBLE COMPLEX FFT in FORTRAN77? I tried to do the
> > following subrouitine but cannot pass the compiling.
> > 
> > 
> > By f77 in SGI :
> > 
> > Warning: Stack frame size (270015328) larger than system limit (67108864)
> > 
> > +++++++++++++++++++++++++++++++++
> > 
> >      program test
> >      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
> >      DOUBLE COMPLEX AA(256,256,256)
> >      DIMENSION ID(64),CC(64)
> >      DIMENSION NORD(3)
> >      DO 100 i=1,256
> >       DO 100 j=1,256
> >         DO 100 k=1,256
> >           xx=DBLE(I+j+k)
> >           AA(i,j,k)=DCMPLX(xx,0.0D0)
> > 100   CONTINUE
> >      NORD(1)=8
> >      NORD(2)=8
> >      NORD(3)=8
> >      IERR=0
> >      CALL DFFT3D(dta,NORD,ID,CC,1,IERR)
> >      STOP
> >      END
> > 
> ------------------------------------------------
> Dr Xiaogang Wang 
> Departement de chimie 
> Universite de Montreal
> C.P. 6128, succursale Centre-ville
> Montreal, Quebec H3C 3J7
> 
> Tel. (514) 3436111 ext. 3947 (office)
> FAX  (514) 3437586 (office)
> e-mail: [email-masked]
> http://physchem.ox.ac.uk/~xgwang/
> ------------------------------------------------
> 
> 

------------------------------------------------
Dr Xiaogang Wang 
Departement de chimie 
Universite de Montreal
C.P. 6128, succursale Centre-ville
Montreal, Quebec H3C 3J7

Tel. (514) 3436111 ext. 3947 (office)
FAX  (514) 3437586 (office)
e-mail: [email-masked]
http://physchem.ox.ac.uk/~xgwang/
------------------------------------------------

---

From: Wang Xiaogang <[email-masked]>
Date: Tue, 7 Mar 2000 11:48:06 -0500

Dear CCLers,

Thanks.

Xiaogang

---

From: Christoph van Wüllen <[email-masked]>
Date: Tue, 7 Mar 2000 18:52:07 +0100

... if stack or data size is not sufficient this will not solve your 
problem but only defer it until program execution (not compilation).
-- 
---------------------------+------------------------------------------------
Christoph van Wullen       | Fon (University):  +49 234 32 26485
Theoretical Chemistry      | Fax (University):  +49 234 32 14109
Ruhr-Universitaet          | Fon/Fax (private): +49 234 33 22 75
D-44780 Bochum, Germany    | eMail: [email-masked]
---------------------------+------------------------------------------------