CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Main CFD Forum

Stack overflow

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   October 15, 2004, 07:25
Default Stack overflow
  #1
MING
Guest
 
Posts: n/a
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.
  Reply With Quote

Old   October 15, 2004, 12:55
Default Re: Stack overflow
  #2
Jarmo Monttinen
Guest
 
Posts: n/a
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
  Reply With Quote

Old   October 15, 2004, 13:44
Default Re: Stack overflow
  #3
steve
Guest
 
Posts: n/a
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.
  Reply With Quote

Old   October 15, 2004, 22:26
Default Re: Stack overflow
  #4
versi
Guest
 
Posts: n/a
one may use f77 -static ...
  Reply With Quote

Old   October 15, 2004, 22:41
Default Re: Stack overflow
  #5
Xin Guo
Guest
 
Posts: n/a
If the system is win2000 and the compiler is compaq visual fortran 6? The stack seems always not big enough.
  Reply With Quote

Old   October 16, 2004, 08:46
Default Re: Stack overflow
  #6
MING
Guest
 
Posts: n/a
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!!!!!!!!!!!
  Reply With Quote

Old   October 17, 2004, 14:03
Default Re: Stack overflow
  #7
steve
Guest
 
Posts: n/a
Put all your big data arrays into named common spaces

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

  Reply With Quote

Old   October 17, 2004, 14:30
Default Re: Stack overflow
  #8
MING
Guest
 
Posts: n/a
thank you, steve, Yes, what i have done is rightly as you advised.
  Reply With Quote

Old   October 18, 2004, 09:39
Default Re: Stack overflow
  #9
steve
Guest
 
Posts: n/a
Ming - Did that solve your problem or do you still have the stack overflow problem? Steve
  Reply With Quote

Old   October 18, 2004, 10:57
Default Re: Stack overflow
  #10
MING
Guest
 
Posts: n/a
no, this way doesn't work.
  Reply With Quote

Old   October 20, 2004, 14:02
Default Re: Stack overflow
  #11
Jarmo Monttinen
Guest
 
Posts: n/a
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
  Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stack Overflow imrannazir Main CFD Forum 7 July 9, 2011 01:53
Incineration Stack model MLeong CFX 4 September 3, 2009 06:26
Phase locked average in run time panara OpenFOAM 2 February 20, 2008 15:37
Stack Exhaust modelling Bob CFX 0 June 27, 2002 13:37
Stack frame size, Origin 2000, fortran, a question. Sergei Chernyshenko Main CFD Forum 4 February 22, 1999 15:24


All times are GMT -4. The time now is 00:56.