CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Stack overflow (https://www.cfd-online.com/Forums/main/8216-stack-overflow.html)

MING October 15, 2004 07:25

Stack overflow
 
Hi, everyone, Do you have some experience on handling the 'stack overflow' problems when runing a Fortran program? Please help me! Thanks a lot in advance.

Jarmo Monttinen October 15, 2004 12:55

Re: Stack overflow
 
Yes.

Solution depends on the operating system and compiler. If you share that info with us, I'm sure we have the solution for you.

-- Jarmo

steve October 15, 2004 13:44

Re: Stack overflow
 
If you are on linux/Unix, type

limit

and look at the allowed stacksize. You may be able to increase it by typing

limit stack unlimit

If that does not increase it, you may have to get your administrator to allow a bigger value.

versi October 15, 2004 22:26

Re: Stack overflow
 
one may use f77 -static ...

Xin Guo October 15, 2004 22:41

Re: Stack overflow
 
If the system is win2000 and the compiler is compaq visual fortran 6? The stack seems always not big enough.

MING October 16, 2004 08:46

Re: Stack overflow
 
Thank you all! The system I used is win2000 and the Fortran version is Visual Fortran 5.0. I used the Common sentence to transfer the data among main parogram and subroutines. I also tried to use the static sentence, but it seemed no much improvement. The computer in use is DELL precision 450 work station. It has a RAM of 1GB. Hope to get your further helps!!!!!!!!!!!

steve October 17, 2004 14:03

Re: Stack overflow
 
Put all your big data arrays into named common spaces

COMMON/DATA01/ARRAY1(... COMMON/DATA02/ARRAY2(...


MING October 17, 2004 14:30

Re: Stack overflow
 
thank you, steve, Yes, what i have done is rightly as you advised.

steve October 18, 2004 09:39

Re: Stack overflow
 
Ming - Did that solve your problem or do you still have the stack overflow problem? Steve

MING October 18, 2004 10:57

Re: Stack overflow
 
no, this way doesn't work.

Jarmo Monttinen October 20, 2004 14:02

Re: Stack overflow
 
Let's try something else:

1. compile and build your code

2. go to the directory when the executable is (use command prompt)

3. type in
: editbin /stack:"some very large number"

4. execute

I'm not 100% sure of the command in step #3, but if you look up editbin or stack within VF, you should be able to find it.

Hope this helps.

-- Jarmo


All times are GMT -4. The time now is 09:08.