Software Archive
Read-only legacy content
17060 Discussions

Run-time error message

jschomaker
Beginner
522 Views
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???
0 Kudos
1 Reply
jschomaker
Beginner
522 Views
Thank you so much! It worked. I read where the default stack size is 1MB, so I guessed and made it 2MB, which worked.
0 Kudos
Reply