Help: IFC stack overflow
- From: "Ben" <laserbin@xxxxxxxxx>
- Date: 30 Mar 2006 08:59:18 -0800
Hi,
I have a module with many global arrays,
!------------------------------------------------------
module Global
integer, save :: dims(4)=(/0,0,0,0/)
real (kind = 8), save, allocatable :: A(:,:,:,:)
! save data read from a file
real (kind = 8), save, allocatable :: B(:,:,:,:) ! B to E
have the same size
real (kind = 8), save, allocatable :: C(:,:,:,:) ! as A
real (kind = 8), save, allocatable :: D(:,:,:,:)
real (kind = 8), save, allocatable :: E(:,:,:,:)
. . .
. . .
. . .
logical, save, allocatable :: L(:,:,:,:)
contains
!
! subroutines here
!
end module Global
!--------------------------------------------------------
When I read in the dimensional information to dims, these arrays can
be allocated.
The process is
* read in dimensions
* allocate A, populate A using file stream I/O
* allocate B, save intermediate results in B (e.g. sub1(B,A))
* allocate C, do something like sub2(C,B)
etc
Everything works fine when I compile the codes with g95.
However, when I tried to use Intel Fortran compiler 9, it only works
when the data size is relatively small, say dims= (/30,30,8,30/). For
large dimensions like dims=(/256,256,25,30/), it crashes when I call
sub3 to allocate D array. The error report is stack overflow:
forrtl: severe (170): Program Exception - stack overflow
( I have not found the error code 'severe (170)' in Intel docs)
The computer has plenty of memory (4GB). I also check the status
after each allocate statement.
I am wondering why the data size matters.
Is it related to the 'save' attribute?
Will it be helpful if I reduce the number of those global arrays?
Any suggestions and comments are welcome.
Thanks.
Ben
.
- Follow-Ups:
- Re: Help: IFC stack overflow
- From: Joe Krahn
- Re: Help: IFC stack overflow
- From: Joost
- Re: Help: IFC stack overflow
- Prev by Date: procedure argument
- Next by Date: Re: Structure of large link libraries in f95
- Previous by thread: procedure argument
- Next by thread: Re: Help: IFC stack overflow
- Index(es):
Relevant Pages
|
|