- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I get run-time error message: forrtl: severe<170>: Program Exception - stack overflow, Line 7 of CONSTR2. I've converted old FORTRAN 77 code into doing dynamic array allocation and am now trying to figure out how to fix the stack overflow problem. My programs are set up very simply, with a module containing allocatable array declarations, a main subroutine, and other subroutines USING the module, and some subroutines called by main to allocate the arrays. There appears to be no problem allocating the space since I display an error message if there is a problem i.e.
ALLOCATE (ARRAY1(NM1CST),STAT=IERR)
IF (IERR .NE. 0) THEN
DISPLAY ERROR
ENDIF
It runs beautifully for many models, except when it gets to huge ones.
Can anyone help???
ALLOCATE (ARRAY1(NM1CST),STAT=IERR)
IF (IERR .NE. 0) THEN
DISPLAY ERROR
ENDIF
It runs beautifully for many models, except when it gets to huge ones.
Can anyone help???
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you so much! It worked. I read where the default stack size is 1MB, so I guessed and made it 2MB, which worked.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page